PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: badtrip on 08 July, 2005, 14:11:34

Title: Antivirus
Post by: badtrip on 08 July, 2005, 14:11:34
hello,

This script is like one antivirus, disconect , kick  and ban the user if they have a virus on the dc++


-------portugues----------------
 -- antivirus v1.0
-- tradu??o e adapta??o por badtrip
-- implementa??o de op??es por zero-cool
-- Pvt's agora funcionam melhor
-- Ultima actualiza??o: 21/06/2005
---------ingles--------------------
-- antivirus v1.0
-- adaptation by badtrip
-- comands by zero-cool
-- upgrade in pm?s

sBot = "" -- Nome do Bot; deixar em branco para usar o Bot do Ptokax ( bot name )

email = "" -- Deixar em branco para pre-defeni??o do Hub ( email )

mdm = 3 -- Modo de mandar( sending mode): 1- Para o Main( to the main )  2- Para PVT ( pm mode )  3- Para o Main+PVT ( main and pm )
mdt = 1 -- Modo de fazer o user sair: ( comand to the user )1- disconnect  2- kick  3- ban  4- redirect
aop = 1 -- Avisar Operadores( send a msn to op?s ): 0- N?o(no)  1- Sim(yes)

msg = "\r\n\r\n *** ( your system have a virus go to the syte and clean the system )O teu sistema  DC++  est? infectado por um virus. Por favor vai a este syte para o limpares"
site = "\r\n *** [URL]http://www3.ca.com/securityadvisor/virusinfo/virus.aspx?id=40789[/URL] \r\n"

-- ## N?o mexer ## --  ## dont make changes ##
if email == "" then
   email = frmHub:GetHubBotEmail()
else
   email = email
end

if sBot == "" then
   sBot = frmHub:GetHubBotName()
else
   sBot = sBot
   frmHub:RegBot(sBot)
end

MyINFOArrival = function(curUser, sData)
   if string.find(curUser.sEmail, "myemail@host.com") or string.find(curUser.sName, "mynick") or string.find(curUser.sDescription, "none") then
   curUser:SendData("$MyINFO $ALL "..sBot.." $ $Bot$"..email.."$0$")
   if mdm == 1 then
      curUser:SendData(sBot, msg.." - "..site)
      curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)
         if mdt == 1 then
            curUser:Disconnect()
         end
         if mdt == 2 then
            curUser:TempBan()
         end
         if  mdt == 3 then
            curUser:Ban()
         end
         if mdt == 4 then
            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
         end
   end
   
   if mdm == 2 then
      SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)
         if mdt == 1 then
            curUser:Disconnect()
         end
         if mdt == 2 then
            curUser:TempBan()
         end
         if  mdt == 3 then
            curUser:Ban()
         end
         if mdt == 4 then
            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
         end
   end
   
   if mdm == 3 then
      curUser:SendData(sBot, msg.." - "..site)
      curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)
      SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)
         if mdt == 1 then
            curUser:Disconnect()
         end
         if mdt == 2 then
            curUser:TempBan()
         end
         if  mdt == 3 then
            curUser:Ban()
         end
         if mdt == 4 then
            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
         end
   end
   if aop == 1 then
   SendPmToOps(sBot, "O utilizador "..curUser.sName.." estava infectado, e por isso foi desligado.")
   end
   end
end


NewUserConnected = NewOpConnected
Title:
Post by: GeceBekcisi on 08 July, 2005, 15:32:29
Just another one:--// ------------------------------------------------------------------------------------------------------------ --
--// -  GeceBekcisi'nin yazdigi HubBekcisi s?r?m 0.5 ten alintidir
--// -  Stripped from HubBekcisi v0.5 by GeceBekcisi
--// ------------------------------------------------------------------------------------------------------------ --
--// -  Features: Simple Win32.Tibick detection
--// ------------------------------------------------------------------------------------------------------------ --
--------------------------------------------------------------------------------------------------------------------
--// Global Settings
--------------------------------------------------------------------------------------------------------------------
sBot = frmHub:GetHubBotName() -- Bot's Name ( leave so if you don't want to use a special name for your bot )
sRdAd = frmHub:GetRedirectAddress() -- Redirect address ( leave so if you want users to be redirected to the default redirect address )
sRedirect = "off" -- Redirect detected users ( on / off )
sInform = "on" -- Inform user why he was banned / disconnected ( on / off )
sFeed = "on" -- Feed about detected users ( on / off )
sFeedType = "OPS" -- "OPS" for Pm to ops, "NICK" for pm to specified nick below
sFeedNick = "Admin" -- Enter nick to send feeds if NICK selected above
sKickType = "BAN" -- "DSC" to disconnect user, "BAN" to timeban user for specified minutes below
iTimeBan = "60" -- TimeBan time in minutes if BAN selected above
--------------------------------------------------------------------------------------------------------------------
-- Some notes about Kick Type setting
-- Disconnecting may cause feed spam if a popular hub with feed turned on
-- TimeBanning fixes feed spam but may cause a slow hub because of huge banlist
--------------------------------------------------------------------------------------------------------------------
--// AntiVirus begins
--------------------------------------------------------------------------------------------------------------------
function MyINFOArrival(curUser, sData)
if curUser.sEmail and string.find(curUser.sEmail, "myemail@host.com") then
if sFeed == "on" then
if sFeedType == "OPS" then
SendPmToOps(sBot, "A user from IP "..curUser.sIP.." is trying to login with Win32.Tibick virus but stopped.")
else
SendPmToNick(sFeedNick, sBot, "A user from IP "..curUser.sIP.." is trying to login with Win32.Tibick virus but stopped.")
end
end
if sInform == "on" then
curUser:SendData(sBot, "Your DC++ system is infected by Win32.Tibick virus. Please clean it before entering our hub!")
curUser:SendData(sBot, "For more info double click: [URL]http://www3.ca.com/securityadvisor/virusinfo/virus.aspx?id=40789[/URL]")
end
if sRedirect == "on" then
curUser:Redirect(sRdAd, " Get an AntiVirus software! ")
end
if sKickType == "DSC" then
curUser:Disconnect()
else
curUser:TimeBan(iTimeBan)
end
return 1
end
end
--------------------------------------------------------------------------------------------------------------------
--// AntiVirus ends
--------------------------------------------------------------------------------------------------------------------
Note: Nick or description is not detected due to nick or description may change in favorite hubs settings but mail is global.
Title: English version
Post by: [?X?]???B?? on 08 July, 2005, 16:48:12
hello badtrip,please translate your version of
antivirus script to english  ;)
Title:
Post by: 7P-Darkman on 08 July, 2005, 18:53:40
Hello friends,


This link for the site is outdated...  

http://www3.ca.com/securityadvisor/virus...s.aspx?id=40789


They everybody knows of one other to make the clear?
Title:
Post by: GeceBekcisi on 08 July, 2005, 19:03:23
Click here (http://www3.ca.com/securityadvisor/virusinfo/virus.aspx?id=40789)
Title: antivirus
Post by: 7P-Darkman on 08 July, 2005, 19:06:58
Thanks, GeceBekcisi...

I see in your eyes !
Title:
Post by: GeceBekcisi on 08 July, 2005, 19:09:09
np m8, just have fun!
Title: cant rename the bot
Post by: ?Tr??T_???? on 21 July, 2005, 00:10:15
-------portugues----------------

 -- antivirus v1.0

-- tradu??o e adapta??o por badtrip

-- implementa??o de op??es por zero-cool

-- Pvt's agora funcionam melhor

-- Ultima actualiza??o: 21/06/2005

---------ingles--------------------

-- antivirus v1.0

-- adaptation by badtrip

-- comands by zero-cool

-- upgrade in pm?s



sBot = "" -- Nome do Bot; deixar em branco para usar o Bot do Ptokax ( bot name )



email = "" -- Deixar em branco para pre-defeni??o do Hub ( email )



mdm = 3 -- Modo de mandar( sending mode): 1- Para o Main( to the main )  2- Para PVT ( pm mode )  3- Para o Main+PVT ( main and pm )

mdt = 1 -- Modo de fazer o user sair: ( comand to the user )1- disconnect  2- kick  3- ban  4- redirect

aop = 1 -- Avisar Operadores( send a msn to op?s ): 0- N?o(no)  1- Sim(yes)



msg = "\r\n\r\n *** ( your system have a virus go to the syte and clean the system )O teu sistema  DC++  est? infectado por um virus. Por favor vai a este syte para o limpares"
site = "\r\n *** http://www3.ca.com/securityadvisor/virus...s.aspx?id=40789 \r\n"


-- ## N?o mexer ## --  ## dont make changes ##

if email == "" then

   email = frmHub:GetHubBotEmail()

else

   email = email

end



if sBot == "" then

   sBot = frmHub:GetHubBotName()

else

   sBot = sBot

   frmHub:RegBot(sBot)

end



MyINFOArrival = function(curUser, sData)

   if string.find(curUser.sEmail, "myemail@host.com") or string.find(curUser.sName, "mynick") or string.find(curUser.sDescription, "none") then

   curUser:SendData("$MyINFO $ALL "..sBot.." $ $Bot$"..email.."$0$")

   if mdm == 1 then

      curUser:SendData(sBot, msg.." - "..site)

      curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)

         if mdt == 1 then

            curUser:Disconnect()

         end

         if mdt == 2 then

            curUser:TempBan()

         end

         if  mdt == 3 then

            curUser:Ban()

         end

         if mdt == 4 then

            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")

         end

   end

   
   if mdm == 2 then

      SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)

         if mdt == 1 then

            curUser:Disconnect()

         end

         if mdt == 2 then

            curUser:TempBan()

         end

         if  mdt == 3 then

            curUser:Ban()

         end

         if mdt == 4 then

            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")

         end

   end

   
   if mdm == 3 then

      curUser:SendData(sBot, msg.." - "..site)

      curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)

      SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)

         if mdt == 1 then

            curUser:Disconnect()

         end

         if mdt == 2 then

            curUser:TempBan()

         end

         if  mdt == 3 then

            curUser:Ban()

         end

         if mdt == 4 then

            curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")

         end

   end

   if aop == 1 then

   SendPmToOps(sBot, "O utilizador "..curUser.sName.." estava infectado, e por isso foi desligado.")

   end

   end

end





NewUserConnected = NewOpConnected
Title:
Post by: Madman on 21 July, 2005, 05:48:31
Change this
sBot = "" -- Nome do Bot; deixar em branco para usar o Bot do Ptokax ( bot name )
To this...
sBot = "[color=red]BotName[/color]" -- Nome do Bot; deixar em branco para usar o Bot do Ptokax ( bot name )
Title: nope
Post by: ?Tr??T_???? on 21 July, 2005, 12:15:00
nope its not workin m8
Title:
Post by: GeceBekcisi on 21 July, 2005, 15:06:06
Give this a try:-------portugues----------------
-- antivirus v1.0
-- tradu??o e adapta??o por badtrip
-- implementa??o de op??es por zero-cool
-- Pvt's agora funcionam melhor
-- Ultima actualiza??o: 21/06/2005
---------ingles--------------------
-- antivirus v1.0
-- adaptation by badtrip
-- comands by zero-cool
-- upgrade in pm?s

sBot = "EnterHereYourBotName" -- Nome do Bot; deixar em branco para usar o Bot do Ptokax ( bot name )
email = "" -- Deixar em branco para pre-defeni??o do Hub ( email )
mdm = 3 -- Modo de mandar( sending mode): 1- Para o Main( to the main ) 2- Para PVT ( pm mode ) 3- Para o Main+PVT ( main and pm )
mdt = 1 -- Modo de fazer o user sair: ( comand to the user )1- disconnect 2- kick 3- ban 4- redirect
aop = 1 -- Avisar Operadores( send a msn to op?s ): 0- N?o(no) 1- Sim(yes)

msg = "\r\n\r\n *** ( your system have a virus go to the syte and clean the system )O teu sistema DC++ est? infectado por um virus. Por favor vai a este syte para o limpares"
site = "\r\n *** [URL]http://www3.ca.com/securityadvisor/virus...s.aspx?id=40789[/URL] \r\n"

-- ## N?o mexer ## -- ## dont make changes ##
if email == "" then
email = frmHub:GetHubBotEmail()
else
email = email
end

if sBot == "" then
sBot = frmHub:GetHubBotName()
else
sBot = sBot
end

function Main()
frmHub:RegBot(sBot)
end

MyINFOArrival = function(curUser, sData)
if string.find(curUser.sEmail, "myemail@host.com") or string.find(curUser.sName, "mynick") or string.find(curUser.sDescription, "none") then
curUser:SendData("$MyINFO $ALL "..sBot.." $ $Bot$"..email.."$0$")
if mdm == 1 then
curUser:SendData(sBot, msg.." - "..site)
curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)
if mdt == 1 then
curUser:Disconnect()
end
if mdt == 2 then
curUser:TempBan()
end
if  mdt == 3 then
curUser:Ban()
end
if mdt == 4 then
curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
end
end
if mdm == 2 then
SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)
if mdt == 1 then
curUser:Disconnect()
end
if mdt == 2 then
curUser:TempBan()
end
if  mdt == 3 then
curUser:Ban()
end
if mdt == 4 then
curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
end
end  
if mdm == 3 then
curUser:SendData(sBot, msg.." - "..site)
curUser:SendData(sBot, "Para mais informa??es ou duvidas contacta "..email)
SendPmToNick(curUser.sName, sBot, msg.." - "..site.."\r\n\t*** Para mais informa??es ou duvidas contacta "..email)
if mdt == 1 then
curUser:Disconnect()
end
if mdt == 2 then
curUser:TempBan()
end
if  mdt == 3 then
curUser:Ban()
end
if mdt == 4 then
curUser:Redirect(frmHub:GetRedirectAddress(), "Virus")
end
end
if aop == 1 then
SendPmToOps(sBot, "O utilizador "..curUser.sName.." estava infectado, e por isso foi desligado.")
end
end
end

NewUserConnected = NewOpConnected
Title: error
Post by: ?Tr??T_???? on 21 July, 2005, 16:14:29
[15:13] Syntax F:\Azim (business)\Ptokax\Ptokax UK\scripts\cccc.lua:94: `end' expected (to close `function' at line 38) near `'
Title:
Post by: GeceBekcisi on 21 July, 2005, 17:13:24
Sorry, fixed it now. Code above is edited..
Title: thax
Post by: ?Tr??T_???? on 21 July, 2005, 23:37:11
thnx m8 it works fine fine fine
 :D  :D  :D  :D  8)  8)  :]  :]  :P
Title:
Post by: Zigurds on 22 July, 2005, 14:07:05
Please, translate into English  ?(

-------------------------------------
owner for Latvian hub Alfa
http://www.hub.lv
Title:
Post by: GeceBekcisi on 22 July, 2005, 14:19:56
Click here (http://www.students.itu.edu.tr/~canem/AntiVirus.lua).

Best Regards;
GeceBekcisi
Title:
Post by: Cêñoßy†ê on 07 August, 2005, 22:10:38
--// ------------------------------------------------------------------------------------------------------------ --
--// - GeceBekcisi'nin yazdigi HubBekcisi s?r?m 0.5 ten alintidir
--// - Stripped from HubBekcisi v0.5 by GeceBekcisi
--// - Stripped more by C??o?y??
--// ------------------------------------------------------------------------------------------------------------ --
--// - Features: Simple Win32.Tibick detection
--// ------------------------------------------------------------------------------------------------------------ --
--------------------------------------------------------------------------------------------------------------------
--// Global Settings
--------------------------------------------------------------------------------------------------------------------
sBot = frmHub:GetHubBotName() -- Crabs your main bots name
iTimeBan = "60"               -- TimeBan time in minutes
infAdd = "http://www.spywareguide.com/product_show.php?id=2108"  -- Link to removal instructions


MyINFOArrival = function(User, sData)
       if User.sEmail and string.find(User.sEmail, "myemail@host.com") then
       SendToOps(sBot, User.sName.." from IP "..User.sIP.." tryed to login with Win32.Tibick virus and got Tempbanned for "..iTimeBan.." minutes.")  
       User:SendData(sBot, "Your DC++ system is infected by Win32.Tibick virus. Please clean it before entering our hub!")
       User:SendData(sBot, "For more info double click: "..infAdd.."")  
       User:TimeBan(iTimeBan)
    end
end
Title:
Post by: GeceBekcisi on 08 August, 2005, 01:01:01
OMG my dear script is shaved like a chicken :D
Title:
Post by: Cêñoßy†ê on 08 August, 2005, 04:10:40
QuoteOriginally posted by GeceBekcisi
OMG my dear script is shaved like a chicken :D
hihi... shaved is the right way  :P