mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#177021 18/05/07 06:42 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I want to kick ban my Wi-Fi clones if my ip dont match with my nick and identh. Is this possible to code?

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Huh? Please provide more details about what you are trying to do...

Edit: Servers do not usually show the full hostname of other clients unless you start a DCC connection to them. From what you have described, I'd say it is possible if the server allows it.

Last edited by NaquadaServ; 18/05/07 06:51 PM.
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok exemple:Joins: nick1 (dalnet@222.222.222.222)
if someone else use my ip on my Wi-Fi network then he would login using this: Joins: nick2 (watever@222.222.222.222)
So if its not my nick matching my identh using this ip I want to auto kick ban it.

Last edited by Garou; 18/05/07 06:58 PM.
C
chiram
chiram
C
If unauthorized people are using your wifi i'd think it's unlikely theyd join same irc channel as you but it sounds like you have a unique situation.
Code:
ON *:JOIN:#:{
  if ($gettok($address($nick,2),2,64) == $gettok($address($me,2),2,64)) {
    if (mynick !isin $nick) || ($gettok($gettok($address($nick,5),2,33),1,64) != $gettok($gettok($address($me,5),2,33),1,64)) { ban -k # $nick 1 Unauthorized clone. }
  }
}


Should do what your asking just change the "mynick" thing to the string that you require in your nickname. If a user joins with your ip that doesnt share same ident or have that string in nickname they will be kick banned.

#177028 18/05/07 07:33 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx very much chiram.

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Garou, if your IP/DNS doesn't change, then just hardcode the info into the script to avoid problems.

Code:
on !*:join:#: {
  if ($wildsite == *!*@222.222.222.222 || $wilsite == *!*@yourhost.com) ban -k $chan $nick 6
}


Otherwise, use:
Code:
on !*:join:#: {
  if ($wildsite == $address($me,2)) ban -k $chan $nick 6
}


The problem with that is that it won't work if the person joining shows the IP and you show the DNS or vice versa.


chiram, trolling posts don't help anyone. Kick/Ban scripts are fine here. War scripts are not. There is a difference.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Please note that in Riamus' codes, $wilsite should be $wildsite

C
chiram
chiram
C
Isn't that script going to ban everyone who joins using his IP? I believe he only wanted people banned that match his ip but dont match both his nickname string and ident.

#177043 19/05/07 12:36 AM
Joined: Jan 2004
Posts: 2,081
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
If you forward port 113 to your pc, then all mIRC pc's behind your router will all have their identd handshake talking to your pc. So, if you check the box in mIRC-options/identd/enable-only-when-connecting, then your pc will have identd enabled, but everyone else will be disabled. If that box isn't checked, then everyone else gets your same identd value.

I tried leaving that box unchecked, and then changing my identd value after i connected, but i've found that it doesn't work right if a 2nd mirc connects soon after the 'main' mIRC owning identd changes the value. However, if you wait long enough, you can then control whatever identd value the other pc's get.

They can avoid being given your identd value only by disabling identd in their own pc, which almost always adds the "~" to their address. However, you must be careful to use address masks that discern the difference between someone who has identd and one who doesn't. ie, $address($nick,3) does *!*userid@isp because it's trying to match someone whether they have identd or not.

#177054 19/05/07 03:35 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
From his example, he wants all connections from his WiFi to be banned except for himself (ie. they don't match the nick/ident of the client with the script). The code provided does exactly that.

C
chiram
chiram
C
yours doesnt check ident or nick though only hostname.. or am i missing something

#177063 19/05/07 10:06 AM
Joined: Jan 2004
Posts: 2,081
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
Originally Posted By: chiram
yours doesnt check ident or nick though only hostname.. or am i missing something


It doesn't need to. It's banning any nick having your same host mask - that isn't you. The "!" prefix prevents it from matching your own join, though since you join without OP you couldn't ban yourself. The @ prefix would probably be better since you could only be OP if the join weren't yourself.

This code would also ban a 2nd nick joining from your own PC.

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Originally Posted By: Garou
Ok exemple:Joins: nick1 (dalnet@222.222.222.222)
if someone else use my ip on my Wi-Fi network then he would login using this: Joins: nick2 (watever@222.222.222.222)
So if its not my nick matching my identh using this ip I want to auto kick ban it.


Are you saying you have people using your WiFi, that you do not want them to use your WiFi? Enable security on your router, problem solved?

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Originally Posted By: maroon
Originally Posted By: chiram
yours doesnt check ident or nick though only hostname.. or am i missing something


It doesn't need to. It's banning any nick having your same host mask - that isn't you. The "!" prefix prevents it from matching your own join, though since you join without OP you couldn't ban yourself. The @ prefix would probably be better since you could only be OP if the join weren't yourself.

This code would also ban a 2nd nick joining from your own PC.


Exactly. And good point about the @. I wasn't even thinking about needing that. Replace the ! with the @ and the code will be better.

Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
After testing chiram codes, its exacly what I needed and its working fine so thx chiram and to all trying to help.

C
chiram
chiram
C

Quote:
It doesn't need to. It's banning any nick having your same host mask - that isn't you. The "!" prefix prevents it from matching your own join, though since you join without OP you couldn't ban yourself. The @ prefix would probably be better since you could only be OP if the join weren't yourself.

This code would also ban a 2nd nick joining from your own PC.

My point exactly.. he doesn't want people banned that match both his ident/nickname string even if they are on his same ip. He only wants people that log on using his ip but don't share his ident and also share a string that will be common in all his nicknames. You are assuming he only wants a single client matching his IP in the channel, when I believe he only wants unauthorized users on his IP to be banned.

Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
If I dont want to kick my 2 nicks and my bot is this how to exempt them?

ON *:JOIN:#:{
if ($gettok($address($nick,2),2,64) == $gettok($address($me,2),2,64)) {
if (cobra !isin $nick) || (cobra1 !isin $nick) || (cobrabot !isin $nick) || ($gettok($gettok($address($nick,5),2,33),1,64) != $gettok($gettok($address($me,5),2,33),1,64)) { ban -k # $nick 1 Unauthorized Wi-Fi Clone }
}
}

Last edited by Garou; 20/05/07 02:52 AM.
Joined: Jan 2004
Posts: 2,081
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
depending on what kind of channel you're trying to keep other clones out of, perhaps you could just give the channel a key, then only give the key to those that belong.

Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
the code is working find but i want to exempt those 3 nicks in the code. Just want to know how to exempt cause its not.

Joined: Dec 2002
Posts: 2,002
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,002
Code:
if ((!$istok(cobra cobra1 cobrabot,$nick,32)) && ($address($nick,3) !iswm $address($me,5))) ban -k # $nick 3 Unauthorized Wi-Fi Clone


?

Last edited by RoCk; 20/05/07 03:18 AM.
Page 1 of 2 1 2

Link Copied to Clipboard