ECHO SCRIPT

By version9 on Jan 02, 2010

USAGE : .CMD ECHO <0/1>
0 = DON'T SHOW YOUR NICK ON PROCESS
1 = SHOW YOUR NICK ON PROCESS
TARGET = THE CHANNEL OR NICK YOU WANT TO SEND THE MESSAGE TO
TEXT = WHAT YOU WANT IT TO SAY
EXAMPLE 1 :

CHANNEL : #TEST

USER: .CMD ECHO 0 #TEST MY MESSAGE
BOT: MY MESSAGE

EXAMPLE 2 :

CHANNEL : #TEST

USER: .CMD ECHO 1 #TEST MY MESSAGE
BOT: USER: MY MESSAGE

WHAT THE EXAMPLES DIDN'T SHOW IS THAT THE BOT CAN SEND THE MESSAGE TO A DIFFRENT ROOM.
HOPE YOU LIKE IT

on *:TEXT:*:#: { 
  if ( $1 == .CMD ) { /notice $nick command processing.
    if ( $2 == echo ) {
      /notice $nick Echo Command Recognized...
      if ( $3 == 0 ) { /msg $4 $5- }
      if ( $3 == 1 ) { /msg $4 $nick : $5- }
      }
   }
}

Comments

Sign in to comment.
gooshie   -  Jan 03, 2010

FordLawnmower
Doesn't seem to run any commands or evaluate any identifiers so I don't see what the worry is. I'm using mIRC 6.35

 Respond  
Jethro   -  Jan 03, 2010

Ohhhh ok I see what you mean now.

 Respond  
FordLawnmower   -  Jan 03, 2010

I didn't try this combination, but there is usually a way to get through when you allow the bot to $- whatever someone types. That was just a for instance.
If I knew the correct exploit I wouldn't post it here. It's usually some combination of $decode and $eval but it could also be anything that forces a new line.

Keep in mind that every version of mirc doesn't evaluate the same.

 Respond  
gooshie   -  Jan 03, 2010

FordLawnmower
I tried mine it just messaged the following:

<BOT> gooshie: pawned | Run SHUTDOWN -s -c "You have just been pawned!!!!" -t 60

It did not try to run shutdown, try it yourself.

 Respond  
FordLawnmower   -  Jan 03, 2010

I don't like scripts like this because there is usually a way to exploit them.

What if you type this?

.CMD ECHO 1 #TEST pawned | Run SHUTDOWN -s -c "You have just been pawned!!!!" -t 60

I think this should be made longer instead of shorter -- to make sure it can't be exploited.

 Respond  
gooshie   -  Jan 03, 2010

Jethro_
Try both regex with the following two strings.

.cmd echo 0 #ChanName test
.cmd echo 1 #ChanName test
 Respond  
Jethro   -  Jan 03, 2010

Yes, ( |$) is where $regml(1) is evaluated. The pattern I have shown here does the same thing as yours.

 Respond  
gooshie   -  Jan 03, 2010

Jethro_
It needs (0|1) to evaluate $regml(1)

 Respond  
Jethro   -  Jan 03, 2010

You can also use this regex pattern:

/^.cmd echo [01]( |$)/iS
 Respond  
Master-Of-Death   -  Jan 03, 2010

nice bit of regex gooshie.

 Respond  
gooshie   -  Jan 02, 2010
on $*:TEXT:/^.cmd echo (0|1) /iS:#:msg $4 $iif($regml(1),$+($nick,$chr(58))) $$5-
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.