ANTI Advertising
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

ANTI Advertising

Started by NightLitch, 29 January, 2004, 00:00:58

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NightLitch

This must be one of the better advertising bots...

Verify taken from Lucifer.

-- * * * NXS-3 Advertising Part * * *
-- By: NightLitch 2004/02/10
---------------------------------------------------
-- Verify Function from Lucifer.
---------------------------------------------------

-- Set BotName
BotName = "-NXS-3-" 

-- Set HubAddress that will be shown instead of the ADVER advertising's.
HubAddress = "address.myftp.org"

-- Ok Hubs that are allowed to be entered in hub
OKHUBS = { 
	["acelit.dyndns.org"] = 1, 
	["swenorth1.myftp.org"] = 1, 
	["swenorth2.myftp.org"] = 1, 
}

-- Advertising Trigs
ADVER = {
["myftpsite"]=1,["dns2go"]=2,["ip.com"]=3,["pornstarguru.com/page.php?x=37516&m=3"]=4,["ip.org"]=5,["ip.biz"]=6,["dynip.com"]=7,["d2g.com"]=8,["dyndns.org"]=9,["dynu.com"]=10,
["mine.org"]=11,["kick-ass.net"]=12,["darkdata.net"]=13,["ipme.net"]=14,["udgnet.com"]=15,["sytes.net"]=16,["d2g.biz"]=17,["homeip.net"]=18,["mine.nu"]=19,["depecheconnect.com"]=20,
["e-net.lv"]=21,["newgnr.com"]=22,["serveftp.com"]=23,["evildc.com"]=24,["bst.net"]=25,["bsd.net"]=26,["ods.org"]=27,["dnsalias.org"]=28,["x-host.net"]=29,["x-host.org"]=30,
["bounceme.net"]=31,["myvnc.com"]=32,["sytes.net"]=33,["xs4all.net"]=34,["xs4all.nl"]=35,["kyed.com"]=36,["finx.org"]=37,["ath.cx"]=38,["sheckie.net"]=39,["vizvaz.net"]=40,
["servebeer.com"]=41,["65.61.153.217/page.php?x=906228"]=42,["kicks-ass.com"]=43,["nerdcamp.net"]=44,["gotdns.org"]=45,["homeip.net"]=46,["cicileu.org"]=47,["cicileu.com"]=48,["3utilities.com"]=49,["bounceme.net"]=50,
["myftp.biz"]=51,["myftp.org"]=52,["myvnc.com"]=53,["no-ip.biz"]=54,["no-ip.com"]=55,["no-ip.info"]=56,["no-ip.org"]=57,["redirectme.net"]=58,["servebeer.com"]=59,["servecounterstrike.com"]=60,
["serveftp.com"]=61,["servegame.com"]=62,["servehalflife.com"]=63,["servehttp.com"]=64,["serveirc.com"]=65,["servemp3.com"]=66,["servepics.com"]=67,["servequake.com"]=68,["sytes.net"]=69,["zapto.org"]=70,
["ciscofreak.com"]=71,["damnserver.com"]=72,["ditchyourip.com"]=73,["dnsiskinky.com"]=74,["geekgalaxy.com"]=75,["net-freaks.com"]=76,["no-ip.ca"]=77,["no-ip.co.uk"]=78,["no-ip.net"]=79,["point2this.com"]=80,
["securityexploits.com"]=81,["securitytactics.com"]=82,["servehumour.com"]=83,["servep2p.com"]=84,["servesarcasm.com"]=85,["stufftoread.com"]=86,["unusualperson.com"]=87,["workisboring.com"]=88,["hopto"]=89,["pornstarguru.com"]=90,
[".se"]=91
} 

-- Acceptable trigs
SITES = { "www.","http://","ftp://","irc.","cs." }

--DON'T EDIT FROM HERE--

tabAdvert = {}

function Main()
	frmHub:RegBot(BotName)
end

function SiteCheck(msg)
	for value,index in SITES do
		if strfind(msg,index) then
			return 1
		end
	end
end

function FindAdver(adver)
	for v2,i2 in OKHUBS do
		if strfind(adver,v2) then
			return "K"
		end
	end
end

function DataArrival(curUser, data) 
	if ( strsub(data, 1, 1) == "<" )  then
		if not curUser.bOperator then
			local _, _, msg = strfind(data, "^%b<>%s+(.*)|")
			if SiteCheck(msg)==1 then
				return 0
			else
				if Verify(curUser.sName, msg) then
					local Lines = Verify(curUser.sName, msg)
					tabAdvert = nil
					tabAdvert = {}
					local s,e, adver = strfind(Lines, "[^#]#(%S+)$")
					if (FindAdver(adver) == "K") then
					return 0
					else
						curUser:SendPM(BotName,"Advertising Censored, sorry.")
						SendToOps("",curUser.sName.." is advertising, typing: "..msg)
						return 1
					end
				end
			end
			spam = 0
			if( strfind( strlower(data), "no",1,1) ) and ( strfind( strlower(data), "ip",1,1) ) then
				if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
			spam=spam+1; end; end;
			if( strfind( strlower(data), "my",1,1) ) and ( strfind( strlower(data), "ftp",1,1) ) then
				if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
			spam=spam+1; end; end;
			if( strfind( strlower(data), "dns",1,1) ) and ( strfind( strlower(data), "2",1,1) ) and ( strfind( strlower(data), "go",1,1) ) then
			spam=spam+1; end
			if( strfind( strlower(data), "dy",1,1) ) and ( strfind( strlower(data), "nu",1,1) ) then
				if( strfind( strlower(data), ".net",1,1) ) or ( strfind( strlower(data), ".com",1,1) ) then
			spam=spam+1;end; end
			if( strfind( strlower(data), "d n s a",1,1) ) or ( strfind( strlower(data), "d n s .",1,1) ) or ( strfind( strlower(data), "d n s 2",1,1) ) or ( strfind( strlower(data), "o d s .",1,1) ) or ( strfind( strlower(data), "d y n",1,1) ) then
			spam=spam+1;end
			if spam>0 then
				s,e,msg = strfind(data, "%b<> (.*)")
				curUser:SendPM(BotName,"Advertising Censored, sorry.")
				SendToOps("",curUser.sName.." is advertising, typing: "..msg)
			end
		end
	elseif ( strsub(data, 1, 4) == "$To:" ) then
		local s,e,to,text = strfind(data,    "%$To:%s(%S+)%sFrom:%s%S+%s$(.*)$")
		if(to == nil) then return 0 end
		to = GetItemByName(to)
		if not curUser.bOperator then
			local _, _, msg = strfind(data, "^%b<>%s+(.*)|")
			if SiteCheck(msg)==1 then
				return 0
			else
				if Verify(curUser.sName, msg) then
					local Lines = Verify(curUser.sName, msg)
					tabAdvert = nil
					tabAdvert = {}
					local s,e, adver = strfind(Lines, "[^#]#(%S+)$")
					if (FindAdver(adver) == "K") then
					return 0
					else
						curUser:SendPM(BotName,"Advertising Censored, sorry.")
						SendToOps("",curUser.sName.." is advertising, typing: "..msg)
						return 1
					end
				end
			end
			spam = 0
			if( strfind( strlower(data), "no",1,1) ) and ( strfind( strlower(data), "ip",1,1) ) then
				if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
			spam=spam+1; end; end;
			if( strfind( strlower(data), "my",1,1) ) and ( strfind( strlower(data), "ftp",1,1) ) then
				if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
			spam=spam+1; end; end;
			if( strfind( strlower(data), "dns",1,1) ) and ( strfind( strlower(data), "2",1,1) ) and ( strfind( strlower(data), "go",1,1) ) then
			spam=spam+1; end
			if( strfind( strlower(data), "dy",1,1) ) and ( strfind( strlower(data), "nu",1,1) ) then
				if( strfind( strlower(data), ".net",1,1) ) or ( strfind( strlower(data), ".com",1,1) ) then
			spam=spam+1;end; end
			if( strfind( strlower(data), "d n s a",1,1) ) or ( strfind( strlower(data), "d n s .",1,1) ) or ( strfind( strlower(data), "d n s 2",1,1) ) or ( strfind( strlower(data), "o d s .",1,1) ) or ( strfind( strlower(data), "d y n",1,1) ) then
			spam=spam+1;end
			if spam>0 then
				s,e,msg = strfind(data, "%b<> (.*)")
				curUser:SendPM(BotName,"Advertising Censored, sorry.")
				SendToOps("",curUser.sName.." is advertising, typing: "..msg)
			end
		end
	end
end 

function Verify(userdata, msg)
	if not msg then return end
	tmp =""
	gsub(strlower(msg), "([a-?0-9.:%-])", function(x) tmp = tmp..x end)
	if not tabAdvert[userdata] then
		tabAdvert[userdata] = { iClock = clock(), l1 = "", l2 = "", l3 = "", l4= "", l5= "",l6= "",l7= "",l8= "",l9 = tmp}
	else
		tabAdvert[userdata].iClock = clock()
		tabAdvert[userdata].l1 = tabAdvert[userdata].l2
		tabAdvert[userdata].l2 = tabAdvert[userdata].l3
		tabAdvert[userdata].l3 = tabAdvert[userdata].l4
		tabAdvert[userdata].l4 = tabAdvert[userdata].l5
		tabAdvert[userdata].l5 = tabAdvert[userdata].l6
		tabAdvert[userdata].l6 = tabAdvert[userdata].l7
		tabAdvert[userdata].l7 = tabAdvert[userdata].l8
		tabAdvert[userdata].l8 = tabAdvert[userdata].l9
		tabAdvert[userdata].l9 = tmp
	end
	local Lines = tabAdvert[userdata].l1.."#"..tabAdvert[userdata].l2.."#"..tabAdvert[userdata].l3.."#"..tabAdvert[userdata].l4.."#"..tabAdvert[userdata].l5.."#"..tabAdvert[userdata].l6.."#"..tabAdvert[userdata].l7.."#"..tabAdvert[userdata].l8.."#"..tabAdvert[userdata].l9
	for value, key in ADVER do
		if (strfind(Lines, strlower(value), 1, 1)) then
			return Lines
		end
	end
end

Hope you all like it.


//NL

plop

cool but eehm, you send the text that the user has been banned.?
now i can be needing a liter of coffee or i just don't see the actual ban??
not a bad thing as i hate scripts banning for this, more fun 2 alter it so there advertising is useless.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

NightLitch

hehe forgot the banning part.... haha
//NL

NightLitch

About the Ban Thing!

I have made it so it only bans the addresses in BADHUBS
witch is good I think otherwise it just exange the advertising message to hubaddress"message".

I think this is a great solusion.

But gonna w8 and see what you make up later...

have a good one guys.
//NL

plop

check the new crazy bot 2 get an idea of whats gone happen on the new sneaky anti advertising.
but don't wait for me, would like 2 see you enhance/optimize this 1.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

NightLitch

k, m8. gonna check it out. And I will try optimize it. have implent it in my BC now to so...
//NL

NightLitch

Check first post... that must be good right.
//NL

jiten

i've tried the anti advertiser, but, when i type the trigs in pvt, they pass and aren't censored.

NightLitch

Update will come l8r. There is some bugs. I have fixed them in my NXS-3. but not here.
//NL

SMF spam blocked by CleanTalk