Skip to content
General IRCX

Password at start

A TG007 community discussion started by 87052402.

Discussion 22 posts
Page 1 of 2
Open
Topic #3354 · 22 published posts · 4,971 views

hello ,

 

i am making a mirc script called CyberResearch ,, but i wanne make a password dialog that ask a password when you start mirc,, en if you enter a wrong password then quit mirc. en when you enter the correct password then mirc connect to a server

 

i have no idea to make this can somebody help me ...?

 

 

Buy Odysseus

hello ,

 

i am making a mirc script called CyberResearch ,, but i wanne make a password dialog that ask a password when you start mirc,, en if you enter a wrong password then quit mirc. en when you enter the correct password then mirc connect to a server

 

i have no idea to make this can somebody help me  ...?

 

 

Buy Odysseus

on *:start:{
 if ($md5($input(Enter password:, dip, Password request)) == <password in md5 format>) { server blah blah }
 else { exit }
}

 

Type //echo -a $md5(<password you want to use>) to get the md5 hash of the password, then you can change <password in md5 format> to that hash.

Edited Apr 15, 2005 8:22 PM by tidy trax
If i try he always exit mirc

Then you did something wrong. Read through what I said slowly.

on *:start:{
if ($md5($input(Enter password:, dip, Password request)) == <password in md5 format>) { server blah blah }
else { exit }
} 



Type //echo -a $md5(<password you want to use>) to get the md5 hash of the password, then you can change <password in md5 format> to that hash. 

 

each time mirc quit

on *:start:{
if ($md5($input(Enter password:, dip, Password request)) == <password in md5 format>) { server blah blah }
else { exit }
} 



Type //echo -a $md5(<password you want to use>) to get the md5 hash of the password, then you can change <password in md5 format> to that hash. 

 

each time mirc quit

You're only supposed to put the part inside the code tags in remote and you have to change the "<password in md5 format>" part like I said in the last post.

i understand what your saying but the code don't work , my mirc quit every time i try

 

First i copy the code to my password.ini file

 

on *:start:{
if ($md5($input(Enter password:, dip, Password request)) == <password in md5 format>) { server blah blah }
else { exit }

 

Then i type :

 


Type //echo -a $md5 charmed

 

then i changed <password in md5 format>)

 

into charmed , en restart my mirc, en typ charmed , but it is

 

 

87052402, what you are to do is type this

 

in a mIRC window, type this

 

//echo -at : $md5(<PUT YOUR PASSWORD HERE>)

E.G.

//echo -at : $md5(hi bob)

 

then it will give you a 32 character string

copy that string

 

and place it in tidy's code where it says <password in md5 format>

 

NOTE: you will need to change his coding, you may not want it to do server blah blah [since that isn't even a server], you may want it to greet the person, or you may want a dialog to come up, you are to change it. TIDY didn't give you the code and expect it to be everything you need, you are still required to do some work.

Edited Apr 15, 2005 10:19 PM by The Gate Keeper

I found out that code doesn't work. Try this code instead...

 

on *:start:{
 if ($input(Enter password:, dip, Password request) == $md5(<non-hashed code here>)) { server blah blah }
 else { exit }
}

EG:
on *:start:{
 if ($input(Enter password:, dip, Password request) == $md5(TechGear007)) { server blah blah }
 else { exit }
}

 

So, whenever the passcode box comes up you will enter the code of

 

a7d440019ca304febe2a26125285e633

 

This is the hash code for TechGear007.

 

P.S.: I tried this out, and it works for me.

Edited Apr 16, 2005 5:26 AM by Warrior124

mIRC comes with this option in the mIRC Settings. Go to:

View > Options (Hold Alt + O)

Click the + next to Other

Click Lock

Check the box saying "On Startup"

Click Lock and enter a password.

I found out that code doesn't work.

It worked for me.

Your method isn't a very good one because they can just open up the script in notepad and see the password.

I know you could just remove that part of the script altogether but many people don't know how to edit scripts.

thanks every body,,

 

i have now my passwor every time that i start my mirc ,,

 

thanks

 

greetz Odysseus

I found out that code doesn't work.

It worked for me.

Your method isn't a very good one because they can just open up the script in notepad and see the password.

I know you could just remove that part of the script altogether but many people don't know how to edit scripts.

Actually, mine is the same way as yours with the only exception being I moved the $md5 part of the script. I did try it your way, but it just kept closing even when I did put in the right password. Don't know why, lol.

 

P.S.: Okay, I see what you were doing now, lol. Time for me to eat my own words. It does work. I was just doing it the wrong way, lol. Sorry about that.

Edited Apr 17, 2005 11:54 PM by Warrior124

can i change the code that he aks for a password when your wanne exit mirc ..??

 

Greetx Odysseus

can i change the code that he aks for a password when your wanne exit mirc ..??

 

Greetx Odysseus

im goona paste u a file, u just copy n paste in notepad n then upload it in ur script, when u will upload it, it will ask you that u want to protect ur mirc yes o no, u have to type " y " after that its will ask u ur password, enjoy urself

 

on 1:load: {

echo -a %b 15Password Protection Loaded! %b

:start1

set %yes.or.no $?="Do you want your script to be password protected (y/n)"

if (%yes.or.no == y) goto set1

elseif (%yes.or.no == n) {

set %on.off OFF

halt

}

elseif (%yes.or.no == $null) goto start1

:set1

set %on.off ON

set %pass $?*="What do you want the password to be?"

if (%pass == $null) goto set1

elseif (%pass != $null) {

echo %c1 $+ Password has been successfully set as: %c2 $+ %pass

halt

}

}

on 1:start: {

:start

if (%yes.or.no == y) goto check

if (%yes.or.no == n) halt

elseif (%yes.or.no == $null) {

set %yes.or.no $?="Do you want your script to be password protected (y/n)"

if (%yes.or.no == y) goto set

elseif (%yes.or.no == n) {

set %on.off OFF

halt

}

else goto start

}

:set

set %on.off ON

set %pass $?*="What do you want the password to be?"

if (%pass == $null) goto set

elseif (%pass != $null) {

echo %c1 $+ Password has been successfully set to: %c2 $+ %pass

halt

}

:check

set %check.pass $?*="Enter the password:"

if (%check.pass === %pass) {

echo 14P15asswor14d A15ccepte14d

halt

}

elseif (%check.pass === $null) goto check

elseif (%check.pass != %pass) {

set %check.pass $?*="Password incorrect. Try again:"

if (%check.pass === %pass) {

echo %c1 $+ Password Accepted $+ %c2 $+ !

halt

}

else exit

}

}

alias passchange { .timer -m 1 1 timer_now }

alias timer_now { change.pass }

alias change.pass {

if (%on.off == ON) {

set %check.pass $?="Enter the old password"

if (%check.pass === %pass) {

:set1

set %pass $?*="Enter the new password"

if (%pass == $null) goto set1

echo -a %c1 $+ Password has been successfully %c2 $+ changed %c1 $+ to: %c2 $+ %pass

halt

}

elseif (%check.pass != %pass) {

echo -a %c1 $+ Incorrect Password $+ %c2 $+ !

halt

}

}

elseif (%on.off == OFF) {

:start

set %pass $$?*="Enter the new password"

if (%pass == $null) goto start

else {

echo -a %c1 $+ Password has been successfully set to: %c2 $+ %pass

set %on.off ON

set %yes.or.no y

halt

}

}

}

dialog apass {

size -1 -1 300 200

title "Password Protection"

button "Ok",1, 150 175 65 20, OK

button "Cancel",2, 220 175 65 20, CANCEL

box "",3, 5 5 285 160

text "Password Protection",4, 20 22 120 20

radio "On",5, 150 20 35 20, group

radio "Off",6, 200 20 35 20

box "Settings",7, 10 50 275 100

text "Password:",8, 20 72 65 20

edit "",9, 90 70 80 20, autohs %pass

button "Change",10, 190 70 60 20

text "Password Protection is created to only allow people who know your password to access IRC. This way lamers can't mess up anything you have created",11, 20 100 250 60

}

on *:dialog:apass:edit:*: {

if ($did == 9) { set %pass $did(9) }

}

on *:dialog:apass:sclick:*: {

if ($did == 5) { .timer 1 0 set %yes.or.no y | did -e $dname 8,9,10 }

if ($did == 6) { .timer 1 0 set %yes.or.no n | did -b $dname 8,9,10 }

if ($did == 10) { passchange }

}

on *:dialog:apass:init:0: {

if (%passs >= 1) { goto start }

set %passs 0

inc %passs 1

if (%passs == 1) { startpass }

:start

did -o apass 9 1 %pass $did(9)

did -b $dname 10

if (%yes.or.no == y) { did -c apass 5 1 %yes.or.no $did(5) | did -e $dname 8,9,10 }

if (%yes.or.no == n) { did -c apass 6 1 %yes.or.no $did(6) | did -b $dname 8,9,10 }

}

alias startpass { .timer -m 1 1 startpass_now }

alias startpass_now { set %yes.or.no $?="Do you want your script to be password protected? (y/n)" | if (%yes.or.no == y) { set %pass $?*="What do you want the password to be?" } | if (%yes.or.no == n) { did -b $dialog(apass) 8,9,10 | did -c $dialog(apass) 6 1 }

 

how can i change the code

 

 


on *:start:{
if ($input(Enter password:, dip, Password request) == $md5(<non-hashed code here>)) { server blah blah }
else { exit }
}

 

so that he ask a password when i exit mirc

 

 

on *:EXIT: {
if ($input(Enter password:, dip, Password request) == $md5(<non-hashed code here>)) exit 
else { echo -at Didn't return the right password, no leaving the program :P | return }
}

Edited Apr 19, 2005 11:40 PM by The Gate Keeper

Lol at all the troble u should save a password in a dycrypted hash then u read from hash but u encrypt it and anyways why do u need a password, its not like u need to go to a site to use your irc, its on ur computer is it not? lol

Edited Apr 20, 2005 3:14 PM by autobbx

it protection ,, that only i can control it en nobody at my school

LOL UR SERVER IS AT SCHOOL, MIRC or IRC OR w/e?? :|