Accueil > > > SOCKET ANTISPAM
SOCKET ANTISPAM
Information sur la source
Description
Bonjour, alors comme le dit le titre c'est un systeme antispam, il se compose de 2 sockets. le premier se charge de scanner les nicklists des salons k'il join. le second quand à lui se charge de chercher dans les join les pseudos douteux. La detection des pseudos se fait par les pseudos deja repertorié comme etant des spams ou aussi par des conditions sur les pseudos. Enfin bon y a pas mal d'options dedans il vous suffit de le parametrer au depart et ensuite de taper !help ou !aide sur le salon sur lekel vous le posé. Mes souvenirs ne sont plus super frais dessus pck c'est un truc que j'ai scripter y a plus d'un an et que j'ai plus touché depuis au moins 9 mois.
Source
- on 1:LOAD: {
- echo -a 4 Vous installez le Socket-Antispam Scripté par ISoKa. | echo -a 4 S'il vous plait respecter le travail des autres au lieu de pomper comme des sauvages : )
- set %proprisock $$?"Pseudo Proprietaire sur l'IRC" | set %serverconsok chat7.x-echo.com | set %port.sock 6667 | set %serverconsok2 chat9.x-echo.com
- set %port.sock2 6667 | set %chandusocket #Salon | set %chanechosock #Salon | set %cyclesock 480 | set %nbfrazeignore 10
- set %sock.kline 1 | set %formatenvoiechospam 10SPAM | set %identcomm ! | load -rs socketantispam\socket-pour-scan.txt | majdetectspe
- echo -a 4 Pour toute aide dans la mesure ou c'est moi qui aurai du vous le donner | echo -a 4 /query ISoKa :o)
- echo -a 4 Sinon, demmerdez vous : ) | echo -a 4 Pour commencer faites un click droit en channel puis >> 4 °*¤ Socket Anti Spam ¤*°
- echo -a 4 Tout si trouve pour demarer. Ensuite une fois le socket lancé, !aide :o) | echo -a 4 Enjoy it ! And have fun :o)
- }
- ###################SOCKET ANTISPAM##################
- alias sockvie {
- window -benk @Socket.Antispam 0 0 550 200
- }
- ; ----------------Ouverture socket-----------------
- on *:sockopen:NoSpam:{
- set %scan-en-cour non | unset %countpourignore* | set %repondrespam non | set %socket.actif oui | set %colosock $+ [ $rand(2,6) ]
- //set %socket.nick [ $read(SocketAntiSpam\Configs-socket\socketnick.txt) ] $+ $rand(a,v) $+ [ $lower($read(SocketAntiSpam\Configs-socket\socketnick.txt)) ] | //set %socket.realname $read(SocketAntiSpam\Configs-socket\socketnick.txt)
- echo -t @Socket.Antispam 6Configuration Socket... | sockwrite -n $sockname NICK %socket.nick | echo -t @Socket.Antispam 6Nick : %socket.nick
- sockwrite -n $sockname USER $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) "" "localhost" : %socket.realname | echo -t @Socket.Antispam 6RealName : %socket.realname
- sockmark $sockname %socket.nick | echo -t @Socket.Antispam 5Socket connecté à %serverconsok !
- sockwrite -n NoSpam JOIN %socket.chan | sockwrite -n NoSpam JOIN %chandusocket | socknospamjoin | write -c socketantispam\Fichiers-tampon\tamponblacklist.txt
- }
- on *:sockclose:NoSpam:{ set %socket.actif non }
- #########DETECTION#########
- on *:sockread:NoSpam:{
- if ($sockerr > 0) { | echo -t @Socket.Antispam 14Erreur Socket... | return }
- ;-----------------Reponse au ping et detection des messages privé-------------------
- sockread %nospam.received
- if ($gettok(%nospam.received,1,32) == PING) { sockwrite -n $sockname PONG $gettok(%nospam.received,2,32) }
- if ($gettok(%nospam.received,2,32) == JOIN) && (*guest@* iswm %nospam.received) && (%blacklistage = on) { set %chanblacklist $gettok(%nospam.received,3,32) | testblacklistjoin $right($gettok($gettok(%nospam.received,1,32),1,33),-1) }
- if ($gettok(%nospam.received,2,32) == PRIVMSG) || ($gettok(%nospam.received,2,32) == NOTICE) || ($gettok(%nospam.received,2,32) == 301) {
- set %text $remove($strip($right($gettok(%nospam.received,4-,32),-1)),$chr(44)) | set %textpastrip $right($gettok(%nospam.received,4-,32),-1) | var %cleansub = $regsub(%textpastrip,/[àáâãäåðÂÃÄŪ]/g,a,%textpastrip) | var %cleansub = $regsub(%textpastrip,/[€éêëèÈÉÊË£]/g,e,%textpastrip) | var %cleansub = $regsub(%textpastrip,/[ìíîïÌÍÎÏ¡]/g,i,%textpastrip)
- if ($gettok(%nospam.received,2,32) = 301) { set %text $remove($strip($right($gettok(%nospam.received,5-,32),-1)),$chr(44)) }
- if ($right($gettok($gettok(%nospam.received,1,32),1,33),-1) == %pseudo2spamaignore) || ($right($gettok($gettok(%nospam.received,1,32),1,33),-1) == %pseudo2spamaignore2) { halt }
- else {
- if ($gettok(%nospam.received,3,32) == %socket.nick) {
- set %repondre0spam oui
- ;-----------------Ignore utils sur quelques pseudos ou base de pseudo-------------------
- var %kiparleausocket $gettok($right($gettok($gettok(%nospam.received,1,32),1,33),-1),1,124)
- var %kiparleausocketlong $right($gettok($gettok(%nospam.received,1,32),1,33),-1)
- if ($gettok(%nospam.received,2,32) = 301) { var %kiparleausocket $gettok($gettok($gettok(%nospam.received,4,32),1,33),1,124) | var %kiparleausocketlong $gettok($gettok(%nospam.received,4,32),1,33) }
- if ($regex(%kiparleausocket,/(chat.\.x-echo|irix|sbp)/i)) { halt }
- if (%kiparleausocketlong == %socket.nick) || (%kiparleausocketlong == %socket2.nick) { halt }
- ;------------------Detection des Non Spams par compteur de phrases----------------------
- var %cheminaccesignore $+(socketantispam\ignore\,$left(%kiparleausocket,1),\,$left(%kiparleausocket,2),.txt)
- if (%kiparleausocket == $read(%socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt, w, %kiparleausocket)) { halt }
- elseif ($isfile(%cheminaccesignore) == $true) { if (%kiparleausocket == $read(%cheminaccesignore, w, %kiparleausocket)) { halt } }
- elseif (% [ $+ countpourignore $+ [ %kiparleausocket ] ] != $null) && (% [ $+ countpourignore $+ [ %kiparleausocket ] ] < %nbfrazeignore) { inc %countpourignore $+ %kiparleausocket }
- elseif (!% [ $+ countpourignore $+ [ %kiparleausocket ] ] ) { set %countpourignore $+ %kiparleausocket 1 }
- elseif (% [ $+ countpourignore $+ [ %kiparleausocket ] ] == %nbfrazeignore) { write %cheminaccesignore %kiparleausocket | write socketantispam\ignore.txt %kiparleausocket | echo -t @Socket.Antispam 6 %kiparleausocket Mis en Ignore List | ssock %chandusocket 6 %kiparleausocket Mis en Ignore List | Halt }
- ;---------------------Ignorer automatiquement sur certaines reactions---------------------
- if ($regex(%text,/(anti(.?)pv)/i)) { set %pseudo2spamaignore %kiparleausocketlong | set %repondre0spam non }
- ;-------------------------Base de detection des messages de Spam-------------------------
- ;Ajout texte précedent pour spam multiligne
- if (% [ $+ spammultiligne $+ [ %kiparleausocket ] ] != $null) { set -u180 %text [ %text ] $+ $chr(32) $+ % [ $+ spammultiligne $+ [ %kiparleausocket ] ] }
-
- ;regsub nettoyage texte
- var %textrem , %megareg = $regsub(%text,/([^-[:alnum:]\._\\\/€:@])/g,,%textrem) | var %textrem $remove(%textrem,$chr(44),$chr(130))
-
- ;regex des URL
- if ($regex(%textrem,/((((w|\\\/\\\/)(.?)){3}|3w|h(.?)((t|†)(.?)){2}p(.?)))((:?(\/\/|\\\\))|\.)?([[:alnum:]]{1,}(([[:punct:]]{1,}[[:alnum:]]{1,})+)?)\.(fr|new\.fr|free\.fr|ifrance|com|org|net|fluo\.net|tk|tf|be|fb\.bz|st|xxl\.st|xxl|c\.la|biz|tm|nf|tc|ws|cx|tv|ca|dd\.am|info|lv|ws|uk)/i)) { spamdetecter %kiparleausocketlong %text | halt }
-
- ;regex des URL par IP
- elseif ($regex(%textrem,/(http:\/\/\S+|www\.\S+)([1-2]?[0-9]?[0-9]\.){3}[1-2]?[0-9]?[0-9]/i)) { spamdetecter %kiparleausocketlong %text | halt }
-
- ;regex NUM TEL
- elseif ($regex($remove(%textrem,$chr(44)),/(codeallopassB|((sms|pack)((.+)?)8(1|2)[0-9]{3}|8(1|2)[0-9]{3}((.+)?)(sms|pack))|\D((o|0)8(([^a-z])?[0-9]){8})\D|^((o|0)8(([^a-z])?[0-9]){8})\D|\D((o|0)8(([^a-z])?[0-9]){8})$)/i)) { spamdetecter %kiparleausocketlong %text | halt }
-
- ;regex autres URL particulieres
- elseif ($regex(%textrem,%detectspe)) { spamdetecter %kiparleausocketlong %text | halt }
-
- ;regex MAIL avec demande
- elseif ($regex(%textrem,\w+@\w+\.(net|fr|org|com|fr))) {
- if ($calc($regex(%textrem,/((live|show|visio|vizio|video|cam)[^@])/i) + $regex(%textrem,/(amicauxouplus|str(.{1,2})p|chaud|cho((.{1,3})?)de|sex|coquine|exhibe|cokine|gode|soumi|hot[^m][^a][^i][^l])/i) + $regex(%textrem,/(\D[0-9][:punct:][0-9]{1,2}\D|€|allopass|euro)/i) + $regex(%textrem,/(photo|film|phone|msn)/i)) >= 2) { spamdetecter %kiparleausocketlong %text | halt }
- ;Mail Verifiés
- elseif ($regex(%textrem,/((priz-pass|sandra846|mathilde9391|wizwiz27|udimsn|amelyyye|kimykokine2|aconitum|sandra842|katymsn|oceamsn|anniejolie25|camille_hot|celine_amateur|elodie_claire_78240|italienneparis|julie_laptitecoquine|lauracaline|natacha-show|ninabombasse|sarahwhite69|sofia|supercokine93)(@hotmail))/i)) { spamdetecter %kiparleausocketlong %text | halt }
- }
- ;----------------------Autres Phrases à dire Automatiquement aux Spams-----------------------
- if ($regex(%text,/(mon\sage)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong quel age ? }
- elseif ($regex( %text,/(((c|ç)(a|â|à)\sv(a|â|à).?(\?))|(et\stoi))/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\et-toi.txt) }
- elseif ($regex(%text,/(a\ste\s(di|tente)|int.r.ss|t.as((.{1,10})?)\?)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\oui.txt) }
- elseif (*visio*hot* iswm %text) && (*allo*pass* iswm %text) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong comment ? }
- if ($regex(%textrem,/(d(i|î|ï)|tap|r.p.t.)/i)) {
- var %text1code , %megareg47258 = $regsub(%textpastrip,/((1\,1|2\,2|3\,3|4\,4|5\,5|6\,6|7\,7|8\,8|9\,9|10\,10|11\,11|12\,12|13\,13|14\,14)((.+)?)((([0-9]{2}|[0-9])\,([0-9]{2}|[0-9])|([0-9]{2}|[0-9]))|))/Ug,,%text1code) | set %text $strip(%text1code)
- var %textcode , %megareg258 = $regsub(%text,/([^-[:alnum:]_\\\/€@\s])/g,,%textcode) | set %textcode $replace(%textcode,$chr(32) $+ $chr(32),$chr(32))
- if ($regex(%textcode,/(((\s.\s.)+)((\s.\s)?))/i)) { var %textcodemot $regml(1) | var %textcodetemp $remove(%textcodemot,$chr(32)) | var %textcode $replace(%textcode, [ %textcodemot ] , [ [ %textcodetemp ] $+ [ $chr(32) ] ] ) }
- if ($regex(%textcode,/((\srepetants|\srepetant|\srepetan|\srepeter|\srepetes|\srepete|\srepets|\srepet|\sdisants|\sdisant|\sdisans|\sdires|\sdisan|\sdire|\sdits|\sdis|\sdit|\sdi|\stapants|\stapant|\stapans|\stapan|\staper|\stapet|\stapes|\stape))/i)) { var %nummotdetect $findtok(%textcode,$wildtok(%textcode , [ $regml(1) ] $+ *,1,32) ,1,32) | var %declencheurreg $regml(1) | var %eclencheurcode $wildtok(%textcode, [ $regml(1) ] $+ *,1,32) | var %limitverifmotdudi1 $calc( [ %nummotdetect ] +11) | inc %nummotdetect }
- while (%limitverifmotdudi1 >= %nummotdetect) {
- if ($regex($gettok(%textcode ,%nummotdetect ,32),/(ok\sok|ok|livecam|camera|vi.io|yes|ch(.{1,2})de|coquine)/i)) || ($isupper($left($gettok(%textcode ,%nummotdetect ,32),1)) == $true) || (($len($gettok(%textcode ,%nummotdetect ,32)) >= 4) && ($len($gettok(%textcode ,%nummotdetect ,32)) < 8) && ($calc($count($gettok(%textcode ,%nummotdetect ,32),z,r,t,y,p,q,s,d,f,g,h,j,k,l,m,w,x,c,v,b,n) /$len($gettok(%textcode ,%nummotdetect ,32))) >= 0.70)) { set %repondre0spam non | .timer 1 5 ssock %kiparleausocketlong $lower($gettok(%textcode ,%nummotdetect ,32)) }
- inc %nummotdetect
- }
- if ($len($right(%eclencheurcode, - $+ [ $len( [ %declencheurreg ] ) ] )) >= 1) { set %repondre0spam non | var %motducode $right(%eclencheurcode,- $+ $len( [ %declencheurreg ] )) | .timer 1 2 ssock %kiparleausocketlong $lower(%motducode) }
- echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text
- }
- elseif ($regex(%text,/(asv|\s(a|â|à)ge|[1-3][0-9])/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $rand(2,4) $+ $rand(0,9) $+ m $+ $rand(3,9) $+ $rand(0,6) }
- elseif ($regex( %text,/(code|a(l+)opass)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\allopass.txt) }
- elseif ($regex( %text,/(a\sle\sfai|la\sforme|vais\sbien\smerci|\.\.\.)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\tacam.txt) }
- elseif ($regex( %text,/(site)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\kelsite.txt) }
- ;--------Gestion des spams multilignes--------------------
- if $regex(%textrem,/(str(.{1,2})p|show|msn|allo(.+)?pass|€|code|@|hot)/i) { set -u180 % [ $+ spammultiligne $+ [ %kiparleausocket ] ] %text }
- ;------------------------Echo de ce qu'a dit la Personne au Socket et Reponse aléatoire du Socket---------------------------
- if (%repondre0spam = oui) {
- echo -t @Socket.Antispam 14< $+ %kiparleausocketlong $+ > %text | set %trep $rand(8,20) | set %xpseudo2 %kiparleausocketlong | set %repondrespam non
- if (%xpseudo2 isin $read(%socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt, w, %xpseudo2)) { halt }
- elseif (!%pseudopourrepalecosck) { set %pseudopourrepalecosck %kiparleausocketlong }
- elseif ($findtok(%pseudopourrepalecosck, [ %kiparleausocketlong ] ,0,44)) { halt }
- else { set %pseudopourrepalecosck [ %pseudopourrepalecosck ] $+ [ $chr(44) ] $+ [ %kiparleausocketlong ] }
- }
- }
- }
- }
- ;---------------------------Detection du bannisement du socket------------------------
- if ($gettok(%nospam.received,2,32) == 474) { echo -t @Socket.Antispam 14 Le socket est banni de $gettok(%nospam.received,4,32) $+ , impossible de rejoindre le chan | ssock %chandusocket 4 $avertproprisock Le socket est banni de $gettok(%nospam.received,4,32) $+ , impossible de rejoindre le chan }
- ;---------------------------Detection du Kick du socket-------------------------
- if ($gettok(%nospam.received,2,32) == KICK) && ($gettok(%nospam.received,4,32) == %socket.nick) { echo -t @Socket.Antispam 14 Le socket a été expulsé de $gettok(%nospam.received,3,32) | ssock %chandusocket 4 $avertproprisock Le socket a été expulsé de $gettok(%nospam.received,3,32) }
- ;-------------------------------Detection du Kill du socket----------------------------
- if ($gettok(%nospam.received,2,32) == KILL) && ($gettok(%nospam.received,3,32) == %socket.nick) { echo -t @Socket.Antispam 14 Le socket vient d'être KILL du serveur | stopsocket | lancersocket }
- ;-------------------------------------Detection d'un kill pour Spam et actions associées-----------------------------
- if ($gettok(%nospam.received,2,32) == QUIT) && (*spam* iswm %nospam.received) {
- if ((*kill* iswm %nospam.received)) && ((*[exp/spam]* iswm %nospam.received)) && ((*auto* iswm %nospam.received)) { var %pseudokillsocket %kiparleausocketlong | var %pseudokillsocketcourt %kiparleausocket | blaclistsurdetectkill %pseudokillsocketcourt }
- }
- ;---------------------------Commandes Salons Socket---------------------------
- if ($gettok(%nospam.received,3,32) == %chandusocket) && ($gettok(%nospam.received,2,32) == PRIVMSG) {
- var %text21 = $strip($right($gettok(%nospam.received,4-,32),-1))
- if (%kiparleausocket = %proprisock) || (%kiparleausocket == $read(SocketAntiSpam\configs-socket\user.txt, w, %kiparleausocket )) {
- ;---------------------------!HELP-----------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (aide == $right($gettok(%text21,1,32),-1)) {
- ssock %chandusocket 3 %identcomm $+ lancersocket , Lance le socket
- ssock %chandusocket 3 %identcomm $+ stopsocket , Arrete le socket
- ssock %chandusocket 3 %identcomm $+ scan 4<salon> Scanne la nicklist du salon pour y trouver du spam
- ssock %chandusocket 3 %identcomm $+ monjouet bah c'pour etre sur de jouer tout seul :x
- ssock %chandusocket 3 %identcomm $+ jepretemonjouet pour montrer qu'on est pas une capricieuses : )
- ssock %chandusocket 3 %identcomm $+ addchan 4<salon> Rajoute un salon à la surveillance
- ssock %chandusocket 3 %identcomm $+ delchan 4<salon> Supprime un salon de la surveillance
- ssock %chandusocket 3 %identcomm $+ viewchan Donne la liste des salons sous surveillance
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ setchan 4<salon> <raccourci> Permet de definir un raccourci pour les scans (exemple: !scan sl au lieu de !scan #salon
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ delsetchan 4<salon> <raccourci> Permet d'effacer l'association d'un salon avec son raccourci
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ viewsetchan Voir la liste des raccourcis pour les scans salon
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ cyclesock 4<Minutes.Secondes> Permet de definir le cycle de deco reco du socket
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ xtest 4<pseudo> Lance un test de spam sur <pseudo>
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ delnick 4<pseudo> Retire pseudo de la Blacklist
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ testjoinon : activer detection des spams on join
- .timer 1 1 ssock %chandusocket 3 %identcomm $+ testjoinoff : desactiver detection des spams on join
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ stats Permet d'avoir quelques chiffres sur le socket
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ adduser 4<Pseudo> : Ajouter un user autorisé sur le socket
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ deluser 4<Pseudo> : Supprimer un user autorisé sur le socket
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ ignore 4<Pseudo> : Mettre en Ignore-List pour le socket un Pseudo
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ designore 4<Pseudo> : Supprimer un Pseudo de L'Ignore-List
- .timer 1 2 ssock %chandusocket 3 %identcomm $+ defignore 4<Nombre> : Définit le nombre de phrases dites par un pseudo sans spammer à partir du quel un pseudo est mis en Ignore-List
- .timer 1 3 ssock %chandusocket 3 %identcomm $+ autoscanon : Scanner de facon automatique et aléatoire des nicklists
- .timer 1 3 ssock %chandusocket 3 %identcomm $+ autoscanoff : Arrete le Scan automatique
- .timer 1 3 ssock %chandusocket 3 %identcomm $+ debug : Réinitialise certaines variables en cas de bugs
- }
- ;-----------------------!IGNORE----------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (ignore == $right($gettok(%text21,1,32),-1)) {
- var %pseudoaignorecommande $gettok($gettok(%text21,2,32),1,124)
- if (%pseudoaignorecommande == $read(SocketAntiSpam\ignore.txt, w, %pseudoaignorecommande)) { ssock %chandusocket 6 %pseudoaignorecommande deja en Ignore-List | halt }
- var %cheminaccesignorecommande $+(socketantispam\ignore\,$left(%pseudoaignorecommande,1),\,$left(%pseudoaignorecommande,2),.txt) | write %cheminaccesignorecommande %pseudoaignorecommande | write socketantispam\ignore.txt %pseudoaignorecommande | ssock %chandusocket 6 %pseudoaignorecommande Mis en Ignore List
- }
- ;---------------------!DESIGNORE---------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (designore == $right($gettok(%text21,1,32),-1)) {
- var %pseudoadesignorecommande $gettok($gettok(%text21,2,32),1,124)
- if (%pseudoadesignorecommande != $read(SocketAntiSpam\ignore.txt, w, %pseudoadesignorecommande)) { ssock %chandusocket 6 %pseudoadesignorecommande inconnu dans Ignore-List | halt }
- var %cheminaccesdesignorecommande $+(socketantispam\ignore\,$left(%pseudoadesignorecommande,1),\,$left(%pseudoadesignorecommande,2),.txt)
- if ($read(%cheminaccesdesignorecommande,w,$+(%pseudoadesignorecommande))) { write $+(-dl,$readn) %cheminaccesdesignorecommande }
- if ($read(socketantispam\ignore.txt,w,$+(%pseudoadesignorecommande))) { write $+(-dl,$readn) socketantispam\ignore.txt }
- ssock %chandusocket 6 %pseudoadesignorecommande Supprimé de l'Ignore List
- }
- ;-----------------------!STATS-------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (stats == $right($gettok(%text21,1,32),-1)) {
- set %nb-chan-stats $lines(socketantispam\configs-socket\chan.txt) | var %compteurlistchan 1 | var %liste-chan-socket
- while (%nb-chan-stats >= %compteurlistchan) { set %liste-chan-socket $addtok(%liste-chan-socket ,$read(socketantispam\configs-socket\chan.txt,%compteurlistchan),32) | Inc %compteurlistchan }
- set %nb-utilisateur-sock $lines(socketantispam\configs-socket\user.txt) | var %compteurlistuser 1 | var %liste-user-socket
- while (%nb-utilisateur-sock >= %compteurlistuser) { set %liste-user-socket $addtok(%liste-user-socket ,$read(socketantispam\configs-socket\user.txt,%compteurlistuser),32) | inc %compteurlistuser }
- ssock %chandusocket 4------------------STATISTIQUES SOCKET-----------------------
- ssock %chandusocket 2 Proprietaire : 4 %proprisock
- ssock %chandusocket 2 Pseudos des utilisateurs : 4 %liste-user-socket ( %nb-utilisateur-sock )
- ssock %chandusocket 2 Nombre de Spams detecté : 4 %sock.kline
- ssock %chandusocket 2 Nombre de Pseudos Blacklistés : 4 $lines(socketantispam\badnick.txt)
- ssock %chandusocket 2 Nombre de Pseudos Ignorés : 4 $lines(socketantispam\ignore.txt)
- ssock %chandusocket 2 Salons sous surveillance : 4 %liste-chan-socket ( %nb-chan-stats )
- ssock %chandusocket 2 Cycle de connection du socket : 4 %cyclesock secondes
- ssock %chandusocket 4------------------------------FIN----------------------------------
- }
- ;-------------------------!STOPSOCKET-----------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (stopsocket == $right($gettok(%text21,1,32),-1)) { stopsocket }
- ;--------------------------!MONJOUET (ou je le prete)----------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (monjouet == $right($gettok(%text21,1,32),-1)) { set %monjouet on | ssock %chandusocket 4 Oui oui voila c'est ton jouet : ) }
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (jepretemonjouet == $right($gettok(%text21,1,32),-1)) { set %monjouet off | ssock %chandusocket 4 Ca c'est une bonne fifille qui prete ses jouets : ) }
- ;-----------------------------!DEFIGNORE-------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (defignore == $right($gettok(%text21,1,32),-1)) {
- if ($gettok(%text21,2,32) isnum) { set %nbfrazeignore $gettok(%text21,2,32) | ssock %chandusocket 3 Nombre de phrases prononcées avant ignore du pseudo est maintenant de 4 $gettok(%text21,2,32) }
- }
- ;--------------------------!CYCLESOCK-----------------------------------
-
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (cyclesock == $right($gettok(%text21,1,32),-1)) {
- var %testtemps $gettok(%text21,2,32)
- if (*.* iswm %testtemps) && ( [ $gettok(%testtemps,1,46) ] isnum) && ( [ $gettok(%testtemps,2,46) ] isnum) { set %cyclesock $calc( [ $gettok(%testtemps,1,46) ] *60 + [ $gettok(%testtemps,2,46) ] ) | ssock %chandusocket 3Le cycle de connection du socket est Désormais de :4 $gettok(%testtemps,1,46) min et $gettok(%testtemps,2,46) sec }
- if (*.* !iswm %testtemps) && ( [ %testtemps ] isnum) { set %cyclesock $calc(%testtemps *60) | ssock %chandusocket 3Le cycle de connection du socket est Désormais de :4 %testtemps $+ min }
- else { ssock %chandusocket 4 Hey ! Tu veux bien me donner quelque chose de correct pour une fois ? : ) (min.sec) }
- }
- ;----------------------------!ADDUSER-------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (adduser == $right($gettok(%text21,1,32),-1)) {
- var %useradd = $gettok(%text21,2,32)
- if (%useradd == $read(SocketAntiSpam\configs-socket\user.txt, w, %useradd )) { ssock %chandusocket 4 %useradd 2déja ayant droit }
- else { write SocketAntiSpam\configs-socket\user.txt %useradd | ssock %chandusocket 4 %useradd 2ajouté dans userlist }
- }
- ;-----------------------------!DELUSER-------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (deluser == $right($gettok(%text21,1,32),-1)) {
- var %userdel = $gettok(%text21,2,32)
- if (%userdel = $read(SocketAntiSpam\configs-socket\user.txt, w, %userdel)) {
- if ($read(SocketAntiSpam\configs-socket\user.txt,w,$+(%userdel))) { write $+(-dl,$readn) SocketAntiSpam\configs-socket\user.txt | ssock %chandusocket 4 %userdel 2supprimé de la userlist }
- }
- else { ssock %chandusocket 4 %userdel 4n'est pas un ayant droit }
- }
- ;------------------------------!ADDCHAN--------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (addchan == $right($gettok(%text21,1,32),-1)) {
- var %chanadd = $gettok(%text21,2,32)
- if (%chanadd == $read(SocketAntiSpam\configs-socket\chan.txt, w, %chanadd )) { ssock %chandusocket %chanadd déja sous surveillance }
- else { write SocketAntiSpam\configs-socket\chan.txt %chanadd | ssock %chandusocket %chanadd rajouté à la surveillance }
- }
- ;--------------------------------!DELCHAN---------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (delchan == $right($gettok(%text21,1,32),-1)) {
- var %chandel = $gettok(%text21,2,32)
- if (%chandel == $read(SocketAntiSpam\configs-socket\chan.txt, w, %chandel)) {
- if ($read(SocketAntiSpam\configs-socket\chan.txt,w,$+(%chandel))) { write $+(-dl,$readn) SocketAntiSpam\configs-socket\chan.txt | ssock %chandusocket %chandel supprimé de la surveillance }
- }
- else { ssock %chandusocket %chanadd n'est pas sous surveillance }
- }
- ;-----------------------------------!XTEST-------------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (xtest == $right($gettok(%text21,1,32),-1)) {
- if (%text21 = !xtest) { ssock %chandusocket Veuillez donner un Pseudo à Xtest }
- else { messagepourspam $gettok(%text21,2,32) }
- }
- ;------------------------------------!TESTJOIN (ON ou OFF)---------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (testjoinon == $right($gettok(%text21,1,32),-1)) { set %blacklistage on | ssock %chandusocket Detection Spams on join activé }
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (testjoinoff == $right($gettok(%text21,1,32),-1)) { set %blacklistage off | ssock %chandusocket Detection Spams on join Désactivé }
- ;-------------------------------------!DELNICK-------------------------------------
- if ($left($gettok(%text21,1,32),1) == %identcomm) && (delnick == $right($gettok(%text21,1,32),-1)) {
- if (%text21 = !delnick) { ssock %chandusocket Veuillez donner un Pseudo à supprimer de la Blacklist }
- else {
- var %pseudoasuppr = $gettok(%text21,2,32)
- if (%pseudoasuppr == $read(SocketAntiSpam\badnick.txt, w, %pseudoasuppr )) {
- var %cheminaccesdell $+(socketantispam\badnick\,$left(%pseudoasuppr,1),\,$left(%pseudoasuppr,2),.txt)
- if ($read(%cheminaccesdell,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) %cheminaccesdell }
- if ($read(SocketAntiSpam\badnick.txt ,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) SocketAntiSpam\badnick.txt | ssock %chandusocket 4 %pseudoasuppr Retiré de la Blacklist }
- }
- else { ssock %chandusocket 4 %pseudoasuppr non trouvé dans la blacklist }
- }
- }
- }
- }
- }
- #################MENU NICKLIST####################
- menu Nicklist {
- °*¤ Xtest ¤*°:{
- if (%socket.actif = oui) { set %pseudxtest $addtok(%pseudxtest,$1,44) }
- else { msg %chandusocket !xtest $$1 }
- }
- -
- ScaNeR-NicKLiST:{ msg %chandusocket %identcomm $+ scan $chan }
- -
- }
- ####################REACTION SOCKET SI SPAM DETECTE######################
- alias spamdetecter {
- if (% [ $+ spammultiligne $+ [ $gettok($1,1,124) ] ] ) { unset % [ $+ spammultiligne $+ [ $gettok($1,1,124) ] ] }
- unset %countpourignore $+ $gettok($1,1,124) | unset %countpourignore2 $+ $gettok($1,1,124)
- set %pseudo2spamaignore $1 | write socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt $gettok($1,1,124)
- .timer 1 120 purgeignorelistapresspam $1
- inc %sock.kline | echo -t @Socket.Antispam 4*SPAM* (n° $+ %sock.kline $+ ) < $+ $1 $+ > $2-
- sockwrite -n NoSpam PRIVMSG %chandusocket : 4*SPAM* (n° $+ %sock.kline $+ ) < $+ $1 $+ > $2-
- if ($1 isin $read(SocketAntiSpam\badnick.txt, w, $1)) { echo -t @Socket.Antispam $1 Blacklisted deja listé | halt }
- var %cheminaccestock $+(socketantispam\badnick\,$left(%pseudo2spamaignore,1),\,$left(%pseudo2spamaignore,2),.txt)
- write %cheminaccestock %pseudo2spamaignore | write SocketAntiSpam\badnick.txt %pseudo2spamaignore | echo -t @Socket.Antispam %pseudo2spamaignore Blacklisted
- halt
- }
- #############LANCER TEST##################
- alias messagepourspam { set %pseudxtest $addtok(%pseudxtest,$1,44) }
- ##################PARLER A TRAVERS SOCKET###################
- alias ssock {
- if (%socket.actif == oui) {
- sockwrite -n NoSpam PRIVMSG $1 : $2-
- if ($1 != %chandusocket) { echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 $1 $+ 14 $+ > 7 $strip($2-) }
- }
- }
- ##############LANCER SOCKET#################
- alias lancersocket {
- creerhashbase | write -c socketantispam\Fichiers-tampon\adressscan.txt | write -c socketantispam\Fichiers-tampon\fichiertamponscan.txt
- write -c socketantispam\Fichiers-tampon\fichiertamponscanmask.txt | write -c socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt
- write -c socketantispam\Fichiers-tampon\tamponblacklist.txt | write -c socketantispam\Fichiers-tampon\evitedoublonp0d.txt
- set %blacklistage on | sockopen NoSpam %serverconsok %port.sock | sockopen NoSpam2 %serverconsok2 %port.sock2
- write -c socketantispam\Fichiers-tampon\envoidiffblacklist.txt | write -c socketantispam\fichiers-tampon\repalesock.txt
- .timercyclesock 0 %cyclesock synchrosocks
- set %socket.actif oui | set %socket2.actif oui | sockvie | sockvie2 | unset %listepasdireecho
- echo -t @Socket.Antispam 5Tentative de connexion Socket à %serverconsok %port.sock | echo -t @Socket.Antispam2 5Tentative de connexion Socket à %serverconsok2 %port.sock2
- if (!$dialog(gestion)) { dialog -m Gestion Gestion }
- .timerenvoidiff 0 12 envoidiffblack
- .timerrepalesock 0 14 repalesock
- .timerrepalesock2 0 10 repalesock2
- }
- alias synchrosocks {
- sockclose NoSpam | sockclose NoSpam2 | sockopen NoSpam %serverconsok %port.sock | set %socket.actif oui | set %socket2.actif oui
- .timer 1 1 sockopen NoSpam2 %serverconsok2 %port.sock2
- }
- #################SUPPRESION PSEUDO BLACKLIST#################
- alias supprnickblacklist {
- if (%pseudoasuppr == $read(SocketAntiSpam\badnick.txt, w, %pseudoasuppr )) {
- var %cheminaccesdell $+(socketantispam\badnick\,$left(%pseudoasuppr,1),\,$left(%pseudoasuppr,2),.txt)
- if ($read(%cheminaccesdell,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) %cheminaccesdell }
- if ($read(SocketAntiSpam\badnick.txt ,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) SocketAntiSpam\badnick.txt | echo -a 4 %pseudoasuppr Retiré de la Blacklist }
- }
- else { echo -a 4 %pseudoasuppr non trouvé dans la blacklist }
- }
- ############ARRETER SOCKET################
- alias stopsocket {
- hfree -w basedetect*
- .timercyclesock off | .timerenvoidiff off | .timerrepalesock off | .timerrepalesock2 off
- sockclose NoSpam | sockclose NoSpam2 | set %socket.actif non | set %socket2.actif non
- echo -t @Socket.Antispam 5Socket déconnecté de %serverconsok ! | echo -t @Socket.Antispam2 5Socket déconnecté de %serverconsok2 !
- }
- ########################FAIRE JOIN LE SOCKET AUX CHANS ENREGISTRE#########################
- alias socknospamjoin {
- set %nbchanjoinsocket $lines(socketantispam\configs-socket\chan.txt) | set %numduchan 1
- while (%nbchanjoinsocket >= %numduchan) { sockwrite -n NoSpam JOIN $read(socketantispam\configs-socket\chan.txt,%numduchan) | inc %numduchan }
- }
- #########################VOIR LISTE SALONS SOUS SURVEILLANCE#################
- alias viewchanlook {
- set %viewnbchanjoinsocket $lines(socketantispam\configs-socket\chan.txt) | set %numduchanview 1 | sockwrite -n NoSpam2 PRIVMSG %chandusocket : 3 Chans sous surveillance :
- while (%viewnbchanjoinsocket >= %numduchanview) { sockwrite -n NoSpam2 PRIVMSG %chandusocket : $read(socketantispam\configs-socket\chan.txt,%numduchanview) | inc %numduchanview }
- sockwrite -n NoSpam2 PRIVMSG %chandusocket : 3 Fin | halt
- }
- ##########################PURGER IGNORE LISTE SPAM APRES SPAM##################
- alias purgeignorelistapresspam {
- if ($read(socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt,w,$+($1))) {
- write $+(-dl,$readn) socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt
- }
- }
- ########################TESTER SUR DETECTION BLACKLIST###################################
- alias testparblacklist { write socketantispam\Fichiers-tampon\tamponblacklist.txt $1 | write socketantispam\Fichiers-tampon\envoidiffblacklist.txt $1 $2 %chanblacklist }
- alias envoidiffblack {
- if ($len(%pseudxtest) >= 1) { ssock %chandusocket 12Xtest lancé sur4 %pseudxtest | sockwrite -n NoSpam PRIVMSG %pseudxtest : $read(socketantispam\Configs-socket\texte-ouverture-pv.txt) | echo -t @Socket.Antispam 12*Xtest* sur %pseudxtest | echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 $1 $+ 14 $+ > 7Salut | unset %pseudxtest }
- if ($lines(socketantispam\Fichiers-tampon\envoidiffblacklist.txt) >= 1) {
- var %pseudenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),1,32) | var %maskdenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),2,32) | var %chandenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),3,32)
- write $+(-dl,1) socketantispam\Fichiers-tampon\envoidiffblacklist.txt
- while ($lines(socketantispam\Fichiers-tampon\envoidiffblacklist.txt) >= 2) {
- var %pseudenvoidiff [ %pseudenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),1,32) | var %maskdenvoidiff [ %maskdenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),2,32) | var %chandenvoidiff [ %chandenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),3,32)
- write $+(-dl,1) socketantispam\Fichiers-tampon\envoidiffblacklist.txt
- }
- if ($1 == %xpseudo) { halt }
- .timer 1 15 timer15secondes %pseudenvoidiff %maskdenvoidiff %chandenvoidiff
- .timer 1 180 timer180secondes %pseudenvoidiff %maskdenvoidiff %chandenvoidiff
- }
- }
- alias timer15secondes {
- ssock %chandusocket 12Xtest Blacklist 4 $1 7 ( $2 ) 3[ $3 ] | echo -t @Socket.Antispam 12*Xtest* 4Blacklisted 12 dans 3min sur $1 sur $3 | ssock $1 $read(socketantispam\Configs-socket\texte-ouverture-pv.txt)
- .timer 1 10 sockwrite -n NoSpam PRIVMSG $1 : $read(socketantispam\configs-socket\cava.txt)
- }
- alias timer180secondes {
- ssock $1 $read(socketantispam\Configs-socket\texte-ouverture-pv.txt)
- .timer 1 5 ssock $1 $read(socketantispam\Configs-socket\cava.txt)
- }
- ###################ENVOIE DES SPAM EN ECHO SUR CHAN SPECIFIE ET LANCER SOCKET#####################
- on *:text:*:%chandusocket:{
- if ($nick == %socket2.nick) && ($regex($1-,(Scanner\sSpam\snicklist\sterminé\ssur))) && ($timer(cyclesock).secs >= 180) && (%scanauto == on) && (%2iemscanfai == non) { set %2iemscanfai oui | var %nbchanpourscantot $numtok(%list.scan.salon,44) | var %nbchanpourscantot $rand(1, [ %nbchanpourscantot ] ) | .timer 1 60 msg %chandusocket %identcomm $+ scan $gettok(%list.scan.salon,%nbchanpourscantot,44) }
- if ($gettok($nick,1,124) == %proprisock) || ($gettok($nick,1,124) isin $read(SocketAntiSpam\configs-socket\user.txt, w, $gettok(nick,1,124) )) {
- if ($1 == [ %identcomm ] $+ lancersocket) { lancersocket }
- }
- var %kiparlesursock $gettok($nick,1,124)
- if (*spam*n°* iswm $1-) && (%monjouet = off) && ($me ison %chanechosock) && (($nick = %socket.nick) || ($nick == %socket2.nick)) {
- set %envoispamnospam $strip($remove($1-,$1,$2,<,>,%socket2.nick,%socket.nick))
- if ($findtok(%listepasdireecho,$gettok(%envoispamnospam,1,32),1,32)) { halt }
- set %listepasdireecho $addtok(%listepasdireecho,$gettok(%envoispamnospam,1,32),32)
- if ($numtok(%listepasdireecho,32) > 5) { set %listepasdireecho $deltok(%listepasdireecho,1,32) }
- if ($gettok(%envoispamnospam,1,32) == $read(socketantispam\fichiers-tampon\Fichiers-tampon\evitedoublonp0d.txt, w, $gettok(%envoispamnospam,1,32))) { halt }
- write socketantispam\Fichiers-tampon\evitedoublonp0d.txt $gettok(%envoispamnospam,1,32)
- msg %chanechosock %formatenvoiechospam %envoispamnospam 10 %sock.kline
- .timer 1 60 vidertamponp0d $gettok(%envoispamnospam,1,32)
- }
- }
- ###################DIALOG CONFIG#####################
- dialog Dialogue-antispam {
- title "Socket-AntiSpam-By-ISoKa"
- size -1 -1 158 167
- option dbu
- button "Annuler", 2, 30 150 37 12
- button "OK", 9, 92 151 37 12, default ok
- tab "Conn", 36, 5 2 148 142
- box "Socket-Scan-Join", 37, 9 20 140 53, tab 36
- box "Socket-Scan-Nicklist", 38, 10 77 139 56, tab 36
- text "Server", 10, 18 28 59 11, tab 36 center
- text "Port", 11, 95 28 38 12, tab 36 center
- edit %port.sock, 4, 94 42 38 11, tab 36 center
- text "Server", 12, 13 86 58 10, tab 36 center
- text "Port", 13, 97 86 38 10, tab 36 center
- edit %port.sock2, 5, 97 99 38 11, tab 36 center
- combo 1, 17 42 60 50, tab 36 size drop
- combo 3, 17 99 60 50, tab 36 size drop
- button "Ajouter", 48, 17 56 29 12, tab 36
- button "Supprimer", 49, 49 56 29 12, tab 36
- button "Ajouter", 50, 17 113 29 12, tab 36
- button "Supprimer", 51, 49 113 29 12, tab 36
- tab "Confs", 39
- text "Propietaire ", 14, 18 28 45 11, tab 39 center
- text "Cycle déco\reco (en secondes)", 16, 89 31 45 18, tab 39 center
- edit %proprisock, 6, 15 42 50 14, tab 39 center
- edit %cyclesock, 8, 94 55 38 14, tab 39 center
- text "Chan du Socket", 15, 15 61 48 12, tab 39 center
- text "Nb pour mise en Ignore-List", 22, 91 78 43 16, tab 39 center
- edit %nbfrazeignore, 23, 91 100 45 14, tab 39 center
- edit %chandusocket, 7, 15 75 51 14, tab 39 center
- text "Identifieur commandes", 18, 10 97 60 13, tab 39 center
- edit %identcomm, 19, 20 113 38 14, tab 39 center
- box "Basiques", 33, 8 19 67 121, tab 39
- box "Avancées", 34, 78 19 70 121, tab 39
- tab "Echos\Detect", 40
- text "Si Faire echo des Spams trouvés Sur autre salon.", 20, 20 21 121 11, tab 40 center
- edit %chanechosock, 21, 12 57 60 14, tab 40 center
- edit %formatenvoiechospam, 24, 83 57 60 14, tab 40 center
- text "Format envoi echo Format <pseudo> preuve du spam", 25, 77 39 69 17, tab 40 center
- text "Salon pour echo", 17, 14 44 55 8, tab 40 center
- box "Configs-Echo", 41, 9 33 140 45, tab 40
- box "Détection", 52, 9 83 140 50, tab 40
- combo 53, 16 94 127 50, tab 40 size drop
- button "Ajouter", 54, 16 110 37 12, tab 40
- button "Supprimer", 55, 106 110 37 12, tab 40
- button "Reloader", 56, 62 118 37 12, tab 40
- tab "Fichiers-Configs", 42
- box "Utilisateurs", 43, 8 23 44 115, tab 42
- button "Chans", 26, 14 42 31 12, tab 42
- button "Users", 27, 14 74 31 12, tab 42
- button "Raccourcis", 35, 14 107 31 12, tab 42
- box "Configs-Socket", 44, 55 23 47 115, tab 42
- button "Phrases", 31, 61 42 34 12, tab 42
- button "Pseudos", 30, 61 74 34 12, tab 42
- button "Open-PV", 32, 61 107 34 12, tab 42
- box "Configs-Scan", 45, 105 23 45 115, tab 42
- button "Ignore-List", 29, 111 42 34 12, tab 42
- button "Black-List", 28, 111 64 34 12, tab 42
- button "Base-Debut", 46, 111 87 34 12, tab 42
- button "Base-fin", 47, 111 107 34 12, tab 42
- }
- ON *:DIALOG:Dialogue-Antispam:*:*:{
- if ($devent == init) {
- echo -a 4 Configuration Socket Antispam | var %sersock 1 | affaddspe
- while ( %sersock <= $len(%list.ser.sock) ) {
- if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
- set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
- }
- }
- if ($devent == sclick) {
- if ($did == 2) { dialog -x Dialogue-Antispam Dialogue-Antispam | echo -a 4 Fermeture menu configuration Antispam }
- if ($did == 30) { run socketantispam\configs-socket\socketnick.txt }
- if ($did == 28) { run socketantispam\badnick.txt }
- if ($did == 31) { run socketantispam\configs-socket\socket.txt }
- if ($did == 27) { run socketantispam\configs-socket\user.txt }
- if ($did == 29) { run socketantispam\ignore.txt }
- if ($did == 26) { run socketantispam\configs-socket\chan.txt }
- if ($did == 32) { run socketantispam\configs-socket\texte-ouverture-pv.txt }
- if ($did == 35) { run socketantispam\configs-socket\setchan.txt }
- if ($did == 46) { run socketantispam\configs-socket\basedetect.txt }
- if ($did == 47) { run socketantispam\configs-socket\basedetectfin.txt }
- if ($did == 48) || ($did == 50) {
- set %list.ser.sock %list.ser.sock $+ $$?="Rajouter Un Server" $+ $chr(44) | did -r Dialogue-Antispam 1 | did -r Dialogue-Antispam 3 | var %sersock 1
- while ( %sersock <= $len(%list.ser.sock) ) {
- if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
- set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
- }
- unset %transfersock
- }
- if ($did == 49) || ($did == 51) {
- if ($did(1).seltext) { set %list.ser.sock $remove(%list.ser.sock, [ $did(1).seltext ] $+ $chr(44)) }
- elseif ($did(3).seltext) { set %list.ser.sock $remove(%list.ser.sock, [ $did(3).seltext ] $+ $chr(44)) }
- did -r Dialogue-Antispam 1 | did -r Dialogue-Antispam 3 | var %sersock 1
- while ( %sersock <= $len(%list.ser.sock) ) {
- if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
- set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
- }
- unset %transfersock
- }
- if ($did == 54) {
- var %adressetoadd $$?="Rajouter Une detection"
- if ($right(%adressetoadd,4) == .com) && ($read(socketantispam\configs-socket\confdetect.txt,1)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,1),$left(%adressetoadd,-4),124) | write -l1 socketantispam\configs-socket\confdetect.txt %adressearajou }
- elseif ($right(%adressetoadd,4) == .org) && ($read(socketantispam\configs-socket\confdetect.txt,2)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,2),$left(%adressetoadd,-4),124) | write -l2 socketantispam\configs-socket\confdetect.txt %adressearajou }
- elseif ($right(%adressetoadd,3) == .fr) && ($read(socketantispam\configs-socket\confdetect.txt,3)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,3),$left(%adressetoadd,-3),124) | write -l3 socketantispam\configs-socket\confdetect.txt %adressearajou }
- elseif ($right(%adressetoadd,5) == .c.la) && ($read(socketantispam\configs-socket\confdetect.txt,4)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,4),$left(%adressetoadd,-5),124) | write -l4 socketantispam\configs-socket\confdetect.txt %adressearajou }
- elseif ($right(%adressetoadd,4) == .net) && ($read(socketantispam\configs-socket\confdetect.txt,5)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,5),$left(%adressetoadd,-4),124) | write -l5 socketantispam\configs-socket\confdetect.txt %adressearajou }
- else { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,6), [ %adressetoadd ] ,124) | write -l6 socketantispam\configs-socket\confdetect.txt %adressearajou }
- majdetectspe
- }
- if ($did == 55) {
- var %adressetodel $did(53).seltext
- if ($right(%adressetodel,4) == .com) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,1) ] , [ %adressetodel ] ,1,124) | write -l1 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- elseif ($right(%adressetodel,4) == .org) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok($read(socketantispam\configs-socket\confdetect.txt,2), [ %adressetodel ] ,1,124) | write -l2 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- elseif ($right(%adressetodel,3) == .fr) { var %adressetodel $left(%adressetodel,-3) | var %ligneaddtodel $remtok($read(socketantispam\configs-socket\confdetect.txt,3), [ %adressetodel ] ,1,124) | write -l3 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- elseif ($right(%adressetodel,5) == .c.la) { var %adressetodel $left(%adressetodel,-5) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,4), [ %adressetodel ] ,1,124) | write -l4 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- elseif ($right(%adressetodel,4) == .net) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,5), [ %adressetodel ] ,1,124) | write -l5 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- else { var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,6) ] , [ %adressetodel ] ,1,124) | write -l6 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
- majdetectspe
- }
- if ($did == 56) { majdetectspe }
- if ($did == 9) {
- if (($did(1).seltext) && ($did(1).seltext != %serverconsok)) || (%serverconsok != $null) {
- if (%serverconsok == $null) && ($did(1).seltext == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un server pour le socket pour scan | halt }
- if ($did(1).seltext) { set %serverconsok $did(1).seltext | echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 $did(1).seltext }
- }
- if (!$did(1).seltext) { echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 %serverconsok }
- if (($did(4)) && ($did(4) != %port.sock)) || (%port.sock != $null) {
- if ($did(4) !isnum) && (%port.sock == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le port du Socket pour join | halt }
- if (%port.sock == $null) && ($did(4) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un port pour le socket sur join | halt }
- if ($did(4)) { set %port.sock $did(4) | echo -a 2Socket Antispam -----> 4 Le port pour le socket sur join est:3 $did(4) }
- }
- if (($did(3).seltext) && ($did(3).seltext != %serverconsok2)) || (%serverconsok2 != $null) {
- if (%serverconsok2 == $null) && ($did(3).seltext == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un server pour le socket pour scan | halt }
- if (!$did(3).seltext) { echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 %serverconsok2 }
- }
- if ($did(3).seltext) { set %serverconsok2 $did(3).seltext | echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 $did(3).seltext }
- if (($did(5)) && ($did(5) != %port.sock2)) || (%port.sock2 != $null) {
- if ($did(5) !isnum) && (%port.sock2 == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le port du Socket pour scan | halt }
- if (%port.sock2 == $null) && ($did(5) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un port pour le socket pour scan | halt }
- if ($did(5)) { set %port.sock2 $did(5) | echo -a 2Socket Antispam -----> 4 Le port pour le socket scan est:3 $did(5) }
- }
- if (($did(6)) && ($did(6) != %proprisock)) || (%proprisock != $null) {
- if (%proprisock == $null) && ($did(6) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Pseudo pour le proprietaire du socket | halt }
- if ($did(6)) { set %proprisock $did(6) | echo -a 2Socket Antispam -----> 4 Le Pseudo du proprietaire du socket est:3 $did(6) }
- }
- if (($did(7)) && ($did(7) != %chandusocket)) || (%chandusocket != $null) {
- if (%chandusocket == $null) && ($did(7) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Salon pour le socket | halt }
- if ($did(7)) { set %chandusocket $did(7) | echo -a 2Socket Antispam -----> 4 Le Salon du socket est:3 $did(7) }
- }
- if (($did(8)) && ($did(8) != %cyclesock)) || (%cyclesock != $null) {
- if ($did(8) !isnum) && (%cyclesock == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le cycle de connection du socket | halt }
- if (%cyclesock == $null) && ($did(8) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur pour le cycle de connection du socket | halt }
- if ($did(8)) { set %cyclesock $did(8) | echo -a 2Socket Antispam -----> 4 Le cycle de connection du socket est de:3 $did(8) secondes }
- }
- if (($did(19)) && ($did(19) != %identcomm)) || (%identcomm != $null) {
- if (%identcomm == $null) && ($did(19) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur pour le cycle de connection du socket | halt }
- if ($did(19)) { set %identcomm $did(19) | echo -a 2Socket Antispam -----> 4 L'identifieur de commandes salon est:3 $did(19) }
- }
- if (($did(23)) && ($did(23) != %nbfrazeignore)) || (%nbfrazeignore != $null) {
- if ($did(23) !isnum) && (%nbfrazeignore == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le nombre de phrases avant ignore | halt }
- if (%nbfrazeignore == $null) && ($did(23) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un nombre de phrases avant d'ignorer un pseudo | halt }
- if ($did(23)) { set %nbfrazeignore $did(23) | echo -a 2Socket Antispam -----> 4 Pseudos mis en Ignore-List aprés:3 $did(23) phrases }
- }
- if (($did(21)) && ($did(21) != %chanechosock)) || (%chanechosock != $null) {
- if (%chanechosock == $null) && ($did(21) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Salon pour repercuter vos spams | halt }
- if ($did(21)) { set %chanechosock $did(21) | echo -a 2Socket Antispam -----> 4 Le Salon pour repercuter vos spams est:3 $did(21) }
- }
- if ($did(24)) { set %formatenvoiechospam $did(24) | echo -a 2Socket Antispam -----> 4 Le Format de vos repercutions de Spam est: $did(24) <pseudo> preuve-de-spam }
- echo -a 4 Fermeture menu configuration Antispam | dialog -x Dialogue-Antispam Dialogue-Antispam
- }
- }
- }
- alias majdetectspe {
- var %cmptaddadress 1
- if (%detectspe) { unset %detectspe }
- while (6 >= %cmptaddadress) {
- set %detectspe [ [ %detectspe ] $+ [ [ $chr(40) ] $+ [ $replace($read(socketantispam\configs-socket\confdetect.txt,%cmptaddadress),?,.,*,((.+)?),\,\\,.,\.,/,\/,((\.+)?),((.+)?)) ] $+ [ $chr(41) ] ] ]
- if (%cmptaddadress == 1) { set %detectspe [ %detectspe ] $+ [ (\.com)| ] }
- if (%cmptaddadress == 2) { set %detectspe [ %detectspe ] $+ [ (\.org)| ] }
- if (%cmptaddadress == 3) { set %detectspe [ %detectspe ] $+ [ (\.fr)| ] }
- if (%cmptaddadress == 4) { set %detectspe [ %detectspe ] $+ [ (\.c\.la)| ] }
- if (%cmptaddadress == 5) { set %detectspe [ %detectspe ] $+ [ (\.net)| ] }
- inc %cmptaddadress
- }
- set %detectspe [ $chr(47) ] $+ [ $chr(40) ] $+ [ %detectspe ] $+ [ $chr(41) ] $+ [ $chr(47) ] $+ [ $chr(105) ]
- if ($dialog(Dialogue-antispam)) { affaddspe }
- }
- alias affaddspe {
- did -r Dialogue-antispam 53
- var %cptaffadd 1
- while (6 >= %cptaffadd) {
- var %lignepraffadd $read(socketantispam\configs-socket\confdetect.txt, [ %cptaffadd ] ) | var %nbtokaffadd $numtok(%lignepraffadd,124) | var %cpttokaffadd 1
- while (%nbtokaffadd >= %cpttokaffadd) {
- if (%cptaffadd == 1) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .com ] }
- if (%cptaffadd == 2) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .org ] }
- if (%cptaffadd == 3) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .fr ] }
- if (%cptaffadd == 4) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .c.la ] }
- if (%cptaffadd == 5) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .net ] }
- if (%cptaffadd == 6) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] }
- inc %cpttokaffadd
- }
- inc %cptaffadd
- }
- }
- ###################AVERT PROPRI SOCK################
- alias avertproprisock {
- var %nombre-valentine $nick(%chandusocket,0) | var %compteurval 1
- while (%nombre-valentine >= %compteurval) {
- if ( [ %proprisock ] $+ * iswm $nick(%chandusocket,%compteurval)) { set %isokaval $nick(%chandusocket,%compteurval) | return %isokaval | halt }
- else { inc %compteurval }
- }
- }
- ####################DIRE LES REPONSES ALEATOIRES AUX GENS QUI PARLENT AU SOCKET#####################
- alias repalesock {
- if (%pseudopourrepalecosck) { set %socket.phrase $lower($read(SocketAntiSpam\Configs-socket\socket.txt)) | sockwrite -n NoSpam PRIVMSG %pseudopourrepalecosck : %socket.phrase | echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 [ %pseudopourrepalecosck ] $+ 14> 7 [ %socket.phrase ] | unset %pseudopourrepalecosck }
- }
- ####################TEST ON JOIN#####################
- alias testblacklistjoin {
- var %pseudopourblacklist = $1 | var %pseudoblackrem $remove(%pseudopourblacklist,-,_,],[) | var %cheminaccestestignore2 $+(socketantispam\ignore\,$left(%pseudopourblacklist,1),\,$left(%pseudopourblacklist,2),.txt)
- if ($1 == $read(SocketAntiSpam\Fichiers-tampon\tamponblacklist.txt, w, $1)) || ($regex($1,%1ertestscan)) || (($isfile( %cheminaccestestignore2) == $true) && ($gettok(%pseudopourblacklist,1,124) isin $read(%cheminaccestestignore2, w, $gettok(%pseudopourblacklist,1,124)))) { halt }
- var %cheminaccestest $+(socketantispam\badnick\,$left(%pseudopourblacklist,1),\,$left(%pseudopourblacklist,2),.txt)
- if (%pseudopourblacklist isin $read(%cheminaccestest, w, %pseudopourblacklist)) { testparblacklist %pseudopourblacklist Pseudo-Exact | halt }
- elseif ($hget(basedetect,$left($remove(%pseudopourblacklist,-,_,],[),2))) && ($regex(%pseudoblackrem,$hget(basedetect,$left($remove(%pseudopourblacklist,-,_,],[),2)))) { testparblacklist %pseudopourblacklist $regml(1) | halt }
- elseif ($regex(%pseudoblackrem,$hget(basedetect,fin))) { testparblacklist %pseudopourblacklist $regml(1) | halt }
- }
on 1:LOAD: {
echo -a 4 Vous installez le Socket-Antispam Scripté par ISoKa. | echo -a 4 S'il vous plait respecter le travail des autres au lieu de pomper comme des sauvages : )
set %proprisock $$?"Pseudo Proprietaire sur l'IRC" | set %serverconsok chat7.x-echo.com | set %port.sock 6667 | set %serverconsok2 chat9.x-echo.com
set %port.sock2 6667 | set %chandusocket #Salon | set %chanechosock #Salon | set %cyclesock 480 | set %nbfrazeignore 10
set %sock.kline 1 | set %formatenvoiechospam 10SPAM | set %identcomm ! | load -rs socketantispam\socket-pour-scan.txt | majdetectspe
echo -a 4 Pour toute aide dans la mesure ou c'est moi qui aurai du vous le donner | echo -a 4 /query ISoKa :o)
echo -a 4 Sinon, demmerdez vous : ) | echo -a 4 Pour commencer faites un click droit en channel puis >> 4 °*¤ Socket Anti Spam ¤*°
echo -a 4 Tout si trouve pour demarer. Ensuite une fois le socket lancé, !aide :o) | echo -a 4 Enjoy it ! And have fun :o)
}
###################SOCKET ANTISPAM##################
alias sockvie {
window -benk @Socket.Antispam 0 0 550 200
}
; ----------------Ouverture socket-----------------
on *:sockopen:NoSpam:{
set %scan-en-cour non | unset %countpourignore* | set %repondrespam non | set %socket.actif oui | set %colosock $+ [ $rand(2,6) ]
//set %socket.nick [ $read(SocketAntiSpam\Configs-socket\socketnick.txt) ] $+ $rand(a,v) $+ [ $lower($read(SocketAntiSpam\Configs-socket\socketnick.txt)) ] | //set %socket.realname $read(SocketAntiSpam\Configs-socket\socketnick.txt)
echo -t @Socket.Antispam 6Configuration Socket... | sockwrite -n $sockname NICK %socket.nick | echo -t @Socket.Antispam 6Nick : %socket.nick
sockwrite -n $sockname USER $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) "" "localhost" : %socket.realname | echo -t @Socket.Antispam 6RealName : %socket.realname
sockmark $sockname %socket.nick | echo -t @Socket.Antispam 5Socket connecté à %serverconsok !
sockwrite -n NoSpam JOIN %socket.chan | sockwrite -n NoSpam JOIN %chandusocket | socknospamjoin | write -c socketantispam\Fichiers-tampon\tamponblacklist.txt
}
on *:sockclose:NoSpam:{ set %socket.actif non }
#########DETECTION#########
on *:sockread:NoSpam:{
if ($sockerr > 0) { | echo -t @Socket.Antispam 14Erreur Socket... | return }
;-----------------Reponse au ping et detection des messages privé-------------------
sockread %nospam.received
if ($gettok(%nospam.received,1,32) == PING) { sockwrite -n $sockname PONG $gettok(%nospam.received,2,32) }
if ($gettok(%nospam.received,2,32) == JOIN) && (*guest@* iswm %nospam.received) && (%blacklistage = on) { set %chanblacklist $gettok(%nospam.received,3,32) | testblacklistjoin $right($gettok($gettok(%nospam.received,1,32),1,33),-1) }
if ($gettok(%nospam.received,2,32) == PRIVMSG) || ($gettok(%nospam.received,2,32) == NOTICE) || ($gettok(%nospam.received,2,32) == 301) {
set %text $remove($strip($right($gettok(%nospam.received,4-,32),-1)),$chr(44)) | set %textpastrip $right($gettok(%nospam.received,4-,32),-1) | var %cleansub = $regsub(%textpastrip,/[àáâãäåðÂÃÄŪ]/g,a,%textpastrip) | var %cleansub = $regsub(%textpastrip,/[€éêëèÈÉÊË£]/g,e,%textpastrip) | var %cleansub = $regsub(%textpastrip,/[ìíîïÌÍÎÏ¡]/g,i,%textpastrip)
if ($gettok(%nospam.received,2,32) = 301) { set %text $remove($strip($right($gettok(%nospam.received,5-,32),-1)),$chr(44)) }
if ($right($gettok($gettok(%nospam.received,1,32),1,33),-1) == %pseudo2spamaignore) || ($right($gettok($gettok(%nospam.received,1,32),1,33),-1) == %pseudo2spamaignore2) { halt }
else {
if ($gettok(%nospam.received,3,32) == %socket.nick) {
set %repondre0spam oui
;-----------------Ignore utils sur quelques pseudos ou base de pseudo-------------------
var %kiparleausocket $gettok($right($gettok($gettok(%nospam.received,1,32),1,33),-1),1,124)
var %kiparleausocketlong $right($gettok($gettok(%nospam.received,1,32),1,33),-1)
if ($gettok(%nospam.received,2,32) = 301) { var %kiparleausocket $gettok($gettok($gettok(%nospam.received,4,32),1,33),1,124) | var %kiparleausocketlong $gettok($gettok(%nospam.received,4,32),1,33) }
if ($regex(%kiparleausocket,/(chat.\.x-echo|irix|sbp)/i)) { halt }
if (%kiparleausocketlong == %socket.nick) || (%kiparleausocketlong == %socket2.nick) { halt }
;------------------Detection des Non Spams par compteur de phrases----------------------
var %cheminaccesignore $+(socketantispam\ignore\,$left(%kiparleausocket,1),\,$left(%kiparleausocket,2),.txt)
if (%kiparleausocket == $read(%socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt, w, %kiparleausocket)) { halt }
elseif ($isfile(%cheminaccesignore) == $true) { if (%kiparleausocket == $read(%cheminaccesignore, w, %kiparleausocket)) { halt } }
elseif (% [ $+ countpourignore $+ [ %kiparleausocket ] ] != $null) && (% [ $+ countpourignore $+ [ %kiparleausocket ] ] < %nbfrazeignore) { inc %countpourignore $+ %kiparleausocket }
elseif (!% [ $+ countpourignore $+ [ %kiparleausocket ] ] ) { set %countpourignore $+ %kiparleausocket 1 }
elseif (% [ $+ countpourignore $+ [ %kiparleausocket ] ] == %nbfrazeignore) { write %cheminaccesignore %kiparleausocket | write socketantispam\ignore.txt %kiparleausocket | echo -t @Socket.Antispam 6 %kiparleausocket Mis en Ignore List | ssock %chandusocket 6 %kiparleausocket Mis en Ignore List | Halt }
;---------------------Ignorer automatiquement sur certaines reactions---------------------
if ($regex(%text,/(anti(.?)pv)/i)) { set %pseudo2spamaignore %kiparleausocketlong | set %repondre0spam non }
;-------------------------Base de detection des messages de Spam-------------------------
;Ajout texte précedent pour spam multiligne
if (% [ $+ spammultiligne $+ [ %kiparleausocket ] ] != $null) { set -u180 %text [ %text ] $+ $chr(32) $+ % [ $+ spammultiligne $+ [ %kiparleausocket ] ] }
;regsub nettoyage texte
var %textrem , %megareg = $regsub(%text,/([^-[:alnum:]\._\\\/€:@])/g,,%textrem) | var %textrem $remove(%textrem,$chr(44),$chr(130))
;regex des URL
if ($regex(%textrem,/((((w|\\\/\\\/)(.?)){3}|3w|h(.?)((t|†)(.?)){2}p(.?)))((:?(\/\/|\\\\))|\.)?([[:alnum:]]{1,}(([[:punct:]]{1,}[[:alnum:]]{1,})+)?)\.(fr|new\.fr|free\.fr|ifrance|com|org|net|fluo\.net|tk|tf|be|fb\.bz|st|xxl\.st|xxl|c\.la|biz|tm|nf|tc|ws|cx|tv|ca|dd\.am|info|lv|ws|uk)/i)) { spamdetecter %kiparleausocketlong %text | halt }
;regex des URL par IP
elseif ($regex(%textrem,/(http:\/\/\S+|www\.\S+)([1-2]?[0-9]?[0-9]\.){3}[1-2]?[0-9]?[0-9]/i)) { spamdetecter %kiparleausocketlong %text | halt }
;regex NUM TEL
elseif ($regex($remove(%textrem,$chr(44)),/(codeallopassB|((sms|pack)((.+)?)8(1|2)[0-9]{3}|8(1|2)[0-9]{3}((.+)?)(sms|pack))|\D((o|0)8(([^a-z])?[0-9]){8})\D|^((o|0)8(([^a-z])?[0-9]){8})\D|\D((o|0)8(([^a-z])?[0-9]){8})$)/i)) { spamdetecter %kiparleausocketlong %text | halt }
;regex autres URL particulieres
elseif ($regex(%textrem,%detectspe)) { spamdetecter %kiparleausocketlong %text | halt }
;regex MAIL avec demande
elseif ($regex(%textrem,\w+@\w+\.(net|fr|org|com|fr))) {
if ($calc($regex(%textrem,/((live|show|visio|vizio|video|cam)[^@])/i) + $regex(%textrem,/(amicauxouplus|str(.{1,2})p|chaud|cho((.{1,3})?)de|sex|coquine|exhibe|cokine|gode|soumi|hot[^m][^a][^i][^l])/i) + $regex(%textrem,/(\D[0-9][:punct:][0-9]{1,2}\D|€|allopass|euro)/i) + $regex(%textrem,/(photo|film|phone|msn)/i)) >= 2) { spamdetecter %kiparleausocketlong %text | halt }
;Mail Verifiés
elseif ($regex(%textrem,/((priz-pass|sandra846|mathilde9391|wizwiz27|udimsn|amelyyye|kimykokine2|aconitum|sandra842|katymsn|oceamsn|anniejolie25|camille_hot|celine_amateur|elodie_claire_78240|italienneparis|julie_laptitecoquine|lauracaline|natacha-show|ninabombasse|sarahwhite69|sofia|supercokine93)(@hotmail))/i)) { spamdetecter %kiparleausocketlong %text | halt }
}
;----------------------Autres Phrases à dire Automatiquement aux Spams-----------------------
if ($regex(%text,/(mon\sage)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong quel age ? }
elseif ($regex( %text,/(((c|ç)(a|â|à)\sv(a|â|à).?(\?))|(et\stoi))/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\et-toi.txt) }
elseif ($regex(%text,/(a\ste\s(di|tente)|int.r.ss|t.as((.{1,10})?)\?)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\oui.txt) }
elseif (*visio*hot* iswm %text) && (*allo*pass* iswm %text) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong comment ? }
if ($regex(%textrem,/(d(i|î|ï)|tap|r.p.t.)/i)) {
var %text1code , %megareg47258 = $regsub(%textpastrip,/((1\,1|2\,2|3\,3|4\,4|5\,5|6\,6|7\,7|8\,8|9\,9|10\,10|11\,11|12\,12|13\,13|14\,14)((.+)?)((([0-9]{2}|[0-9])\,([0-9]{2}|[0-9])|([0-9]{2}|[0-9]))|))/Ug,,%text1code) | set %text $strip(%text1code)
var %textcode , %megareg258 = $regsub(%text,/([^-[:alnum:]_\\\/€@\s])/g,,%textcode) | set %textcode $replace(%textcode,$chr(32) $+ $chr(32),$chr(32))
if ($regex(%textcode,/(((\s.\s.)+)((\s.\s)?))/i)) { var %textcodemot $regml(1) | var %textcodetemp $remove(%textcodemot,$chr(32)) | var %textcode $replace(%textcode, [ %textcodemot ] , [ [ %textcodetemp ] $+ [ $chr(32) ] ] ) }
if ($regex(%textcode,/((\srepetants|\srepetant|\srepetan|\srepeter|\srepetes|\srepete|\srepets|\srepet|\sdisants|\sdisant|\sdisans|\sdires|\sdisan|\sdire|\sdits|\sdis|\sdit|\sdi|\stapants|\stapant|\stapans|\stapan|\staper|\stapet|\stapes|\stape))/i)) { var %nummotdetect $findtok(%textcode,$wildtok(%textcode , [ $regml(1) ] $+ *,1,32) ,1,32) | var %declencheurreg $regml(1) | var %eclencheurcode $wildtok(%textcode, [ $regml(1) ] $+ *,1,32) | var %limitverifmotdudi1 $calc( [ %nummotdetect ] +11) | inc %nummotdetect }
while (%limitverifmotdudi1 >= %nummotdetect) {
if ($regex($gettok(%textcode ,%nummotdetect ,32),/(ok\sok|ok|livecam|camera|vi.io|yes|ch(.{1,2})de|coquine)/i)) || ($isupper($left($gettok(%textcode ,%nummotdetect ,32),1)) == $true) || (($len($gettok(%textcode ,%nummotdetect ,32)) >= 4) && ($len($gettok(%textcode ,%nummotdetect ,32)) < 8) && ($calc($count($gettok(%textcode ,%nummotdetect ,32),z,r,t,y,p,q,s,d,f,g,h,j,k,l,m,w,x,c,v,b,n) /$len($gettok(%textcode ,%nummotdetect ,32))) >= 0.70)) { set %repondre0spam non | .timer 1 5 ssock %kiparleausocketlong $lower($gettok(%textcode ,%nummotdetect ,32)) }
inc %nummotdetect
}
if ($len($right(%eclencheurcode, - $+ [ $len( [ %declencheurreg ] ) ] )) >= 1) { set %repondre0spam non | var %motducode $right(%eclencheurcode,- $+ $len( [ %declencheurreg ] )) | .timer 1 2 ssock %kiparleausocketlong $lower(%motducode) }
echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text
}
elseif ($regex(%text,/(asv|\s(a|â|à)ge|[1-3][0-9])/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $rand(2,4) $+ $rand(0,9) $+ m $+ $rand(3,9) $+ $rand(0,6) }
elseif ($regex( %text,/(code|a(l+)opass)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\allopass.txt) }
elseif ($regex( %text,/(a\sle\sfai|la\sforme|vais\sbien\smerci|\.\.\.)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\tacam.txt) }
elseif ($regex( %text,/(site)/i)) { set %repondre0spam non | echo -t @Socket.Antispam 1< $+ %kiparleausocketlong $+ > %text | .timer 1 %trep ssock %kiparleausocketlong $read(socketantispam\configs-socket\kelsite.txt) }
;--------Gestion des spams multilignes--------------------
if $regex(%textrem,/(str(.{1,2})p|show|msn|allo(.+)?pass|€|code|@|hot)/i) { set -u180 % [ $+ spammultiligne $+ [ %kiparleausocket ] ] %text }
;------------------------Echo de ce qu'a dit la Personne au Socket et Reponse aléatoire du Socket---------------------------
if (%repondre0spam = oui) {
echo -t @Socket.Antispam 14< $+ %kiparleausocketlong $+ > %text | set %trep $rand(8,20) | set %xpseudo2 %kiparleausocketlong | set %repondrespam non
if (%xpseudo2 isin $read(%socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt, w, %xpseudo2)) { halt }
elseif (!%pseudopourrepalecosck) { set %pseudopourrepalecosck %kiparleausocketlong }
elseif ($findtok(%pseudopourrepalecosck, [ %kiparleausocketlong ] ,0,44)) { halt }
else { set %pseudopourrepalecosck [ %pseudopourrepalecosck ] $+ [ $chr(44) ] $+ [ %kiparleausocketlong ] }
}
}
}
}
;---------------------------Detection du bannisement du socket------------------------
if ($gettok(%nospam.received,2,32) == 474) { echo -t @Socket.Antispam 14 Le socket est banni de $gettok(%nospam.received,4,32) $+ , impossible de rejoindre le chan | ssock %chandusocket 4 $avertproprisock Le socket est banni de $gettok(%nospam.received,4,32) $+ , impossible de rejoindre le chan }
;---------------------------Detection du Kick du socket-------------------------
if ($gettok(%nospam.received,2,32) == KICK) && ($gettok(%nospam.received,4,32) == %socket.nick) { echo -t @Socket.Antispam 14 Le socket a été expulsé de $gettok(%nospam.received,3,32) | ssock %chandusocket 4 $avertproprisock Le socket a été expulsé de $gettok(%nospam.received,3,32) }
;-------------------------------Detection du Kill du socket----------------------------
if ($gettok(%nospam.received,2,32) == KILL) && ($gettok(%nospam.received,3,32) == %socket.nick) { echo -t @Socket.Antispam 14 Le socket vient d'être KILL du serveur | stopsocket | lancersocket }
;-------------------------------------Detection d'un kill pour Spam et actions associées-----------------------------
if ($gettok(%nospam.received,2,32) == QUIT) && (*spam* iswm %nospam.received) {
if ((*kill* iswm %nospam.received)) && ((*[exp/spam]* iswm %nospam.received)) && ((*auto* iswm %nospam.received)) { var %pseudokillsocket %kiparleausocketlong | var %pseudokillsocketcourt %kiparleausocket | blaclistsurdetectkill %pseudokillsocketcourt }
}
;---------------------------Commandes Salons Socket---------------------------
if ($gettok(%nospam.received,3,32) == %chandusocket) && ($gettok(%nospam.received,2,32) == PRIVMSG) {
var %text21 = $strip($right($gettok(%nospam.received,4-,32),-1))
if (%kiparleausocket = %proprisock) || (%kiparleausocket == $read(SocketAntiSpam\configs-socket\user.txt, w, %kiparleausocket )) {
;---------------------------!HELP-----------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (aide == $right($gettok(%text21,1,32),-1)) {
ssock %chandusocket 3 %identcomm $+ lancersocket , Lance le socket
ssock %chandusocket 3 %identcomm $+ stopsocket , Arrete le socket
ssock %chandusocket 3 %identcomm $+ scan 4<salon> Scanne la nicklist du salon pour y trouver du spam
ssock %chandusocket 3 %identcomm $+ monjouet bah c'pour etre sur de jouer tout seul :x
ssock %chandusocket 3 %identcomm $+ jepretemonjouet pour montrer qu'on est pas une capricieuses : )
ssock %chandusocket 3 %identcomm $+ addchan 4<salon> Rajoute un salon à la surveillance
ssock %chandusocket 3 %identcomm $+ delchan 4<salon> Supprime un salon de la surveillance
ssock %chandusocket 3 %identcomm $+ viewchan Donne la liste des salons sous surveillance
.timer 1 1 ssock %chandusocket 3 %identcomm $+ setchan 4<salon> <raccourci> Permet de definir un raccourci pour les scans (exemple: !scan sl au lieu de !scan #salon
.timer 1 1 ssock %chandusocket 3 %identcomm $+ delsetchan 4<salon> <raccourci> Permet d'effacer l'association d'un salon avec son raccourci
.timer 1 1 ssock %chandusocket 3 %identcomm $+ viewsetchan Voir la liste des raccourcis pour les scans salon
.timer 1 1 ssock %chandusocket 3 %identcomm $+ cyclesock 4<Minutes.Secondes> Permet de definir le cycle de deco reco du socket
.timer 1 1 ssock %chandusocket 3 %identcomm $+ xtest 4<pseudo> Lance un test de spam sur <pseudo>
.timer 1 1 ssock %chandusocket 3 %identcomm $+ delnick 4<pseudo> Retire pseudo de la Blacklist
.timer 1 1 ssock %chandusocket 3 %identcomm $+ testjoinon : activer detection des spams on join
.timer 1 1 ssock %chandusocket 3 %identcomm $+ testjoinoff : desactiver detection des spams on join
.timer 1 2 ssock %chandusocket 3 %identcomm $+ stats Permet d'avoir quelques chiffres sur le socket
.timer 1 2 ssock %chandusocket 3 %identcomm $+ adduser 4<Pseudo> : Ajouter un user autorisé sur le socket
.timer 1 2 ssock %chandusocket 3 %identcomm $+ deluser 4<Pseudo> : Supprimer un user autorisé sur le socket
.timer 1 2 ssock %chandusocket 3 %identcomm $+ ignore 4<Pseudo> : Mettre en Ignore-List pour le socket un Pseudo
.timer 1 2 ssock %chandusocket 3 %identcomm $+ designore 4<Pseudo> : Supprimer un Pseudo de L'Ignore-List
.timer 1 2 ssock %chandusocket 3 %identcomm $+ defignore 4<Nombre> : Définit le nombre de phrases dites par un pseudo sans spammer à partir du quel un pseudo est mis en Ignore-List
.timer 1 3 ssock %chandusocket 3 %identcomm $+ autoscanon : Scanner de facon automatique et aléatoire des nicklists
.timer 1 3 ssock %chandusocket 3 %identcomm $+ autoscanoff : Arrete le Scan automatique
.timer 1 3 ssock %chandusocket 3 %identcomm $+ debug : Réinitialise certaines variables en cas de bugs
}
;-----------------------!IGNORE----------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (ignore == $right($gettok(%text21,1,32),-1)) {
var %pseudoaignorecommande $gettok($gettok(%text21,2,32),1,124)
if (%pseudoaignorecommande == $read(SocketAntiSpam\ignore.txt, w, %pseudoaignorecommande)) { ssock %chandusocket 6 %pseudoaignorecommande deja en Ignore-List | halt }
var %cheminaccesignorecommande $+(socketantispam\ignore\,$left(%pseudoaignorecommande,1),\,$left(%pseudoaignorecommande,2),.txt) | write %cheminaccesignorecommande %pseudoaignorecommande | write socketantispam\ignore.txt %pseudoaignorecommande | ssock %chandusocket 6 %pseudoaignorecommande Mis en Ignore List
}
;---------------------!DESIGNORE---------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (designore == $right($gettok(%text21,1,32),-1)) {
var %pseudoadesignorecommande $gettok($gettok(%text21,2,32),1,124)
if (%pseudoadesignorecommande != $read(SocketAntiSpam\ignore.txt, w, %pseudoadesignorecommande)) { ssock %chandusocket 6 %pseudoadesignorecommande inconnu dans Ignore-List | halt }
var %cheminaccesdesignorecommande $+(socketantispam\ignore\,$left(%pseudoadesignorecommande,1),\,$left(%pseudoadesignorecommande,2),.txt)
if ($read(%cheminaccesdesignorecommande,w,$+(%pseudoadesignorecommande))) { write $+(-dl,$readn) %cheminaccesdesignorecommande }
if ($read(socketantispam\ignore.txt,w,$+(%pseudoadesignorecommande))) { write $+(-dl,$readn) socketantispam\ignore.txt }
ssock %chandusocket 6 %pseudoadesignorecommande Supprimé de l'Ignore List
}
;-----------------------!STATS-------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (stats == $right($gettok(%text21,1,32),-1)) {
set %nb-chan-stats $lines(socketantispam\configs-socket\chan.txt) | var %compteurlistchan 1 | var %liste-chan-socket
while (%nb-chan-stats >= %compteurlistchan) { set %liste-chan-socket $addtok(%liste-chan-socket ,$read(socketantispam\configs-socket\chan.txt,%compteurlistchan),32) | Inc %compteurlistchan }
set %nb-utilisateur-sock $lines(socketantispam\configs-socket\user.txt) | var %compteurlistuser 1 | var %liste-user-socket
while (%nb-utilisateur-sock >= %compteurlistuser) { set %liste-user-socket $addtok(%liste-user-socket ,$read(socketantispam\configs-socket\user.txt,%compteurlistuser),32) | inc %compteurlistuser }
ssock %chandusocket 4------------------STATISTIQUES SOCKET-----------------------
ssock %chandusocket 2 Proprietaire : 4 %proprisock
ssock %chandusocket 2 Pseudos des utilisateurs : 4 %liste-user-socket ( %nb-utilisateur-sock )
ssock %chandusocket 2 Nombre de Spams detecté : 4 %sock.kline
ssock %chandusocket 2 Nombre de Pseudos Blacklistés : 4 $lines(socketantispam\badnick.txt)
ssock %chandusocket 2 Nombre de Pseudos Ignorés : 4 $lines(socketantispam\ignore.txt)
ssock %chandusocket 2 Salons sous surveillance : 4 %liste-chan-socket ( %nb-chan-stats )
ssock %chandusocket 2 Cycle de connection du socket : 4 %cyclesock secondes
ssock %chandusocket 4------------------------------FIN----------------------------------
}
;-------------------------!STOPSOCKET-----------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (stopsocket == $right($gettok(%text21,1,32),-1)) { stopsocket }
;--------------------------!MONJOUET (ou je le prete)----------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (monjouet == $right($gettok(%text21,1,32),-1)) { set %monjouet on | ssock %chandusocket 4 Oui oui voila c'est ton jouet : ) }
if ($left($gettok(%text21,1,32),1) == %identcomm) && (jepretemonjouet == $right($gettok(%text21,1,32),-1)) { set %monjouet off | ssock %chandusocket 4 Ca c'est une bonne fifille qui prete ses jouets : ) }
;-----------------------------!DEFIGNORE-------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (defignore == $right($gettok(%text21,1,32),-1)) {
if ($gettok(%text21,2,32) isnum) { set %nbfrazeignore $gettok(%text21,2,32) | ssock %chandusocket 3 Nombre de phrases prononcées avant ignore du pseudo est maintenant de 4 $gettok(%text21,2,32) }
}
;--------------------------!CYCLESOCK-----------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (cyclesock == $right($gettok(%text21,1,32),-1)) {
var %testtemps $gettok(%text21,2,32)
if (*.* iswm %testtemps) && ( [ $gettok(%testtemps,1,46) ] isnum) && ( [ $gettok(%testtemps,2,46) ] isnum) { set %cyclesock $calc( [ $gettok(%testtemps,1,46) ] *60 + [ $gettok(%testtemps,2,46) ] ) | ssock %chandusocket 3Le cycle de connection du socket est Désormais de :4 $gettok(%testtemps,1,46) min et $gettok(%testtemps,2,46) sec }
if (*.* !iswm %testtemps) && ( [ %testtemps ] isnum) { set %cyclesock $calc(%testtemps *60) | ssock %chandusocket 3Le cycle de connection du socket est Désormais de :4 %testtemps $+ min }
else { ssock %chandusocket 4 Hey ! Tu veux bien me donner quelque chose de correct pour une fois ? : ) (min.sec) }
}
;----------------------------!ADDUSER-------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (adduser == $right($gettok(%text21,1,32),-1)) {
var %useradd = $gettok(%text21,2,32)
if (%useradd == $read(SocketAntiSpam\configs-socket\user.txt, w, %useradd )) { ssock %chandusocket 4 %useradd 2déja ayant droit }
else { write SocketAntiSpam\configs-socket\user.txt %useradd | ssock %chandusocket 4 %useradd 2ajouté dans userlist }
}
;-----------------------------!DELUSER-------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (deluser == $right($gettok(%text21,1,32),-1)) {
var %userdel = $gettok(%text21,2,32)
if (%userdel = $read(SocketAntiSpam\configs-socket\user.txt, w, %userdel)) {
if ($read(SocketAntiSpam\configs-socket\user.txt,w,$+(%userdel))) { write $+(-dl,$readn) SocketAntiSpam\configs-socket\user.txt | ssock %chandusocket 4 %userdel 2supprimé de la userlist }
}
else { ssock %chandusocket 4 %userdel 4n'est pas un ayant droit }
}
;------------------------------!ADDCHAN--------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (addchan == $right($gettok(%text21,1,32),-1)) {
var %chanadd = $gettok(%text21,2,32)
if (%chanadd == $read(SocketAntiSpam\configs-socket\chan.txt, w, %chanadd )) { ssock %chandusocket %chanadd déja sous surveillance }
else { write SocketAntiSpam\configs-socket\chan.txt %chanadd | ssock %chandusocket %chanadd rajouté à la surveillance }
}
;--------------------------------!DELCHAN---------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (delchan == $right($gettok(%text21,1,32),-1)) {
var %chandel = $gettok(%text21,2,32)
if (%chandel == $read(SocketAntiSpam\configs-socket\chan.txt, w, %chandel)) {
if ($read(SocketAntiSpam\configs-socket\chan.txt,w,$+(%chandel))) { write $+(-dl,$readn) SocketAntiSpam\configs-socket\chan.txt | ssock %chandusocket %chandel supprimé de la surveillance }
}
else { ssock %chandusocket %chanadd n'est pas sous surveillance }
}
;-----------------------------------!XTEST-------------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (xtest == $right($gettok(%text21,1,32),-1)) {
if (%text21 = !xtest) { ssock %chandusocket Veuillez donner un Pseudo à Xtest }
else { messagepourspam $gettok(%text21,2,32) }
}
;------------------------------------!TESTJOIN (ON ou OFF)---------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (testjoinon == $right($gettok(%text21,1,32),-1)) { set %blacklistage on | ssock %chandusocket Detection Spams on join activé }
if ($left($gettok(%text21,1,32),1) == %identcomm) && (testjoinoff == $right($gettok(%text21,1,32),-1)) { set %blacklistage off | ssock %chandusocket Detection Spams on join Désactivé }
;-------------------------------------!DELNICK-------------------------------------
if ($left($gettok(%text21,1,32),1) == %identcomm) && (delnick == $right($gettok(%text21,1,32),-1)) {
if (%text21 = !delnick) { ssock %chandusocket Veuillez donner un Pseudo à supprimer de la Blacklist }
else {
var %pseudoasuppr = $gettok(%text21,2,32)
if (%pseudoasuppr == $read(SocketAntiSpam\badnick.txt, w, %pseudoasuppr )) {
var %cheminaccesdell $+(socketantispam\badnick\,$left(%pseudoasuppr,1),\,$left(%pseudoasuppr,2),.txt)
if ($read(%cheminaccesdell,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) %cheminaccesdell }
if ($read(SocketAntiSpam\badnick.txt ,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) SocketAntiSpam\badnick.txt | ssock %chandusocket 4 %pseudoasuppr Retiré de la Blacklist }
}
else { ssock %chandusocket 4 %pseudoasuppr non trouvé dans la blacklist }
}
}
}
}
}
#################MENU NICKLIST####################
menu Nicklist {
°*¤ Xtest ¤*°:{
if (%socket.actif = oui) { set %pseudxtest $addtok(%pseudxtest,$1,44) }
else { msg %chandusocket !xtest $$1 }
}
-
ScaNeR-NicKLiST:{ msg %chandusocket %identcomm $+ scan $chan }
-
}
####################REACTION SOCKET SI SPAM DETECTE######################
alias spamdetecter {
if (% [ $+ spammultiligne $+ [ $gettok($1,1,124) ] ] ) { unset % [ $+ spammultiligne $+ [ $gettok($1,1,124) ] ] }
unset %countpourignore $+ $gettok($1,1,124) | unset %countpourignore2 $+ $gettok($1,1,124)
set %pseudo2spamaignore $1 | write socketantispam\fichiers-tampon\Ignorerspamapresdetect.txt $gettok($1,1,124)
.timer 1 120 purgeignorelistapresspam $1
inc %sock.kline | echo -t @Socket.Antispam 4*SPAM* (n° $+ %sock.kline $+ ) < $+ $1 $+ > $2-
sockwrite -n NoSpam PRIVMSG %chandusocket : 4*SPAM* (n° $+ %sock.kline $+ ) < $+ $1 $+ > $2-
if ($1 isin $read(SocketAntiSpam\badnick.txt, w, $1)) { echo -t @Socket.Antispam $1 Blacklisted deja listé | halt }
var %cheminaccestock $+(socketantispam\badnick\,$left(%pseudo2spamaignore,1),\,$left(%pseudo2spamaignore,2),.txt)
write %cheminaccestock %pseudo2spamaignore | write SocketAntiSpam\badnick.txt %pseudo2spamaignore | echo -t @Socket.Antispam %pseudo2spamaignore Blacklisted
halt
}
#############LANCER TEST##################
alias messagepourspam { set %pseudxtest $addtok(%pseudxtest,$1,44) }
##################PARLER A TRAVERS SOCKET###################
alias ssock {
if (%socket.actif == oui) {
sockwrite -n NoSpam PRIVMSG $1 : $2-
if ($1 != %chandusocket) { echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 $1 $+ 14 $+ > 7 $strip($2-) }
}
}
##############LANCER SOCKET#################
alias lancersocket {
creerhashbase | write -c socketantispam\Fichiers-tampon\adressscan.txt | write -c socketantispam\Fichiers-tampon\fichiertamponscan.txt
write -c socketantispam\Fichiers-tampon\fichiertamponscanmask.txt | write -c socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt
write -c socketantispam\Fichiers-tampon\tamponblacklist.txt | write -c socketantispam\Fichiers-tampon\evitedoublonp0d.txt
set %blacklistage on | sockopen NoSpam %serverconsok %port.sock | sockopen NoSpam2 %serverconsok2 %port.sock2
write -c socketantispam\Fichiers-tampon\envoidiffblacklist.txt | write -c socketantispam\fichiers-tampon\repalesock.txt
.timercyclesock 0 %cyclesock synchrosocks
set %socket.actif oui | set %socket2.actif oui | sockvie | sockvie2 | unset %listepasdireecho
echo -t @Socket.Antispam 5Tentative de connexion Socket à %serverconsok %port.sock | echo -t @Socket.Antispam2 5Tentative de connexion Socket à %serverconsok2 %port.sock2
if (!$dialog(gestion)) { dialog -m Gestion Gestion }
.timerenvoidiff 0 12 envoidiffblack
.timerrepalesock 0 14 repalesock
.timerrepalesock2 0 10 repalesock2
}
alias synchrosocks {
sockclose NoSpam | sockclose NoSpam2 | sockopen NoSpam %serverconsok %port.sock | set %socket.actif oui | set %socket2.actif oui
.timer 1 1 sockopen NoSpam2 %serverconsok2 %port.sock2
}
#################SUPPRESION PSEUDO BLACKLIST#################
alias supprnickblacklist {
if (%pseudoasuppr == $read(SocketAntiSpam\badnick.txt, w, %pseudoasuppr )) {
var %cheminaccesdell $+(socketantispam\badnick\,$left(%pseudoasuppr,1),\,$left(%pseudoasuppr,2),.txt)
if ($read(%cheminaccesdell,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) %cheminaccesdell }
if ($read(SocketAntiSpam\badnick.txt ,w,$+(%pseudoasuppr))) { write $+(-dl,$readn) SocketAntiSpam\badnick.txt | echo -a 4 %pseudoasuppr Retiré de la Blacklist }
}
else { echo -a 4 %pseudoasuppr non trouvé dans la blacklist }
}
############ARRETER SOCKET################
alias stopsocket {
hfree -w basedetect*
.timercyclesock off | .timerenvoidiff off | .timerrepalesock off | .timerrepalesock2 off
sockclose NoSpam | sockclose NoSpam2 | set %socket.actif non | set %socket2.actif non
echo -t @Socket.Antispam 5Socket déconnecté de %serverconsok ! | echo -t @Socket.Antispam2 5Socket déconnecté de %serverconsok2 !
}
########################FAIRE JOIN LE SOCKET AUX CHANS ENREGISTRE#########################
alias socknospamjoin {
set %nbchanjoinsocket $lines(socketantispam\configs-socket\chan.txt) | set %numduchan 1
while (%nbchanjoinsocket >= %numduchan) { sockwrite -n NoSpam JOIN $read(socketantispam\configs-socket\chan.txt,%numduchan) | inc %numduchan }
}
#########################VOIR LISTE SALONS SOUS SURVEILLANCE#################
alias viewchanlook {
set %viewnbchanjoinsocket $lines(socketantispam\configs-socket\chan.txt) | set %numduchanview 1 | sockwrite -n NoSpam2 PRIVMSG %chandusocket : 3 Chans sous surveillance :
while (%viewnbchanjoinsocket >= %numduchanview) { sockwrite -n NoSpam2 PRIVMSG %chandusocket : $read(socketantispam\configs-socket\chan.txt,%numduchanview) | inc %numduchanview }
sockwrite -n NoSpam2 PRIVMSG %chandusocket : 3 Fin | halt
}
##########################PURGER IGNORE LISTE SPAM APRES SPAM##################
alias purgeignorelistapresspam {
if ($read(socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt,w,$+($1))) {
write $+(-dl,$readn) socketantispam\Fichiers-tampon\Ignorerspamapresdetect.txt
}
}
########################TESTER SUR DETECTION BLACKLIST###################################
alias testparblacklist { write socketantispam\Fichiers-tampon\tamponblacklist.txt $1 | write socketantispam\Fichiers-tampon\envoidiffblacklist.txt $1 $2 %chanblacklist }
alias envoidiffblack {
if ($len(%pseudxtest) >= 1) { ssock %chandusocket 12Xtest lancé sur4 %pseudxtest | sockwrite -n NoSpam PRIVMSG %pseudxtest : $read(socketantispam\Configs-socket\texte-ouverture-pv.txt) | echo -t @Socket.Antispam 12*Xtest* sur %pseudxtest | echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 $1 $+ 14 $+ > 7Salut | unset %pseudxtest }
if ($lines(socketantispam\Fichiers-tampon\envoidiffblacklist.txt) >= 1) {
var %pseudenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),1,32) | var %maskdenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),2,32) | var %chandenvoidiff $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),3,32)
write $+(-dl,1) socketantispam\Fichiers-tampon\envoidiffblacklist.txt
while ($lines(socketantispam\Fichiers-tampon\envoidiffblacklist.txt) >= 2) {
var %pseudenvoidiff [ %pseudenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),1,32) | var %maskdenvoidiff [ %maskdenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),2,32) | var %chandenvoidiff [ %chandenvoidiff ] $+ $chr(44) $+ $gettok($read(socketantispam\Fichiers-tampon\envoidiffblacklist.txt,1),3,32)
write $+(-dl,1) socketantispam\Fichiers-tampon\envoidiffblacklist.txt
}
if ($1 == %xpseudo) { halt }
.timer 1 15 timer15secondes %pseudenvoidiff %maskdenvoidiff %chandenvoidiff
.timer 1 180 timer180secondes %pseudenvoidiff %maskdenvoidiff %chandenvoidiff
}
}
alias timer15secondes {
ssock %chandusocket 12Xtest Blacklist 4 $1 7 ( $2 ) 3[ $3 ] | echo -t @Socket.Antispam 12*Xtest* 4Blacklisted 12 dans 3min sur $1 sur $3 | ssock $1 $read(socketantispam\Configs-socket\texte-ouverture-pv.txt)
.timer 1 10 sockwrite -n NoSpam PRIVMSG $1 : $read(socketantispam\configs-socket\cava.txt)
}
alias timer180secondes {
ssock $1 $read(socketantispam\Configs-socket\texte-ouverture-pv.txt)
.timer 1 5 ssock $1 $read(socketantispam\Configs-socket\cava.txt)
}
###################ENVOIE DES SPAM EN ECHO SUR CHAN SPECIFIE ET LANCER SOCKET#####################
on *:text:*:%chandusocket:{
if ($nick == %socket2.nick) && ($regex($1-,(Scanner\sSpam\snicklist\sterminé\ssur))) && ($timer(cyclesock).secs >= 180) && (%scanauto == on) && (%2iemscanfai == non) { set %2iemscanfai oui | var %nbchanpourscantot $numtok(%list.scan.salon,44) | var %nbchanpourscantot $rand(1, [ %nbchanpourscantot ] ) | .timer 1 60 msg %chandusocket %identcomm $+ scan $gettok(%list.scan.salon,%nbchanpourscantot,44) }
if ($gettok($nick,1,124) == %proprisock) || ($gettok($nick,1,124) isin $read(SocketAntiSpam\configs-socket\user.txt, w, $gettok(nick,1,124) )) {
if ($1 == [ %identcomm ] $+ lancersocket) { lancersocket }
}
var %kiparlesursock $gettok($nick,1,124)
if (*spam*n°* iswm $1-) && (%monjouet = off) && ($me ison %chanechosock) && (($nick = %socket.nick) || ($nick == %socket2.nick)) {
set %envoispamnospam $strip($remove($1-,$1,$2,<,>,%socket2.nick,%socket.nick))
if ($findtok(%listepasdireecho,$gettok(%envoispamnospam,1,32),1,32)) { halt }
set %listepasdireecho $addtok(%listepasdireecho,$gettok(%envoispamnospam,1,32),32)
if ($numtok(%listepasdireecho,32) > 5) { set %listepasdireecho $deltok(%listepasdireecho,1,32) }
if ($gettok(%envoispamnospam,1,32) == $read(socketantispam\fichiers-tampon\Fichiers-tampon\evitedoublonp0d.txt, w, $gettok(%envoispamnospam,1,32))) { halt }
write socketantispam\Fichiers-tampon\evitedoublonp0d.txt $gettok(%envoispamnospam,1,32)
msg %chanechosock %formatenvoiechospam %envoispamnospam 10 %sock.kline
.timer 1 60 vidertamponp0d $gettok(%envoispamnospam,1,32)
}
}
###################DIALOG CONFIG#####################
dialog Dialogue-antispam {
title "Socket-AntiSpam-By-ISoKa"
size -1 -1 158 167
option dbu
button "Annuler", 2, 30 150 37 12
button "OK", 9, 92 151 37 12, default ok
tab "Conn", 36, 5 2 148 142
box "Socket-Scan-Join", 37, 9 20 140 53, tab 36
box "Socket-Scan-Nicklist", 38, 10 77 139 56, tab 36
text "Server", 10, 18 28 59 11, tab 36 center
text "Port", 11, 95 28 38 12, tab 36 center
edit %port.sock, 4, 94 42 38 11, tab 36 center
text "Server", 12, 13 86 58 10, tab 36 center
text "Port", 13, 97 86 38 10, tab 36 center
edit %port.sock2, 5, 97 99 38 11, tab 36 center
combo 1, 17 42 60 50, tab 36 size drop
combo 3, 17 99 60 50, tab 36 size drop
button "Ajouter", 48, 17 56 29 12, tab 36
button "Supprimer", 49, 49 56 29 12, tab 36
button "Ajouter", 50, 17 113 29 12, tab 36
button "Supprimer", 51, 49 113 29 12, tab 36
tab "Confs", 39
text "Propietaire ", 14, 18 28 45 11, tab 39 center
text "Cycle déco\reco (en secondes)", 16, 89 31 45 18, tab 39 center
edit %proprisock, 6, 15 42 50 14, tab 39 center
edit %cyclesock, 8, 94 55 38 14, tab 39 center
text "Chan du Socket", 15, 15 61 48 12, tab 39 center
text "Nb pour mise en Ignore-List", 22, 91 78 43 16, tab 39 center
edit %nbfrazeignore, 23, 91 100 45 14, tab 39 center
edit %chandusocket, 7, 15 75 51 14, tab 39 center
text "Identifieur commandes", 18, 10 97 60 13, tab 39 center
edit %identcomm, 19, 20 113 38 14, tab 39 center
box "Basiques", 33, 8 19 67 121, tab 39
box "Avancées", 34, 78 19 70 121, tab 39
tab "Echos\Detect", 40
text "Si Faire echo des Spams trouvés Sur autre salon.", 20, 20 21 121 11, tab 40 center
edit %chanechosock, 21, 12 57 60 14, tab 40 center
edit %formatenvoiechospam, 24, 83 57 60 14, tab 40 center
text "Format envoi echo Format <pseudo> preuve du spam", 25, 77 39 69 17, tab 40 center
text "Salon pour echo", 17, 14 44 55 8, tab 40 center
box "Configs-Echo", 41, 9 33 140 45, tab 40
box "Détection", 52, 9 83 140 50, tab 40
combo 53, 16 94 127 50, tab 40 size drop
button "Ajouter", 54, 16 110 37 12, tab 40
button "Supprimer", 55, 106 110 37 12, tab 40
button "Reloader", 56, 62 118 37 12, tab 40
tab "Fichiers-Configs", 42
box "Utilisateurs", 43, 8 23 44 115, tab 42
button "Chans", 26, 14 42 31 12, tab 42
button "Users", 27, 14 74 31 12, tab 42
button "Raccourcis", 35, 14 107 31 12, tab 42
box "Configs-Socket", 44, 55 23 47 115, tab 42
button "Phrases", 31, 61 42 34 12, tab 42
button "Pseudos", 30, 61 74 34 12, tab 42
button "Open-PV", 32, 61 107 34 12, tab 42
box "Configs-Scan", 45, 105 23 45 115, tab 42
button "Ignore-List", 29, 111 42 34 12, tab 42
button "Black-List", 28, 111 64 34 12, tab 42
button "Base-Debut", 46, 111 87 34 12, tab 42
button "Base-fin", 47, 111 107 34 12, tab 42
}
ON *:DIALOG:Dialogue-Antispam:*:*:{
if ($devent == init) {
echo -a 4 Configuration Socket Antispam | var %sersock 1 | affaddspe
while ( %sersock <= $len(%list.ser.sock) ) {
if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
}
}
if ($devent == sclick) {
if ($did == 2) { dialog -x Dialogue-Antispam Dialogue-Antispam | echo -a 4 Fermeture menu configuration Antispam }
if ($did == 30) { run socketantispam\configs-socket\socketnick.txt }
if ($did == 28) { run socketantispam\badnick.txt }
if ($did == 31) { run socketantispam\configs-socket\socket.txt }
if ($did == 27) { run socketantispam\configs-socket\user.txt }
if ($did == 29) { run socketantispam\ignore.txt }
if ($did == 26) { run socketantispam\configs-socket\chan.txt }
if ($did == 32) { run socketantispam\configs-socket\texte-ouverture-pv.txt }
if ($did == 35) { run socketantispam\configs-socket\setchan.txt }
if ($did == 46) { run socketantispam\configs-socket\basedetect.txt }
if ($did == 47) { run socketantispam\configs-socket\basedetectfin.txt }
if ($did == 48) || ($did == 50) {
set %list.ser.sock %list.ser.sock $+ $$?="Rajouter Un Server" $+ $chr(44) | did -r Dialogue-Antispam 1 | did -r Dialogue-Antispam 3 | var %sersock 1
while ( %sersock <= $len(%list.ser.sock) ) {
if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
}
unset %transfersock
}
if ($did == 49) || ($did == 51) {
if ($did(1).seltext) { set %list.ser.sock $remove(%list.ser.sock, [ $did(1).seltext ] $+ $chr(44)) }
elseif ($did(3).seltext) { set %list.ser.sock $remove(%list.ser.sock, [ $did(3).seltext ] $+ $chr(44)) }
did -r Dialogue-Antispam 1 | did -r Dialogue-Antispam 3 | var %sersock 1
while ( %sersock <= $len(%list.ser.sock) ) {
if ( $mid(%list.ser.sock,%sersock,1) == $chr(44) ) { did -a Dialogue-antispam 1 %transfersock | did -a Dialogue-antispam 3 %transfersock | unset %transfersock | inc %sersock }
set %transfersock %transfersock $+ $mid(%list.ser.sock,%sersock,1) | inc %sersock
}
unset %transfersock
}
if ($did == 54) {
var %adressetoadd $$?="Rajouter Une detection"
if ($right(%adressetoadd,4) == .com) && ($read(socketantispam\configs-socket\confdetect.txt,1)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,1),$left(%adressetoadd,-4),124) | write -l1 socketantispam\configs-socket\confdetect.txt %adressearajou }
elseif ($right(%adressetoadd,4) == .org) && ($read(socketantispam\configs-socket\confdetect.txt,2)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,2),$left(%adressetoadd,-4),124) | write -l2 socketantispam\configs-socket\confdetect.txt %adressearajou }
elseif ($right(%adressetoadd,3) == .fr) && ($read(socketantispam\configs-socket\confdetect.txt,3)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,3),$left(%adressetoadd,-3),124) | write -l3 socketantispam\configs-socket\confdetect.txt %adressearajou }
elseif ($right(%adressetoadd,5) == .c.la) && ($read(socketantispam\configs-socket\confdetect.txt,4)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,4),$left(%adressetoadd,-5),124) | write -l4 socketantispam\configs-socket\confdetect.txt %adressearajou }
elseif ($right(%adressetoadd,4) == .net) && ($read(socketantispam\configs-socket\confdetect.txt,5)) { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,5),$left(%adressetoadd,-4),124) | write -l5 socketantispam\configs-socket\confdetect.txt %adressearajou }
else { var %adressearajou $addtok($read(socketantispam\configs-socket\confdetect.txt,6), [ %adressetoadd ] ,124) | write -l6 socketantispam\configs-socket\confdetect.txt %adressearajou }
majdetectspe
}
if ($did == 55) {
var %adressetodel $did(53).seltext
if ($right(%adressetodel,4) == .com) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,1) ] , [ %adressetodel ] ,1,124) | write -l1 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
elseif ($right(%adressetodel,4) == .org) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok($read(socketantispam\configs-socket\confdetect.txt,2), [ %adressetodel ] ,1,124) | write -l2 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
elseif ($right(%adressetodel,3) == .fr) { var %adressetodel $left(%adressetodel,-3) | var %ligneaddtodel $remtok($read(socketantispam\configs-socket\confdetect.txt,3), [ %adressetodel ] ,1,124) | write -l3 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
elseif ($right(%adressetodel,5) == .c.la) { var %adressetodel $left(%adressetodel,-5) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,4), [ %adressetodel ] ,1,124) | write -l4 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
elseif ($right(%adressetodel,4) == .net) { var %adressetodel $left(%adressetodel,-4) | var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,5), [ %adressetodel ] ,1,124) | write -l5 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
else { var %ligneaddtodel $remtok( [ $read(socketantispam\configs-socket\confdetect.txt,6) ] , [ %adressetodel ] ,1,124) | write -l6 socketantispam\configs-socket\confdetect.txt %ligneaddtodel }
majdetectspe
}
if ($did == 56) { majdetectspe }
if ($did == 9) {
if (($did(1).seltext) && ($did(1).seltext != %serverconsok)) || (%serverconsok != $null) {
if (%serverconsok == $null) && ($did(1).seltext == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un server pour le socket pour scan | halt }
if ($did(1).seltext) { set %serverconsok $did(1).seltext | echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 $did(1).seltext }
}
if (!$did(1).seltext) { echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 %serverconsok }
if (($did(4)) && ($did(4) != %port.sock)) || (%port.sock != $null) {
if ($did(4) !isnum) && (%port.sock == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le port du Socket pour join | halt }
if (%port.sock == $null) && ($did(4) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un port pour le socket sur join | halt }
if ($did(4)) { set %port.sock $did(4) | echo -a 2Socket Antispam -----> 4 Le port pour le socket sur join est:3 $did(4) }
}
if (($did(3).seltext) && ($did(3).seltext != %serverconsok2)) || (%serverconsok2 != $null) {
if (%serverconsok2 == $null) && ($did(3).seltext == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un server pour le socket pour scan | halt }
if (!$did(3).seltext) { echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 %serverconsok2 }
}
if ($did(3).seltext) { set %serverconsok2 $did(3).seltext | echo -a 2Socket Antispam -----> 4 Le server pour le socket pour scan est:3 $did(3).seltext }
if (($did(5)) && ($did(5) != %port.sock2)) || (%port.sock2 != $null) {
if ($did(5) !isnum) && (%port.sock2 == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le port du Socket pour scan | halt }
if (%port.sock2 == $null) && ($did(5) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un port pour le socket pour scan | halt }
if ($did(5)) { set %port.sock2 $did(5) | echo -a 2Socket Antispam -----> 4 Le port pour le socket scan est:3 $did(5) }
}
if (($did(6)) && ($did(6) != %proprisock)) || (%proprisock != $null) {
if (%proprisock == $null) && ($did(6) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Pseudo pour le proprietaire du socket | halt }
if ($did(6)) { set %proprisock $did(6) | echo -a 2Socket Antispam -----> 4 Le Pseudo du proprietaire du socket est:3 $did(6) }
}
if (($did(7)) && ($did(7) != %chandusocket)) || (%chandusocket != $null) {
if (%chandusocket == $null) && ($did(7) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Salon pour le socket | halt }
if ($did(7)) { set %chandusocket $did(7) | echo -a 2Socket Antispam -----> 4 Le Salon du socket est:3 $did(7) }
}
if (($did(8)) && ($did(8) != %cyclesock)) || (%cyclesock != $null) {
if ($did(8) !isnum) && (%cyclesock == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le cycle de connection du socket | halt }
if (%cyclesock == $null) && ($did(8) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur pour le cycle de connection du socket | halt }
if ($did(8)) { set %cyclesock $did(8) | echo -a 2Socket Antispam -----> 4 Le cycle de connection du socket est de:3 $did(8) secondes }
}
if (($did(19)) && ($did(19) != %identcomm)) || (%identcomm != $null) {
if (%identcomm == $null) && ($did(19) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur pour le cycle de connection du socket | halt }
if ($did(19)) { set %identcomm $did(19) | echo -a 2Socket Antispam -----> 4 L'identifieur de commandes salon est:3 $did(19) }
}
if (($did(23)) && ($did(23) != %nbfrazeignore)) || (%nbfrazeignore != $null) {
if ($did(23) !isnum) && (%nbfrazeignore == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer une valeur numerique pour le nombre de phrases avant ignore | halt }
if (%nbfrazeignore == $null) && ($did(23) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un nombre de phrases avant d'ignorer un pseudo | halt }
if ($did(23)) { set %nbfrazeignore $did(23) | echo -a 2Socket Antispam -----> 4 Pseudos mis en Ignore-List aprés:3 $did(23) phrases }
}
if (($did(21)) && ($did(21) != %chanechosock)) || (%chanechosock != $null) {
if (%chanechosock == $null) && ($did(21) == $null) { echo -a 2Socket Antispam -----> 4 Veuillez rentrer un Salon pour repercuter vos spams | halt }
if ($did(21)) { set %chanechosock $did(21) | echo -a 2Socket Antispam -----> 4 Le Salon pour repercuter vos spams est:3 $did(21) }
}
if ($did(24)) { set %formatenvoiechospam $did(24) | echo -a 2Socket Antispam -----> 4 Le Format de vos repercutions de Spam est: $did(24) <pseudo> preuve-de-spam }
echo -a 4 Fermeture menu configuration Antispam | dialog -x Dialogue-Antispam Dialogue-Antispam
}
}
}
alias majdetectspe {
var %cmptaddadress 1
if (%detectspe) { unset %detectspe }
while (6 >= %cmptaddadress) {
set %detectspe [ [ %detectspe ] $+ [ [ $chr(40) ] $+ [ $replace($read(socketantispam\configs-socket\confdetect.txt,%cmptaddadress),?,.,*,((.+)?),\,\\,.,\.,/,\/,((\.+)?),((.+)?)) ] $+ [ $chr(41) ] ] ]
if (%cmptaddadress == 1) { set %detectspe [ %detectspe ] $+ [ (\.com)| ] }
if (%cmptaddadress == 2) { set %detectspe [ %detectspe ] $+ [ (\.org)| ] }
if (%cmptaddadress == 3) { set %detectspe [ %detectspe ] $+ [ (\.fr)| ] }
if (%cmptaddadress == 4) { set %detectspe [ %detectspe ] $+ [ (\.c\.la)| ] }
if (%cmptaddadress == 5) { set %detectspe [ %detectspe ] $+ [ (\.net)| ] }
inc %cmptaddadress
}
set %detectspe [ $chr(47) ] $+ [ $chr(40) ] $+ [ %detectspe ] $+ [ $chr(41) ] $+ [ $chr(47) ] $+ [ $chr(105) ]
if ($dialog(Dialogue-antispam)) { affaddspe }
}
alias affaddspe {
did -r Dialogue-antispam 53
var %cptaffadd 1
while (6 >= %cptaffadd) {
var %lignepraffadd $read(socketantispam\configs-socket\confdetect.txt, [ %cptaffadd ] ) | var %nbtokaffadd $numtok(%lignepraffadd,124) | var %cpttokaffadd 1
while (%nbtokaffadd >= %cpttokaffadd) {
if (%cptaffadd == 1) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .com ] }
if (%cptaffadd == 2) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .org ] }
if (%cptaffadd == 3) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .fr ] }
if (%cptaffadd == 4) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .c.la ] }
if (%cptaffadd == 5) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] $+ [ .net ] }
if (%cptaffadd == 6) { did -a Dialogue-antispam 53 [ $gettok(%lignepraffadd,%cpttokaffadd,124) ] }
inc %cpttokaffadd
}
inc %cptaffadd
}
}
###################AVERT PROPRI SOCK################
alias avertproprisock {
var %nombre-valentine $nick(%chandusocket,0) | var %compteurval 1
while (%nombre-valentine >= %compteurval) {
if ( [ %proprisock ] $+ * iswm $nick(%chandusocket,%compteurval)) { set %isokaval $nick(%chandusocket,%compteurval) | return %isokaval | halt }
else { inc %compteurval }
}
}
####################DIRE LES REPONSES ALEATOIRES AUX GENS QUI PARLENT AU SOCKET#####################
alias repalesock {
if (%pseudopourrepalecosck) { set %socket.phrase $lower($read(SocketAntiSpam\Configs-socket\socket.txt)) | sockwrite -n NoSpam PRIVMSG %pseudopourrepalecosck : %socket.phrase | echo -t @Socket.Antispam 14<1 $+ %socket.nick ->3 [ %pseudopourrepalecosck ] $+ 14> 7 [ %socket.phrase ] | unset %pseudopourrepalecosck }
}
####################TEST ON JOIN#####################
alias testblacklistjoin {
var %pseudopourblacklist = $1 | var %pseudoblackrem $remove(%pseudopourblacklist,-,_,],[) | var %cheminaccestestignore2 $+(socketantispam\ignore\,$left(%pseudopourblacklist,1),\,$left(%pseudopourblacklist,2),.txt)
if ($1 == $read(SocketAntiSpam\Fichiers-tampon\tamponblacklist.txt, w, $1)) || ($regex($1,%1ertestscan)) || (($isfile( %cheminaccestestignore2) == $true) && ($gettok(%pseudopourblacklist,1,124) isin $read(%cheminaccestestignore2, w, $gettok(%pseudopourblacklist,1,124)))) { halt }
var %cheminaccestest $+(socketantispam\badnick\,$left(%pseudopourblacklist,1),\,$left(%pseudopourblacklist,2),.txt)
if (%pseudopourblacklist isin $read(%cheminaccestest, w, %pseudopourblacklist)) { testparblacklist %pseudopourblacklist Pseudo-Exact | halt }
elseif ($hget(basedetect,$left($remove(%pseudopourblacklist,-,_,],[),2))) && ($regex(%pseudoblackrem,$hget(basedetect,$left($remove(%pseudopourblacklist,-,_,],[),2)))) { testparblacklist %pseudopourblacklist $regml(1) | halt }
elseif ($regex(%pseudoblackrem,$hget(basedetect,fin))) { testparblacklist %pseudopourblacklist $regml(1) | halt }
}
Conclusion
pour l'instal vous le mettez à la racine du script puis : /load -rs sockets-antispam\socketantispam.txt
Il y a surement des ameliorations possible mais j'ai jamais eu le courage de le reprendre depuis le début pour optimiser le code pck c'est un peu lourd :)
Historique
- 26 juin 2007 16:07:13 :
- nettoyage du zip en supprimant des fichiers qui servaient à rien dedans :)
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
AntiSpam [ par chez_moe ]
Salut les boys , J'ai un leger probleme de spambot sur Undernet pis le seul anti-spam génial que j,ai trouver c'est celui de JHD "socket anti spa
Probleme de link socket ... [ par com8nico ]
Bonjour tout le monde , je voudrais savoir comment connecté plusieurs socket sur un seul link (pour unreal) car quand j'esseye d'e
Question sur les socket [ par n0man ]
Bonjour,Actuelment je suis sur le projet d' un socket Bot, et je me demandais comment repondre au CTCP version car sur certain serveur ne pas repondr
svp aidez moi pour socket news [ par nocomment ]
Bonjour je cherche désésperement une remote sur plein de site qui serai capable de dire les news sur un canal en tapant par exemple !news sur le gener
aide pour une cmd [ par Requiem_Goth ]
Bonjour, je débute dans le scripting, j'ai un niveau assez faible malheuresement mais jsp un jour y arriver... voila je pose ma question donc lolje po
socket-pingpong [ par samsungman ]
bijour je voudré savoir koment ne pas se faire deconecté a chaque foi kon ce connect a un server ?
Fermeture pv automatique [ par kishkaya ]
bon ben voila je crée un bot pour mon salon et les gens vienne lui parler pour se log (oui tout le monde se log ^^) ou pour enregistrer des blaue ou d
Commandes en +b +k etc ... [ par fyltum ]
J'ai fait un petit remote (avec l'aide du forum) et je voudrai que vous me disiez si c'est bien ou non et j'ai une question :Comment bannir quelqu'un
Commandes en +b +k etc ... [ par fyltum ]
Voila j'ai un peu amélioré mon remote de commandes en +, je ne sais pas si tout est fini mais si vous pouviez me dire ce qu'il ne va pas parce qu'il m
Un bot de base [ par fyltum ]
Bonjour, quelqu'un ne connaitrait pas un bot de base qui contienne les commandes genre !op et !kick et sans phrases boulettes quand on parle merci :)
|
Derniers Blogs
CSS CONTENT STATE SELECTORS (PERSONNAL DRAFT)CSS CONTENT STATE SELECTORS (PERSONNAL DRAFT) par FREMYCOMPANY
Bonjour à tous, Je viens de publier une proposition comprenant 5 pseudo-classes pour le CSS Working Group ayant trait à l'état de chargement d'un élément (ex: IMG,VIDEO,AUDIO,OBJECT pour l'HTML.). Si le c½ur vous en dit, vous pouvez retrouver cette p...
Cliquez pour lire la suite de l'article par FREMYCOMPANY MBA : POURQUOI FAIRE ET COMMENT LE CHOISIR ?MBA : POURQUOI FAIRE ET COMMENT LE CHOISIR ? par ROMELARD Fabrice
Formation initiale Durant la formation, le découpage classique est le suivant (je donnerai les équivalences Suisse lorsque je les connaîtrais) : Ecole primaire jusqu'au Collège : Formation générale permettant d'obtenir les méthodes...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice Y'A DES ERREURS QUI PEUVENT RENDRE LE DéVELOPPEUR VIOLENTY'A DES ERREURS QUI PEUVENT RENDRE LE DéVELOPPEUR VIOLENT par Aleks
Quand on a ce genre d'erreur sans log :
Et bas on a juste envie de choper le gas de Microsoft qu'a développé ça et lui foutre des baffes de Coboye ! ...
Cliquez pour lire la suite de l'article par Aleks [HYPER-V 3] PRéSENTATION DES COMMANDLETS POWERSHELL[HYPER-V 3] PRéSENTATION DES COMMANDLETS POWERSHELL par Pierrick CATRO-BROUILLET
Avec la sortie prochaine de la Beta Consumer Preview de Windows 8, j'avais envie de revenir sur une des fonctionnalités que j'attends le plus et que, en bon geek que je suis, j'utilise déjà : Hyper-V 3 ainsi son module PowerShell.
Il y a déjà pléthor...
Cliquez pour lire la suite de l'article par Pierrick CATRO-BROUILLET IIS7 - COMPRESSION GZIPIIS7 - COMPRESSION GZIP par cyril
La compression GZIP permet d'améliorer les performances de navigation en compressant ce qu'envoie le serveur à un client. Pour comprendre comment cela fonctionne, regardons ce qu'il se passe au niveau HTTP lorsqu'un client tente d'accéder à une ress...
Cliquez pour lire la suite de l'article par cyril
Forum
RE : AIDERE : AIDE par Nico26000
Cliquez pour lire la suite par Nico26000 RE : AIDERE : AIDE par WorldDMT
Cliquez pour lire la suite par WorldDMT AIDEAIDE par Nico26000
Cliquez pour lire la suite par Nico26000
Logiciels
Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning Academy System (17.1.3.0)ACADEMY SYSTEM (17.1.3.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|