mIRC Homepage
Posted By: Nille Capturing DCC rejected from status window? - 14/10/03 04:46 PM
Can someone tell me if there is a way to get the dcc reject message in the active window instead of in the status window? (And if so, how it's done)
mIRC doesn't offer a way of capturing this type of error messages, but if you are talking about the "file type ignored" error we can make a script that reads the current settings from mirc.ini and predicts if mIRC will reject that file, in which case a custom error message will be echoed to the active window.
Posted By: Nille Re: Capturing DCC rejected from status window? - 14/10/03 05:34 PM
No, I was talking about invalid parameters.....
DCC Send from X rejected (invalid parameters)

but maybe it's something similar for that?
According to my tests, this one should react on an exploit attempt:
Code:
Ctcp *:dcc send "*:*:{
  if $0 > 41 {
    echo -ta Congratulations! $nick just tried to exploit you.
  }
}

Add /halt after the /echo if you don't want the default error to appear in the status window.

(Note to v6-6.11 users: this will not prevent your mIRC from crashing :tongue:)
dcc rejects don't trigger ctcp events.
Posted By: Nille Re: Capturing DCC rejected from status window? - 14/10/03 07:13 PM
well I couldn't get it to work......still only got a message in the status window.
Where am I supposed to write it.....cause apperantly you got it to work.
A ctcp event is always triggered before mIRC processes the data and decides whether to accept or reject the file.
Yes it works fine here (v6.12):
  • -> *Online* DCC SEND [exploit goes here]
    -
    Congratulations! Online just tried to exploit you.
    -
    DCC Send from Online rejected (invalid parameters)
Put that code in the remote (Alt+R) and make sure it's pasted correctly (doesn't appear in one line). If your scripts do not respond, type /remote on.
Posted By: Nille Re: Capturing DCC rejected from status window? - 14/10/03 07:54 PM
I wrote as you said:
Code:
Ctcp *:dcc send "*:*:{
  if $0 > 41 {
    echo -ta Congratulations! $nick just tried to exploit you.
  }
}

That didn't work...tried doing
Code:
/remote on 
then tried it again....still didn't work.

Tried crashing myself but also asked a friend to try it on me, all I got was
DCC Send from X rejected (invalid parameters)

confused
Posted By: r0ck0 Re: Capturing DCC rejected from status window? - 14/10/03 07:55 PM
Are you ignoring ctcp ?

/ignore -rtw *
Posted By: Nille Re: Capturing DCC rejected from status window? - 14/10/03 08:03 PM
Nope, not ignoring anything
*shrugs* doesn't work for me either. I'm not ignoring any form of *!*@*, just 3 *!*user@hosts, and that's only -pn.

[21:02] DCC Send from Mentality rejected (invalid parameters)

No message.

If you paste that code on one line, you'll get a bracket mismatch error. Obviously, I changed this and it continued to not work.

Win XP Pro, mIRC v6.12.

Regards,
Posted By: Nille Re: Capturing DCC rejected from status window? - 14/10/03 08:10 PM
I don't know anythign about this stuff. Would be nice if it worked though...

win98, mirc 6.12

Could it depend on in what way the exploit is being used or something?
I'm sorry - after a few checks with Mentality, we noticed the ctcp event does not trigger if the exploit length is over certain amount of chars. This leaves us with only one way of detecting an incoming exploit:
Code:
On *:logon:*:{
  window -h @x- $+ $cid
  debug -i @x- $+ $cid xploit
}
 
alias xploit {
  if $+(<- :*!*@* privmsg & :,$chr(1),dcc send "*) iswm $1 {
    tokenize 32 $1
    if $0 > 45 || $len($7-) > 200 {
      var %address = $mid($2,2)
      var %nick = $gettok(%address,1,33)
      echo 4 -at > Possible DCC Exploit by %nick
    }
  }
}

Put this code in the remote, reconnect to the server (so that the "on logon" is triggered and a /debug window is initiated) and try to exploit yourself. This time it should work laugh
how to exploit myself ? grin wink

Alex
Posted By: Nille Re: Capturing DCC rejected from status window? - 15/10/03 12:40 PM
Great, it worked cool
Thank you!
Good to hear it works laugh
© mIRC Discussion Forums