mIRC Home    About    Download    Register    News    Help

Print Thread
N
Nille
Nille
N
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)

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
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.

N
Nille
Nille
N
No, I was talking about invalid parameters.....
DCC Send from X rejected (invalid parameters)

but maybe it's something similar for that?

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
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:)

Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
dcc rejects don't trigger ctcp events.

N
Nille
Nille
N
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.

Last edited by Nille; 14/10/03 07:19 PM.
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
A ctcp event is always triggered before mIRC processes the data and decides whether to accept or reject the file.

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
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.

N
Nille
Nille
N
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

R
r0ck0
r0ck0
R
Are you ignoring ctcp ?

/ignore -rtw *

N
Nille
Nille
N
Nope, not ignoring anything

Last edited by Nille; 14/10/03 08:04 PM.
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
*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,

N
Nille
Nille
N
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?

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
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

A
Alex99
Alex99
A
how to exploit myself ? grin wink

Alex

N
Nille
Nille
N
Great, it worked cool
Thank you!

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
Good to hear it works laugh


Link Copied to Clipboard