sneaky 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

sneaky anti advertising

Started by plop, 21 December, 2003, 20:56:27

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plop

makes spammers work for you.
instead of stopping the advert it replaces the url for you own  hub/website url(s).
-- sneaky anti advertising bot by plop
-- it replaces the url's users post for your own.   lol
-- let them work for you, instead of against you
-- thx again for the hints from rabidwombat


WEBSITE = "http://www.dcvikings.com/~goldenangel/"
HUBADRESS ="goldenangel.no-ip.org"

OKSITES = { ["www.plop.nl"] = 1, ["www.dcvikings.com"] = 1 }

OKHUBS = { ["tga-darkstar.no-ip.com"] = 1, ["goldenangel.no-ip.org"] = 1, ["tga-norge.2waky.com"] = 1}

function DataArrival(user, data)
   if user.iProfile == -1 or user.iProfile == 3 then
      if (strsub(data, 1, 1) == "<") then
      --if not(strsub(data, 1, 4) == "$To:") then 
         data = strsub(data, 1, (strlen(data)-1))
         local s,e,msg,webadver,msg2 = strfind(data, "%b<>%s(.*)http://([^%.]+%.[^%.]+%.%S+)(.*)$")
         if webadver ~= nil then 
            local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
            if webby == nil then webby = webadver end
            if OKSITES[webby] == nil then
               SendToAll(user.sName, msg..WEBSITE..msg2)
               return 1
            end
         else 
            local s,e,msg,webadver,msg2 = strfind(data, "%b<>%s(.*)(www+%.[^%.]+%.%S+)(.*)$")
            if webadver ~= nil then
               local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
               if webby == nil then webby = webadver end
               if OKSITES[webby] == nil then
                  SendToAll(user.sName, msg..WEBSITE..msg2)
                  return 1
               end
            else
               local s,e, adver = strfind(data, "%b<>%s(%S+%.[^%.]+%.[^%.]+)")
               if adver ~= nil then 
                  local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                  if hubby == nil then hubby = adver end
                  if OKHUBS[hubby] == nil then
                     SendToAll(user.sName, HUBADRESS)
                     return 1
                  end
               else
                  local s,e,msg,adver,msg2 = strfind(data, "%b<>%s(.*)%s([^%.]+%.[^%.]+%.%S+)(.*)$")
                  if adver ~= nil then 
                     local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                     if hubby == nil then hubby = adver end
                     if OKHUBS[hubby] == nil then
                        SendToAll(user.sName, msg.." "..HUBADRESS..msg2)
                        return 1
                     end
                  end
               end
            end
         end
      else
         --local s,e,to,text = strfind(data, "%$To: (%S+) From: %S %$(.+)$") 
                            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 to.iProfile == -1 or to.iProfile == 3 then
            text = strsub(text, 1, (strlen(text)-1))
            local s,e,msg,webadver,msg2 = strfind(text, "%b<>%s(.*)http://([^%.]+%.[^%.]+%.%S+)(.*)$")
            if webadver ~= nil then 
               local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
               if webby == nil then webby = webadver end
               if OKSITES[webby] == nil then
                  SendPmToNick(to.sName, user.sName, msg..WEBSITE..msg2)
                  return 1
               end
            else 
               local s,e,msg,webadver,msg2 = strfind(text, "%b<>%s(.*)(www+%.[^%.]+%.%S+)(.*)$")
               if webadver ~= nil then
                  local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
                  if webby == nil then webby = webadver end
                  if OKSITES[webby] == nil then
                     SendPmToNick(to.sName, user.sName, msg..WEBSITE..msg2)
                     return 1
                  end
               else
                  local s,e, adver = strfind(text, "%b<>%s(%S+%.[^%.]+%.[^%.]+)")
                  if adver ~= nil then 
                     local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                     if hubby == nil then hubby = adver end
                     if OKHUBS[hubby] == nil then
                        SendPmToNick(to.sName, user.sName, HUBADRESS)
                        return 1
                     end
                  else
                     local s,e,msg,adver,msg2 = strfind(text, "%b<>%s(.*)%s([^%.]+%.[^%.]+%.%S+)(.*)$")
                     if adver ~= nil then 
                        local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                        if hubby == nil then hubby = adver end
                        if OKHUBS[hubby] == nil then
                           SendPmToNick(to.sName, user.sName, msg.." "..HUBADRESS..msg2)
                           return 1
                        end
                     end
                  end
               end
            end
         end
      end
   end
end
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 <----<<

Cyberia

haha, this is a good one.
lol
nice trick

acethecase

hehe nice one!!  :]  :D

BlazeXxX

#3
Good one indeed! Plop, is it possible to make something lot effective like lucifier script?

That checks even if they advertise like h t t p : / /
or
H
t
t
p
:
/
/

I think its possible cuz opiumvolage did it! It will be cool , if u cud implement or modify that to replace the adverts to work for us? if its too hard and time consuming, its ok leave it..

plop

QuoteOriginally posted by BlazeXxX
Good one indeed! Plop, is it possible to make something lot effective like lucifier script?

That checks even if they advertise like h t t p : / /
or
H
t
t
p
:
/
/

I think its possible cuz opiumvolage did it! It will be cool , if u cud implement or modify that to replace the adverts to work for us? if its too hard and time consuming, its ok leave it..
both are posible 2 add but got some other things 2 do 1st.
the whole script can be optimized and work even better.
the last 1 btw can take a bit of power/memory.

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 <----<<

Pedro

any chance of getting this script for hub addys only, I have no need for //http:// restriction..

Thanx in advance


HAPPY DAYS
if it aint broke, open it up and find out why...

Smulf

Good one plop... thanks:)
[Smulf]

plop

QuoteOriginally posted by Pedro
any chance of getting this script for hub addys only, I have no need for //http:// restriction..

Thanx in advance


HAPPY DAYS
not easy, that part in the script is actualy a bypase so it replaces them with your website instead of the hub url.
but soon gone update this script and gone try if i can solve it then.

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 <----<<

Pedro

thanx m8..


HAPPY DAYS
if it aint broke, open it up and find out why...

NightLitch

I find this bot doing and NOT doing it's job Plop.

when entering a speciall menings(lines) that are not even close
to advertising it reacts... this is a fix I would want. cause using it.

for ex: I posted a DC++ TAG in your hub and guess what...

Half the Tag was "censored" with your hub address...

otherwise I like this one better than Lucifer becouse of
the "bug" in Lucifer...

something to work on plop. :-)
//NL

plop

QuoteOriginally posted by NightLitch
I find this bot doing and NOT doing it's job Plop.

when entering a speciall menings(lines) that are not even close
to advertising it reacts... this is a fix I would want. cause using it.

for ex: I posted a DC++ TAG in your hub and guess what...

Half the Tag was "censored" with your hub address...

otherwise I like this one better than Lucifer becouse of
the "bug" in Lucifer...

something to work on plop. :-)
yep i seen it.
it responds 2 everything with enough dot's in it, even filenames can be filtered.
definatly time for a update.

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 <----<<

Pedro

Hey Plop,

Dont want to rush you, I know you got other projects BUT !!!

Any updates yet, I love this script but as you say if enough .......... in text then replaced with hub addy, I got users going daft and I am sitting back laffing at it.

Would be nice to get those other fixes  h u b . n o - i p . c o m , I got caught with that the other day..

Waiting patiently

HAPPY DAYS
if it aint broke, open it up and find out why...

Masta_Kein

HI Plop!!

Whats so sneaky about this anti pub???

NightLitch

QuoteMasta_Kein
   
HI Plop!!

Whats so sneaky about this anti pub???

Is change the advertising to your own address, hub.

The users work for you, not against you. :-)

/NL
//NL

Masta_Kein


kazi

it gets me errors :(

Syntax Error: function arguments expected;
  last token read: `=' at line 8 in string "code:----------------------------------------------------------..."


i am using version 0.3.2.6 testdrive4

anyon knows how i can solve this?

plop

QuoteOriginally posted by kazi
it gets me errors :(

Syntax Error: function arguments expected;
  last token read: `=' at line 8 in string "code:----------------------------------------------------------..."


i am using version 0.3.2.6 testdrive4

anyon knows how i can solve this?
seems 2 me you copyed 2 bit 2 much.
try it again but make sure you copy everything between the ---------------------------------------------------------------------- lines.

about the updates.
haven't done anything the last 2 weeks as my g/f was here.
now i'm a bit busy as i kinda managed 2 kill my laptop, and have a bunch of scripts 2 make for bcdc++.
so patients pls.

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 <----<<

SMF spam blocked by CleanTalk