Hub file check script??
 

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

Hub file check script??

Started by Jonathan, 08 February, 2004, 21:42:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jonathan

Hallo.

Can anyone help me with a script that cheack for a file on the harddrive like C:\Program Files\test.exe, and if the file exist should the user be kicked with a text, but it shall not kick or do something to Operators or Admins.


Thanks. Jonathan

nErBoS

Hi,

I think this is what you are looking for...

-- Simple Illegalist v0.1 
-- Created by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- Modificed by Leo (for music hub)
-- Modified by nErBoS 

Bot = "(-Alexandra-)" 

Files = { 
[".dll"]="No .dll files in this hub, hang on!", 
[".exe"]="No .exe files in this hub, hang on!",
[".dat"]="No .dat files in this hub, hang on!",
[".sys"]="No .sys files in this hub, hang on!",
[".ini"]="No .ini files in this hub, hang on!",
[".ocx"]="No .ocx files in this hub, hang on!"
}

Kicked = {} 

function NewUserConnected(user) 
	frmHub:EnableSearchData(1)
	if( Kicked[user.sName] == 1 ) then 
		Kicked[user.sName] = nil 
	end 
	for i,v in Files do 
	user:SendData("$Search Hub:"..Bot.." F?F?0?1?"..i) 
	end
end


function DataArrival(user, data) 
		if( strsub(data, 1, 3) == "$SR" ) then
		_,_,nick = strfind( data, "\05(%S*)|$" )
		local s = 5 + strlen(user.sName)
		local e = strfind(data, "%d+%s%d+/%d+") - 2
		local path = strsub(data, s, e)
		if( nick == Bot and Kicked[user.sName] == nil ) then 
		Kicked[user.sName] = 1 
		Reason = FindWhat(data)
		if (Reason == "Other files") then return end 
		user:SendData(Bot, "Reason: "..Reason) 
		user:SendData(Bot, "File: "..path.. ".") 
		user:SendData(Bot, "Disconnecting....") 
		user:Disconnect()
		user:TempBan()
		end
		end 
end 

function FindWhat(data) 
	for i,v in Files do 
	if( strfind(strlower(data), i) ) then 
	return v 
	end 
	end 
	return "Other files" 
end

But I recomend you to use DCk++ it's better :)

Best regards, nErBoS
--## nErBoS Spot ##--

Jonathan

No this file check should not check in share but for a file on harddrive only if you know what i meen :)

And there can I Download DCk++ ?

Thanks

Jonathan

kepp

well, you can't check a file on a person hardrive unless he shares it..
Guarding    

[NL]trucker

Kepp

i,m impressed with the looks of x-ray can we see more?
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

QuoteOriginally posted by [NL]trucker
Kepp

i,m impressed with the looks of x-ray can we see more?


Yes, i will just clean my *.lua code up a bit and add some more features to the application..
just not to forget that my *.lua knowledge is still pretty porr, though, Learning FSO (FileSystemObject) and winsoket controls in VB is fun..

untill then i can only offer pictures :)
Guarding    

nErBoS

Hi,

You can get DCk++ HERE

Best regards, nErBoS
--## nErBoS Spot ##--

SMF spam blocked by CleanTalk