mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Ban my Wi-Fi clones #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?

Re: Ban my Wi-Fi clones [Re: Garou] #177022 18/05/07 06:46 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
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.

NaquadaBomb
www.mirc-dll.com
Re: Ban my Wi-Fi clones [Re: NaquadaServ] #177023 18/05/07 06:54 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.
Re: Ban my Wi-Fi clones [Re: Garou] #177027 18/05/07 07:29 PM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
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.

Re: Ban my Wi-Fi clones [Re: chiram] #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.

Re: Ban my Wi-Fi clones [Re: Garou] #177039 18/05/07 10:54 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Ban my Wi-Fi clones [Re: Riamus2] #177040 18/05/07 11:29 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Please note that in Riamus' codes, $wilsite should be $wildsite

Re: Ban my Wi-Fi clones [Re: Riamus2] #177041 18/05/07 11:35 PM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
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.

Re: Ban my Wi-Fi clones [Re: chiram] #177043 19/05/07 12:36 AM
Joined: Jan 2004
Posts: 1,602
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,602
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.

Re: Ban my Wi-Fi clones [Re: chiram] #177054 19/05/07 03:35 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Ban my Wi-Fi clones [Re: Riamus2] #177057 19/05/07 04:00 AM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
yours doesnt check ident or nick though only hostname.. or am i missing something

Re: Ban my Wi-Fi clones [Re: chiram] #177063 19/05/07 10:06 AM
Joined: Jan 2004
Posts: 1,602
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,602
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.

Re: Ban my Wi-Fi clones [Re: Garou] #177069 19/05/07 01:22 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
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?


NaquadaBomb
www.mirc-dll.com
Re: Ban my Wi-Fi clones [Re: maroon] #177078 19/05/07 02:29 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Ban my Wi-Fi clones [Re: Riamus2] #177099 19/05/07 09:07 PM
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.

Re: Ban my Wi-Fi clones [Re: maroon] #177107 19/05/07 09:55 PM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23

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.

Re: Ban my Wi-Fi clones [Re: Riamus2] #177120 20/05/07 02:20 AM
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.
Re: Ban my Wi-Fi clones [Re: Garou] #177121 20/05/07 03:03 AM
Joined: Jan 2004
Posts: 1,602
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,602
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.

Re: Ban my Wi-Fi clones [Re: maroon] #177122 20/05/07 03:06 AM
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.

Re: Ban my Wi-Fi clones [Re: Garou] #177123 20/05/07 03:14 AM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025
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