forbidden Files Check
 

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

forbidden Files Check

Started by BoJlk, 03 October, 2004, 19:14:41

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BoJlk

I'm looking for a Simple Bot to search the file list for
[Program files, Windows folder, Documents and settings]

I'm using DCDM v0.308
Maybe there is a RAW command for that?

WickeD

#1
Try this one my m8!

-- BadFilesDetecter V: 1.0 by [ES]latinmusic. Date: 05/11/2003 
-- Base on Illegalist by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- Modificed by Leo (for music hub) 
-- Modified by nErBoS 
-- Operators are now checked as normal users 
-- Some extensions added 
-- All known bugs fixed by ----------->>> OpiumVolage 

BotName = "![BadFilesDetecter]!?" 
MessageToSend = " are not allowed in this hub." 
time = 3 --Value in minutes 
Files = { 
[".dll"]="No .dll files in this hub, you have been banned for "..time.." minutes.", 
[".sys"]="No .sys files in this hub, you have been banned for "..time.." minutes.", 
[".ini"]="No .ini files in this hub, you have been banned for "..time.." minutes.", 
[".php"]="No .php files in this hub, you have been banned for "..time.." minutes.", 
[".hlp"]="No .hlp files in this hub, you have been banned for "..time.." minutes.", 
[".lnk"]="No .lnk files in this hub, you have been banned for "..time.." minutes.", 
[".cue"]="No .cue files in this hub, you have been banned for "..time.." minutes.", 
[".pkg"]="No .pkg files in this hub, you have been banned for "..time.." minutes.", 
[".lib"]="No .lib files in this hub, you have been banned for "..time.." minutes.", 
[".ins"]="No .ins files in this hub, you have been banned for "..time.." minutes.", 
[".cmd"]="No .cmd files in this hub, you have been banned for "..time.." minutes.", 
[".bat"]="No .bat files in this hub, you have been banned for "..time.." minutes.", 
[".cod"]="No .cod files in this hub, you have been banned for "..time.." minutes.", 
[".cox"]="No .cox files in this hub, you have been banned for "..time.." minutes.", 
[".loc"]="No .loc files in this hub, you have been banned for "..time.." minutes.", 
[".cnt"]="No .cnt files in this hub, you have been banned for "..time.." minutes.", 
[".vxd"]="No .vxd files in this hub, you have been banned for "..time.." minutes.", 
[".vga"]="No .vga files in this hub, you have been banned for "..time.." minutes.", 
[".stb"]="No .stb files in this hub, you have been banned for "..time.." minutes.", 
[".chp"]="No .chp files in this hub, you have been banned for "..time.." minutes.", 
[".nrg"]="No .nrg files in this hub, you have been banned for "..time.." minutes.", 
[".iso"]="No .iso files in this hub, you have been banned for "..time.." minutes.", 
[".vob"]="No .vob files in this hub, you have been banned for "..time.." minutes.", 
[".pas"]="No .pas files in this hub, you have been banned for "..time.." minutes.", 
[".vcf"]="No .vcf files in this hub, you have been banned for "..time.." minutes.", 
[".dfm"]="No .dfm files in this hub, you have been banned for "..time.." minutes.", 
[".res"]="No .res files in this hub, you have been banned for "..time.." minutes.", 
[".reg"]="No .reg files in this hub, you have been banned for "..time.." minutes.", 
[".vdi"]="No .vdi files in this hub, you have been banned for "..time.." minutes.", 
[".map"]="No .map files in this hub, you have been banned for "..time.." minutes.", 
[".scr"]="No .scr files in this hub, you have been banned for "..time.." minutes.", 
[".diz"]="No .diz files in this hub, you have been banned for "..time.." minutes.", 
[".lst"]="No .lst files in this hub, you have been banned for "..time.." minutes.", 
[".pdf"]="No .pdf files in this hub, you have been banned for "..time.." minutes." 
} 
function NewUserConnected(curUser) 
frmHub:EnableSearchData(1) 
for i,v in Files do 
curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i) 
end 
end 
function OpConnected(curUser) 
frmHub:EnableSearchData(1) 
for i,v in Files do 
curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i) 
end 
end 
function DataArrival(curUser, data) 
if( strsub(data, 1, 3) == "$SR" ) then 
_,_,nick = strfind( data, "\05(%S*)|$" ) 
local s = 5 + strlen(curUser.sName) 
local e = strfind(data, "%d+%s%d+/%d+") - 2 
local path = strsub(data, s, e) 
local s = 5 + strlen(curUser.sName) 
Reason = FindWhat(curUser,data) 
if (Reason == "Other files") then return end 
curUser:SendData(BotName, "Disconnecting.....") 
curUser:SendData(BotName, "Reason: "..Reason) 
curUser:SendData(BotName, "Path: "..path.. ".") 
curUser:Disconnect() 
curUser:TimeBan(time) --This line tempban a user for an specific amount of time in minutes, to incree/decrease the time change the value in variable 'time' 
-- curUser:TempBan() --This line tempban a user for an specific amount of time pre-setted inside ptokax advanced settings, to make it work, uncomment this line and comment the line above 
end 
end 
function FindWhat(curUser,data) 
for i,v in Files do 
if (strfind(strlower(data), "%"..i.."\005")) then 
return v 
end 
end 
return "Other files" 
end

/WickeD

Herodes

You can do that with the use of ADLSearch ....

pls serach the forum and look in the DC++ Faq about in ADLSearch and the DCDM++ forum too ...


What Wicked posted is for  Ptx it wont work in Lua enabled client ...

WickeD

If you do not get the Client to check the users share so can you try the Script that I posted my m8!

/WickeD

nErBoS

Hi,

Don't forget the script will only make a search in active users.

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

BoJlk

Yeah nErBoS That's a problem
about the passive user...

Thou the script is a problem because i don't want to BAN ppl for sharing one of those files
I't could be some program patch that contains *.dll files

I would rather to timeban user for sharing "program files" , "Windows" , "Documents and settings"...

nErBoS

Hi,

You want to add timeban to all files that are in the table or just for a certain amount ??

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

bastya_elvtars

i really cannot understand why you are searching for forbidden files thru script, not dcdm++. it can be made fully automated as well, and a gui helps u, not harder than a scripted way.
Everything could have been anything else and it would have just as much meaning.

BoJlk

Well...
QuoteHi,

You want to add timeban to all files that are in the table or just for a certain amount ??

Best regards, nErBoS

I dont want to look 4 File Extentions...
Just for directories (program files,...etc.)

Quotei really cannot understand why you are searching for forbidden files thru script, not dcdm++. it can be made fully automated as well, and a gui helps u, not harder than a scripted way

He,he...Where? do i type the Raw commands...
And what Raw command should i type in.
And it presents a problem!
If there's a condition when i closed the DCDM client
And my other OPs are usin standart DC++ Client...
I this case that a problem.

bastya_elvtars

users having a 119.64k sized wpk file in their share are not too important to kick them immediately, the lolita stuff can be done by adlsearch

in case you close dcdm++ well dont close it or ask an op 2 use dcdm++

you give more importance for this than you should, m8
Everything could have been anything else and it would have just as much meaning.

nErBoS

Hi,

QuoteOriginally posted by BoJlk
I dont want to look 4 File Extentions...
Just for directories (program files,...etc.)

Just put what you want instead of the file extions, for eg:

["what to ban"] = "Reason to give to user",

If you don't want the rest, just remove it from the table.

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

BoJlk

#11
QuoteOriginally posted by nErBoS
Just put what you want instead of the file extions
Thanks nErBoS i thought it only looks for files?...10x

QuoteOriginally posted by bastya_elvtars
users having a 119.64k sized wpk file in their share are not too important to kick them immediately, the lolita stuff can be done by adlsearch

in case you close dcdm++ well dont close it or ask an op 2 use dcdm++

you give more importance for this than you should, m8

Why you think it's not important?

BoJlk

#12
I've tested it...
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `DataArrival' at line 36 [file `...rotaX TESTING\scripts\BadFilesDetecter v1.0.lua']


I just addited this part:
[color=green]...Files = { 
["program files"]="UnShare program files Directory, and then come back - you are banned for "..time.." minutes.", 
["RECYCLER"]="UnShare RECYCLER, and then come back - you are banned for "..time.." minutes.", 
[".vob"]="No .vob files in this hub, yo uare banned for "..time.." minutes.", 
} 
function NewUserConnected(curUser)...[/color]

I'm sorry to ask this i know nothing about LUA nor Scripting, thou i've looked at line 36

[color=green]local e = strfind(data, "%d+%s%d+/%d+") - 2[/color]

bastya_elvtars

QuoteOriginally posted by BoJlk
QuoteOriginally posted by nErBoS
Just put what you want instead of the file extions
Thanks nErBoS i thought it only looks for files?...10x

QuoteOriginally posted by bastya_elvtars
users having a 119.64k sized wpk file in their share are not too important to kick them immediately, the lolita stuff can be done by adlsearch

in case you close dcdm++ well dont close it or ask an op 2 use dcdm++

you give more importance for this than you should, m8

Why you think it's not important?

suppose i enter a hub with my 87G shared and including a 10k tmp file

then u kick me for it immediately, or timeban etc.

better just send 3 or whatever warnings - and it can be done by dcdm++ combined with a ptokax script - i will make the script part...
Everything could have been anything else and it would have just as much meaning.

BoJlk

i modified it for timeban of 3 min.
for sharing program files etc.

If i'll send warning and won't get responded i'll kick the user.

So why not instead of whit fuss i'll prevent him from entering...

bastya_elvtars

damn man, use your brain

when i have a 10k uninstall.exe in my 87 gig share you kick me immediately? instead of warning 2 remove?

thats why i asked, rofl
Everything could have been anything else and it would have just as much meaning.

BoJlk

#16
i'll explain myself again...
I WANT TO SEARCH DIRECTORY not an extention.!

And where do you see here any [".exe"]
...Files = { 
["program files"]="UnShare program files Directory, and then come back - you are banned for "..time.." minutes.", 
["RECYCLER"]="UnShare RECYCLER, and then come back - you are banned for "..time.." minutes.", 
[".vob"]="No .vob files in this hub, yo uare banned for "..time.." minutes.", 
} 
function NewUserConnected(curUser)...

Am i using my brain now?

bastya_elvtars

Am i using my brain now?

And what if theres a band called Recycler? ;)
Everything could have been anything else and it would have just as much meaning.

BoJlk

then i hope there's no "program files" band ;)

nErBoS

#19
Hi,

About the error here you have the script corrected...

-- BadFilesDetecter V: 1.0 by [ES]latinmusic. Date: 05/11/2003 
-- Base on Illegalist by Ptaczek, Jan-3, 2003 
-- Searches for specified patterns. Useful for illegal share checking 
-- Modificed by Leo (for music hub) 
-- Modified by nErBoS 
-- Operators are now checked as normal users 
-- Some extensions added 
-- All known bugs fixed by ----------->>> OpiumVolage 
-- Upgrade on script code by nErBoS

BotName = "![BadFilesDetecter]!?" 
MessageToSend = " are not allowed in this hub." 
time = 3 --Value in minutes 
Files = { 
	[".dll"]="No .dll files in this hub, you have been banned for "..time.." minutes.", 
	[".sys"]="No .sys files in this hub, you have been banned for "..time.." minutes.", 
	[".ini"]="No .ini files in this hub, you have been banned for "..time.." minutes.", 
	[".php"]="No .php files in this hub, you have been banned for "..time.." minutes.", 
	[".hlp"]="No .hlp files in this hub, you have been banned for "..time.." minutes.", 
	[".lnk"]="No .lnk files in this hub, you have been banned for "..time.." minutes.", 
	[".cue"]="No .cue files in this hub, you have been banned for "..time.." minutes.", 
	[".pkg"]="No .pkg files in this hub, you have been banned for "..time.." minutes.", 
	[".lib"]="No .lib files in this hub, you have been banned for "..time.." minutes.", 
	[".ins"]="No .ins files in this hub, you have been banned for "..time.." minutes.", 
	[".cmd"]="No .cmd files in this hub, you have been banned for "..time.." minutes.", 
	[".bat"]="No .bat files in this hub, you have been banned for "..time.." minutes.", 
	[".cod"]="No .cod files in this hub, you have been banned for "..time.." minutes.", 
	[".cox"]="No .cox files in this hub, you have been banned for "..time.." minutes.", 
	[".loc"]="No .loc files in this hub, you have been banned for "..time.." minutes.", 
	[".cnt"]="No .cnt files in this hub, you have been banned for "..time.." minutes.", 
	[".vxd"]="No .vxd files in this hub, you have been banned for "..time.." minutes.", 
	[".vga"]="No .vga files in this hub, you have been banned for "..time.." minutes.", 
	[".stb"]="No .stb files in this hub, you have been banned for "..time.." minutes.", 
	[".chp"]="No .chp files in this hub, you have been banned for "..time.." minutes.", 
	[".nrg"]="No .nrg files in this hub, you have been banned for "..time.." minutes.", 
	[".iso"]="No .iso files in this hub, you have been banned for "..time.." minutes.", 
	[".vob"]="No .vob files in this hub, you have been banned for "..time.." minutes.", 
	[".pas"]="No .pas files in this hub, you have been banned for "..time.." minutes.", 
	[".vcf"]="No .vcf files in this hub, you have been banned for "..time.." minutes.", 
	[".dfm"]="No .dfm files in this hub, you have been banned for "..time.." minutes.", 
	[".res"]="No .res files in this hub, you have been banned for "..time.." minutes.", 
	[".reg"]="No .reg files in this hub, you have been banned for "..time.." minutes.", 
	[".vdi"]="No .vdi files in this hub, you have been banned for "..time.." minutes.", 
	[".map"]="No .map files in this hub, you have been banned for "..time.." minutes.", 
	[".scr"]="No .scr files in this hub, you have been banned for "..time.." minutes.", 
	[".diz"]="No .diz files in this hub, you have been banned for "..time.." minutes.", 
	[".lst"]="No .lst files in this hub, you have been banned for "..time.." minutes.", 
	[".pdf"]="No .pdf files in this hub, you have been banned for "..time.." minutes." 
} 

function NewUserConnected(curUser) 
	frmHub:EnableSearchData(1) 
	for i,v in Files do 
		curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i) 
	end 
end 

function OpConnected(curUser) 
	frmHub:EnableSearchData(1) 
	for i,v in Files do 
		curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i) 
	end 
end 

function DataArrival(curUser, data) 
	if( strsub(data, 1, 3) == "$SR" ) then 
		_,_,nick = strfind( data, "\05(%S*)|$" ) 
		local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
		if (path ~= nil) then
			Reason = FindWhat(curUser,data) 
			if (Reason == "Other files") then return end 
			curUser:SendData(BotName, "Don't share illegal files. Please correct them.") 
			curUser:SendData(BotName, "Reason: "..Reason) 
			curUser:SendData(BotName, "Path: "..path.. ".") 
			SendPmToOps(BotName, "The user: "..curUser.sName.." is sharing illegal files.") 
			SendPmToOps(BotName, "Path: "..path)
		end
	end 
end 

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

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

BoJlk

10x nErBoS the King, :)
i thought about what bastya_elvtars Said and can this script not ban
instead just warn Owner/OPs/ChatOP (one of them, so i can shoose)

And one more thing: the script stops the search after the first string found...
If it's not too difficult to make the script make a list of file found...
Eventually the script will do this
1.check for directory/files
2. allow ppl to cennect
3. warn user : "to unshare the bad files"
4. send PM with list of files found in the share to master/OP/chatOP (can be changed)

nErBoS

Hi,

I have edited the script bellow. Try out.

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

BoJlk

Another Question:

Does the Script distinguish betwen "Directory" name
and "file" name?

And if not can it be done?

DEEP-GOA

QuoteOriginally posted by BoJlk
Another Question:

Does the Script distinguish betwen "Directory" name
and "file" name?

And if not can it be done?

edit into adl search all ur needs..
.. DCDM rocks.. ;)

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.

DEEP-GOA

QuoteOriginally posted by Mutor
..Why script all this when DCDM can do it better, without spamming the hub? Ahh f**k what do I know?

peace...

agree agree

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.

SMF spam blocked by CleanTalk