mIRC Home    About    Download    Register    News    Help

Print Thread
Capturing DCC rejected from status window? #54718 14/10/03 04:46 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
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)

Re: Capturing DCC rejected from status window? #54719 14/10/03 05:26 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Re: Capturing DCC rejected from status window? #54720 14/10/03 05:34 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
No, I was talking about invalid parameters.....
DCC Send from X rejected (invalid parameters)

but maybe it's something similar for that?

Re: Capturing DCC rejected from status window? #54721 14/10/03 05:55 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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:)

Re: Capturing DCC rejected from status window? #54722 14/10/03 07:03 PM
Joined: May 2003
Posts: 161
A
Ashkrynt Offline
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
dcc rejects don't trigger ctcp events.

Re: Capturing DCC rejected from status window? #54723 14/10/03 07:13 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
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.
Re: Capturing DCC rejected from status window? #54724 14/10/03 07:24 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
A ctcp event is always triggered before mIRC processes the data and decides whether to accept or reject the file.

Re: Capturing DCC rejected from status window? #54725 14/10/03 07:24 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Re: Capturing DCC rejected from status window? #54726 14/10/03 07:54 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
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

Re: Capturing DCC rejected from status window? #54727 14/10/03 07:55 PM
Joined: Jun 2003
Posts: 242
R
r0ck0 Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
Are you ignoring ctcp ?

/ignore -rtw *

Re: Capturing DCC rejected from status window? #54728 14/10/03 08:03 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
Nope, not ignoring anything

Last edited by Nille; 14/10/03 08:04 PM.
Re: Capturing DCC rejected from status window? #54729 14/10/03 08:05 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
*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,


Mentality/Chris
Re: Capturing DCC rejected from status window? #54730 14/10/03 08:10 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
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?

Re: Capturing DCC rejected from status window? #54731 14/10/03 09:13 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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

Re: Capturing DCC rejected from status window? #54732 14/10/03 11:17 PM
Joined: Oct 2003
Posts: 7
A
Alex99 Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Oct 2003
Posts: 7
how to exploit myself ? grin wink

Alex

Re: Capturing DCC rejected from status window? #54733 15/10/03 12:40 PM
Joined: Oct 2003
Posts: 7
N
Nille Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Oct 2003
Posts: 7
Great, it worked cool
Thank you!

Re: Capturing DCC rejected from status window? #54734 15/10/03 01:07 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Good to hear it works laugh