mIRC Home    About    Download    Register    News    Help

Print Thread
#91218 20/07/04 09:07 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
can you help me with my bot, im trying to figure out how to do the most secure way, of letting me use '/run' from distant computers, and also im trying to figure out how i can get my bot to let me run any command in mirc if i say it... im trying to set all this up in a PM


http://MTec89Net.com
irc.freenode.net #MTec89Net
#91219 20/07/04 09:40 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
1. make a text file with a list of programs they are allowed to run, eg:

winamp.exe
mirc.exe
*.txt

Then use:


  • on *:text:!run *:#:{
    if ($read(programs.txt,w,$2-)) { run $2- }
    }


2.


  • on *:text:$($+(!,$me) *):#:{
    if ($address($nick,5) == your full address) { $2- }
    }


Syntax is: !botnickname <command>


New username: hixxy
#91220 20/07/04 10:14 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
whats the syntax of the address for code 2?


http://MTec89Net.com
irc.freenode.net #MTec89Net
#91221 20/07/04 11:58 PM
Joined: Jul 2004
Posts: 19
S
Pikka bird
Offline
Pikka bird
S
Joined: Jul 2004
Posts: 19
it's a mask : nick!user@host

But it won't work if you have a dynamic IP or if you change your nickname.


Thinking is the worst disease of the brain.

To reply by mail, remove "nospam-" in my adress
#91222 21/07/04 10:02 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
create an on text, on notice, or ctcp event
which takes a password as first parameter and the stuff to run as the rest...

so: /ctcp YourBot RUN MyPAssw0rd winamp.exe

ctcp *:RUN:?: {
if ($2 == MyPAssw0rd) run $3-
}


If it ain't broken, don't fix it!
#91223 22/07/04 08:27 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Quote:
whats the syntax of the address for code 2

Mask 2 = *!*@your.host.net

Best (as Doqnach suggested) to set a passwd for yourself (store only the $md5 value of it), when you CTCP|NOTICE|CHAT the bot you send the passwd first, it checks it and only then allows you to do stuff.

#91224 22/07/04 09:53 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
If you want it secure from people that have access to your bot('s computer): store only the $md5 of your password as Iori said.

If you want to protect against people sniffing your connection: store your password normally on your bot, and when you want to login, first let your bot send a large random number and your $address, then send as password $md5($+(given address,given random number,password)). Also, allow only 1 login try per random number, limit the sending of random numbers per host (maybe reset it after successful login) and set a limited time for logging in. (1 or 2 minutes?)

Protecting against people that can read your bot's files AND sniff your connection: I don't think it's possible frown

Oh yeah, if you're on someone elses comp: don't use // to have it parse the $md5, use <tab> to parse it immediately and to keep your password out of the editbox buffer smile (The same line cannot be used later, because you've already used that random number, and the chance of getting it again should be negligable)


Link Copied to Clipboard