Virus Scanner / File scanner - Page 2
 

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

Virus Scanner / File scanner

Started by ??????Hawk??????, 09 August, 2005, 23:38:14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Syphrone-NL

got this error:

[21:21] Syntax ...ad\Mijn Hubbie\0.3.3.21.nt.dbg\scripts\v-scanner.lua:20: attempt to concatenate field `?' (a nil value)

of this line:

tNick:SendData("$Search Hub:"..bot_name1.." F?T?0?1?"..Files[sCounter])

of this:

function OnTimer()
	if tNick then
		sCounter = sCounter + 1
		tNick:SendData("$Search Hub:"..bot_name1.." F?T?0?1?"..Files[sCounter]) 
		if sCounter == table.getn(Files) then
			StopTimer()
			sCounter = 0
			SendToOps(bot_name1," Scanning Complete.... ")
		end
	else
		StopTimer()
		sCounter = 0
	end
end
Owner of 2 public hubs in Palace Network ---> www.palace-network.nl

[NL]Tazzie

#26
Made some changes to make rightclicker work.
And dont have the error mentioned above.

---A sort of Virus Checker V3  ( could be used for any files )
---By ??????Hawk??????  09/08/2005 updated 10/08/2005-- 02/11/2005
---use the right click pc-scan\\-=scan user=- to scan a user
---use the right click pc-scan\\-=Add File=- to add a file to the scan list
---Requires viruslist.txt in your scripts folder containig a list of virus file names ( or any file names )
---Requested by RipTorn
---Changed the rightclicker to make it work by Tazzie  
 
bot_name1 = "Scanner"

-- Sets who can use release script
Allowed = {
[0] = 1,	-- Master
[1] = 0,	-- Operator
[2] = 0,	-- VIPs
[3] = 0,	-- Regs
[4] = 0,	-- Moderator
[5] = 1,	-- Netfounder
}

Files = {}
sCounter = 0 
function Main()
	loadfile("viruslist.txt", Files)
	SetTimer(1000)
end

function OnTimer()
	if tNick then
		sCounter = sCounter + 1
		tNick:SendData("$Search Hub:"..bot_name1.." F?T?0?1?"..Files[sCounter]) 
		if sCounter == table.getn(Files) then
			StopTimer()
			sCounter = 0
			SendToOps(bot_name1," Scanning Complete.... ")
		end
	else
		StopTimer()
		sCounter = 0
	end
end

function OpConnected(curUser)
	curUser:SendData("$UserCommand 1 3 pc-scan\\**Your Online "..bot_name1.."**$<%[mynick]>%[nick]||")
	curUser:SendData("$UserCommand 1 3 pc-scan\\-=scan user=-\\Scan a user$<%[mynick]> !scan %[nick]||")
	curUser:SendData("$UserCommand 1 3 pc-scan\\-=Add File=-$<%[mynick]> !addfile %[line:FIle]||")
end

function UserDisconnected(curUser) 
	 if tNick and curUser.sName == tNick.sName then
		StopTimer()
		tNick = nil
		sCounter = 0
	end
end

function ChatArrival(user, data)
		local sString = ""
		data = string.sub(data,1,string.len(data)-1)
		local _,_,Cmd,Nick = string.find( data, "%b<>%s+(%S+)%s+(%S+).*" )

		if Cmd == "!scan" and Nick and user.bOperator then
			if tNick then
				user:SendData(bot_name1,"Scan in Progres on user "..tNick.sName)
				return 1
			else
				tNick = GetItemByName(Nick)
					if tNick and not tNick.bOperator then
						SendToOps(bot_name1,user.sName.." Activated File Scan.... Now Scanning.... "..tNick.sName)
						StopTimer()
						sCounter = 0
						StartTimer() 
						return 1
					else
						user:SendData(bot_name1,Nick.." Is Offline or an Operator")
						return 1
					end
			end
		elseif Cmd == "!addfile" and Nick and user.bOperator then
			Files[(table.getn(Files) + 1)] = Nick
			SaveTable("viruslist.txt", Files)
			user:SendData(bot_name1,Nick.." Has been added to the Scan List.")
			return 1
		end
end

function SRArrival(curUser,data)
	local _,_,nick = string.find( data, "\05(%S*)|$" ) 
	if nick == bot_name1  then 
		local _,_, test = string.find(data,"$SR%s+%S+(.*)%d+%s+%d+/%d+")
		test = test or " Cant Find Folder. "
		local Reason = FindWhat(data) or " File Unknown "
		curUser:SendPM(bot_name1,"! ! ! W A R N I N G ! ! ! you are Infected with "..Reason..".. found in the Folder: "..test)								 
		SendToOps(bot_name1," "..curUser.sName.." Has been Kicked for Sharing "..Reason.." Found in folder:-"..test)
		curUser:TempBan() 
		tNick = nil
		StopTimer()
		sCounter = 0
	end 
end

function FindWhat(FileData) 
	for i,v in Files do 
		if string.find(string.lower(FileData), v) then 
			return v 
		end 
	end 
end 

function SaveTable(filetoSave, TabletoSave)
local a , b
local f,e = io.open(filetoSave, "w" )
		for a,b in TabletoSave do
			f:write(b.."\n")
		 end
	 f:close()
end

function loadfile(filetoload, TabletoLoad)
local f,e = io.open(filetoload,"r")
	if f then
	local counter = 1
		while 1 do
			line = f:read("*l")
				if line ==  nil then
					break
				end
			TabletoLoad[counter]=string.lower(line)
			counter = counter + 1
		end
		 f:close(f)
	else
		f,e = io.open(filetoload, "w" )
		f:write()
		f:close()
	end
end


???Zzi?`? ????nC?? part of

?-=[K?igh?Visio?.::.?e?WorX]=-?


Spykez

Alright, a lil blast from the past, how do we know if a file is infect, what kind of alert is there when we scan? Also is that virus list above us up to date or where can I get a current threat list.

DEEP-GOA

Quote from: Spykez on 14 April, 2006, 05:07:40
Alright, a lil blast from the past, how do we know if a file is infect, what kind of alert is there when we scan?

curUser:SendPM(bot_name1,"! ! ! W A R N I N G ! ! ! you are Infected with "..Reason..".. found in the Folder: "..test)
SendToOps(bot_name1," "..curUser.sName.." Has been Kicked for Sharing "..Reason.." Found in folder:-"..test)
curUser:TempBan()


http://deep-goa.no-ip.org
Put any term or title on me you want. What I am is what I do. I make things.

cowboydaddy

is there somebody that got the virus list for me?
the link somewhere here is not working
thanks

SMF spam blocked by CleanTalk