Advertisement
vengeur1

Hostmasks Bans

Dec 24th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.01 KB | None | 0 0
  1. Internet Protocol (IP)
  2.  
  3. Every internet user is identified by an IP address.
  4. An IP address can appear as numeric (134.54.36.22) or alphanumeric (host06-AB3404.cablecomp.us).
  5.  
  6.  
  7.  
  8.  
  9. Cloak
  10.  
  11. Some chatservers are able to hide and replace their users IP addresses with a cloaked (masked) IP which could looks like this:
  12. "F634A706.B8C81357.42359B54.IP" where the last part (".42359B54.IP") is the domain part.
  13.  
  14. Cloaked IP Real IP numeric Real IP alphanumeric
  15. F634A706.B8C81357.42359B54.IP 134.54.36.22 host06-AB3404.cablecomp.us
  16. *B8C81357.42359B54.IP 134.54.36.* *AB3404.cablecomp.us
  17. *.42359B54.IP 134.54.* *.cablecomp.us
  18.  
  19.  
  20.  
  21.  
  22. IRC Hostmask
  23.  
  24. A full IRC hostmask contains the nick, ident and an IP, they are separated by an exclamation mark (!) and an at (@).
  25. The exclamation mark separates the nick from the ident (nick!ident), the at separates the ident from the IP (nick!ident@IPaddress).
  26. The separators are always used in a ban and they always stay on the same place, the nick/ident separator ! on the left, the ident/IP separator @ on the right.
  27.  
  28. A full hostmask looks like this: nick!ident@IPaddress
  29.  
  30. Full hostmask with a numeric IP: hereIam!ircuser@134.54.36.22
  31. Full hostmask with an alphanumeric IP: tea4two!addict@host06-AB3404.cablecomp.us
  32. Full hostmask with a cloaked IP: flippo!hello@F634A706.B8C81357.42359B54.IP
  33.  
  34.  
  35.  
  36.  
  37. Wildcards
  38.  
  39. The question mark (?) replaces one character.
  40. The asterisk (*) replaces a string of characters (a sequence of characters).
  41.  
  42. The asterisk (*) will mostly be used in a ban.
  43.  
  44.  
  45.  
  46.  
  47. Basic Bans
  48.  
  49. A full IRC hostmask contains five parts and looks like this: nick!ident@IPaddress
  50. Sometimes the ident part is called "user" or "username", IPaddress is also called "host" or "host.domain".
  51.  
  52. A ban always contains five parts:
  53. 1. nick
  54. 2. !
  55. 3. ident
  56. 4. @
  57. 5. IPaddress
  58.  
  59.  
  60. Part 2 (the nick/ident separator !) and part 4 (the ident/IPaddress separator @) always stay on the same place, they don't change and they don't move around.
  61. Because we will always use the separators ! and @ in a ban, the easiest way is to build your ban around the separators.
  62. The parts we don't want to use in a ban we replace with an asterisk (*).
  63.  
  64. So lets pick a victim to test our bans with :)
  65. Lets say the full hostmask of our victim is: Johnny!whatever@F634A706.B8C81357.42359B54.IP
  66.  
  67. To ban Johnny's full hostmask we would use the command: > /mode #channel +b Johnny!whatever@F634A706.B8C81357.42359B54.IP
  68.  
  69. To ban the nick "Johnny" we replace the ident and IPaddress with an asterisk (*): > /mode #channel +b Johnny!*@*
  70. (note: the separators stay on the same place).
  71.  
  72. To ban Johnny's ident "whatever" we replace the nick and IPaddress with an asterisk (*): > /mode #channel +b *!whatever@*
  73.  
  74. To ban Johnny's IP address "F634A706.B8C81357.42359B54.IP" we replace the nick and ident with an asterisk (*): > /mode #channel +b *!*@F634A706.B8C81357.42359B54.IP
  75.  
  76. To ban both the ident "whatever" and IP "F634A706.B8C81357.42359B54.IP" we only have to use a wildcard for the nick: > /mode #channel +b *!whatever@F634A706.B8C81357.42359B54.IP
  77.  
  78.  
  79. 1 2 3 4 5
  80. Nick ! Ident @ IPaddress
  81. Nick Ban Johnny ! * @ * johnny!*@*
  82. Ident Ban * ! whatever @ * *!whatever@*
  83. IP Ban * ! * @ F634A706.B8C81357.42359B54.IP *!*@F634A706.B8C81357.42359B54.IP
  84. Nick/IP Ban Johnny ! * @ F634A706.B8C81357.42359B54.IP johnny!*@F634A706.B8C81357.42359B54.IP
  85. Ident/IP Ban * ! whatever @ F634A706.B8C81357.42359B54.IP *!whatever@F634A706.B8C81357.42359B54.IP
  86.  
  87.  
  88.  
  89.  
  90. Nick Bans
  91.  
  92. Nick bans are mostly used to remove a bad nick from a channel.
  93.  
  94. Lets use our test candidate Johnny again to explain different nick bans :)
  95. First we would use the basic nick ban to ban Johnny's nick.
  96. > /mode #channel +b Johnny!*@*
  97. This will ban the nickname Johnny only and will not affect other users with nicknames like "johnnytheman", "heyjohnnyhey" or "iamjohnny".
  98.  
  99. Johnny returns into the channel with the nickname "Johnny1".
  100.  
  101. There are three ways to ban this one:
  102. 1. Use a basic nick ban again. > /mode #channel +b Johnny1!*@*
  103. This will only ban the nick Johnny1, but we already know he is smart, he most likely will return with the nick Johnny2.
  104.  
  105. 2. With the use of a question mark wildcard ? to replace the one character after the nick: > /mode #channel +b Johnny?!*@*
  106. This means all Johnny nicks with one character after it are banned (Johnny1, Johnny2, JohnnyH, JohnnyX, Johnny_ etc.).
  107.  
  108. 3. "Lock" the right side of the nick ban with an asterisk (*): > /mode #channel +b Johnny*!*@*
  109. This means all Johnny nicks with one or more characters after it are banned (Johnny4, Johnny10, johnnytheman, johnnyboy, johnny^^^ etc.).
  110.  
  111. Johnny is smarter than we think, changes his nick again and returns with the nick SmartJohnny.
  112. He can do this because we only "locked" the right side of the nick ban with a * (Johnny*!*@*) so he couldn't use any characters after the Johnny nick but he still can use characters in front of the nick.
  113. So now we can "lock" the nickname on the left side too with a * in front of the nick as well after the nick: > /mode #channel +b *Johnny*!*@*
  114. which will affect all nicknames with the word "johnny" in it (heyjohnny, Johnny1, SmartJohnny, [Johnny], ^^Johnny, MeJohnnyBoy etc).
  115.  
  116. Nick Bans Affects
  117. Johnny!*@* Bans the nick "Johnny" only
  118. Johnny?!*@* Bans all "Johnny" nicks with one character after it.
  119. Johnny*!*@* Bans all "Johnny" nicks with (a string of) characters after it.
  120. *Johnny*!*@* Bans every nick with the word "johnny" in it.
  121.  
  122.  
  123.  
  124.  
  125. Ident Bans
  126.  
  127. Our Johnny is still being a nuisance and we have two innocent users in the channel with the nicks "sweetjohnny" and "JohnnyInnocent" (rrright!), we then could ban Johnny's ident.
  128.  
  129. Johnny's full hostmask is "Johnny!whatever@F634A706.B8C81357.42359B54.IP", "whatever" is the ident part.
  130. A basic ident ban on "whatever" then would be: *!whatever@* which will only ban users with the ident "whatever".
  131.  
  132. Oh no, Johnny brought some floodbots into the channel all using the same ident with numbers like "whatever322", "whatever983", "whatever821" etc.
  133.  
  134. 1. Use the one character wildcard "?": > /mode #channel +b *!whatever???@*
  135. Bans the ident "whatever" with 3 characters after it, every question mark replaces one character (whatever313, whateverlol, whateverabc, whatever--- etc.).
  136.  
  137. 2. "Lock" the right side of the ident ban: > /mode #channel +b *!whatever*@*
  138. Bans the ident "whatever" with (a string of) characters after it (whateverdude, whatever31235, whateverpfft, whatever-abc etc.).
  139.  
  140. 3."Lock" both left and right side of the ident ban: > /mode #channel +b *!*whatever*@*
  141. Bans all users using an ident with the word "whatever" in it (yeahwhatever, boowhateverhoo, whywhatever45, whateverX etc.).
  142.  
  143. Ident Bans Affects
  144. *!whatever@* Bans only the users using the ident "whatever".
  145. *!whatever???@* Bans all users using the ident "whatever" with 3 characters after it.
  146. *!whatever*@* Bans users using the ident "whatever" with (a string of) characters after it.
  147. *!*whatever*@* Bans all users using an ident with the word "whatever" in it.
  148.  
  149.  
  150.  
  151.  
  152. IP Bans
  153.  
  154. A basic IP ban looks like this: *!*@F634A706.B8C81357.42359B54.IP
  155.  
  156. Again five parts:
  157. 1. the first * replaces the nick
  158. 2. nick/ident separator !
  159. 3. second * replaces ident
  160. 4. ident/IP separator @
  161. 5. IP
  162.  
  163. Johnny's cloaked IP is *!*@F634A706.B8C81357.42359B54.IP, his real IP is *!*@134.54.36.22
  164. > /mode #channel +b *!*@F634A706.B8C81357.42359B54.IP
  165. Bans Johnny's cloaked IP *!*@F634A706.B8C81357.42359B54.IP (*!*@134.54.36.22) host+domain.
  166.  
  167. > /mode #channel +b *!*@*.B8C81357.42359B54.IP
  168. Bans the two last parts of Johnny's cloaked IP *!*@*.B8C81357.42359B54.IP (*!*@134.54.36.*) part host+domain.
  169. Here we replace the first part of the IPaddress with an asterisk (*).
  170.  
  171. > /mode #channel +b *!*@*.42359B54.IP
  172. Bans the last part of Johnny's IP *!*@*.42359B54.IP (*!*@134.54.*) which is the domain part.
  173. Here we replace the first two parts of the IPaddress with an asterisk (*).
  174. The same result we get when we would ban it like this: "*!*@*.*.42359B54.IP".
  175. Always be carefull with domain bans, lots of users use the same domain, a ban like this could be too broad!.
  176.  
  177.  
  178.  
  179.  
  180. Extended Bans
  181.  
  182. Extended bans are neat, but they need some extra attention.
  183. Before using bans like this it's handy to check the users whois info first: > /whois Johnny
  184. (1)* [Johnny] (whatever@F634A706.B8C81357.42359B54.IP): Ten Four
  185. (2)* [Johnny] is a registered nick
  186. (3)* [Johnny] #newbies #chatroom #lamersRus
  187. (4)* [Johnny] irc-m06.icq.aol.com :IrCQ-Net
  188. (5)* [Johnny] idle 00:01:26, signon: Fri Mar 7 09:25:22
  189. (6)* [Johnny] End of WHOIS list.
  190.  
  191. What this tells us about Johnny:
  192. (1)Nick: Johnny
  193. Ident: whatever
  194. IP: F634A706.B8C81357.42359B54.IP
  195. Realname: Ten Four
  196. (2)Johnny's nick is registered and identified
  197. (3)Johnny joined the channels #newbies, #chatroom and #lamersRus
  198. (4)Johnny is connected to IrCQ-Net's server irc-m06.icq.aol.com
  199. (5)The last time Johnny typed was 1 min and 26 secs ago. He connected Friday March 7th at 09:25:22
  200. (6)End of whois info
  201.  
  202. There are four different types of extended bans we can use:
  203. Quiet ban ~q:
  204. > /mode #channel +b ~q:*!*@F634A706.B8C81357.42359B54.IP
  205. Johnny can still join the channel but he is unable to type, unless he has +v or higher.
  206.  
  207.  
  208. Nickchange ban ~n:
  209. > /mode #channel +b ~n:*!*@F634A706.B8C81357.42359B54.IP
  210. Prevents Johnny from changing nicks over and over. Users matching these bans are unable to change nicks, unless they have +v or higher.
  211.  
  212.  
  213. Channel ban ~c:
  214. > /mode #channel +b ~c:#lamersRus
  215. Users from channel #lamersRus are unable to join #channel, if the user is already in the channel s/he is unable to type.
  216.  
  217.  
  218. Realname ban ~r:
  219. Johnny's realname is "Ten Four". We can't ban a realname with spaces so or we could ban a part of the realname (*Ten*) or replace the space with an underscore (Ten_Four).
  220.  
  221. > /mode #channel +b ~r:Ten_Four
  222. Bans everyone with the realname "Ten Four" or "Ten_Four", an underscore matches a space or underscore.
  223.  
  224. > /mode #channel +b ~r:*Ten_Four*
  225. Bans everyone who has the word "Ten Four" or "Ten_Four" in their realname.
  226.  
  227. > /mode #channel +b ~r:Ten
  228. Bans everyone with the realname "Ten".
  229.  
  230. > /mode #channel +b ~r:*Ten*
  231. Bans everyone with the word "Ten" in the realname.
  232.  
  233.  
  234. ~q: Quiet ~q:Johnny!*@*
  235. ~q:*!whatever@*
  236. ~q:*!*@F634A706.B8C81357.42359B54.IP
  237. ~n: Nickchanges ~n:*!whatever@*
  238. ~n:*!*@F634A706.B8C81357.42359B54.IP
  239. ~c: Channel ~c:#banned
  240. ~r: Realname ~r:realname
  241. ~r:real_name_with_spaces
  242. ~r:*partofrealname*
  243.  
  244.  
  245.  
  246.  
  247. Exemption Bans
  248.  
  249. Exemption bans allow specific users in from domains that are banned from a channel.
  250.  
  251. > /mode #channel +b *!*@*.42359B54.IP
  252. Bans all users with the domain ".42359B54.IP".
  253.  
  254. > /mode #channel +e *!*@F634A706.B8C81357.42359B54.IP
  255. Allows this user to join #channel when domain ".42359B54.IP" is banned.
  256.  
  257.  
  258.  
  259.  
  260. Ban Removal
  261.  
  262. > /mode #channel -b nick!ident@IPaddress
  263. Removes a ban.
  264.  
  265. > /mode #channel -e nick!ident@IPaddress
  266. Removes an exemption ban.
  267.  
  268. > /mode #channel -b ~q:nick!ident@IPaddress
  269. Removes an extended ban.
  270.  
  271.  
  272.  
  273.  
  274. Ban List
  275.  
  276. > /mode #channel b
  277. Shows the ban list of the given channel.
  278.  
  279. > /mode #channel e
  280. Shows the exemption list of the given channel.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement