the final purpose is have a searchkick working as it do it inside General Bot (not as Searchkick 1.5) but with no General Bot needed, so that you can decide every action for every forbidden finded file, and also modify values while running
ill post the steps (2 or 3) here so that if anyone can help testing (i am tired of connect and reconnect to my hub), advising about the code or something else, just do it
this first step have this new options
opers file list can be checked (why not?)
can set isearchinterval=0 but the new users connected will be checked anyway
can set the min, b/w method while running: only searchs when a new users connected (isearchinterval=0) that is to waste the minimun bandwith
can change to max. b/w method while running: searchs by interval and searchs when a new user is connected
can able/disable searchs to new users while running (allownew)
can able/disable allowops while running (allowops)
the bot will work as register and will accept public chat and private mode commands
REMEMBER SEARCH INTERVAL MODE IS RANDOMIZED
COMMANDS:
-skoff: turn script off (no searchs)
-skon: turn it on
-skallowop: no searchs in opers
-sknoallowop: searchs in opers
-sknoallownew: searchs in new user connect
-skallownew: no searchs in new user connect
-skmin: turn min. method on
-skmax: turn max. method on
i'll try to writte a "-skhelp" command and explain the script better, and add the actions for every kind of file, now i must studyyyyyyyyyyyyyy
http://www.iespana.es/itspanish/Searchkick3.script
Code: Select all
'This famous script allows users to kick other users themselves! Whoever finds forbidden files with search, gots the honor to be a "op"... Scripts can also do searches by itself. It kicks active users with large .wav, .vob, .tmp, .temp, kazaa .dat, audiogalaxy temp, windows or program files on share automatically. It really keeps the Hub clean!
'SearchKick script v1.5 by Gadget <[email protected]> http://gadget.no-ip.info
Dim Reason,i,Filename,Suffix,Kicker,ShowAll,LastKicked,sBotName,OpsOnly,iQuietMode,iSearchInterval,aSearchString,iMinute,iMaxFileSize,iOff
Sub Main()
'----------EDITABLE SETTINGS----------
iQuietMode = False '<- False=all users can see kick messages, True=Only "kicker" and kicked gets private messages.
sBotName = "Searchkick" '<- Bot's name
iSearchInterval = 15 '<- Bad file search interval in minutes. 0=Disable self-search.
iMaxFileSize = 5*1024^3 '<- (5 gigabytes) ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes.
'----------END OF SETTINGS----------
aSearchString=Array("T?F?0?1?.tmp","T?F?10485760?1?.wav","T?F?0?1?download1$.dat","T?F?0?1?.vob","T?F?0?1?msimn.exe","T?F?0?1?share$faker","T?F?0?1?explorer","T?F?0?1?system","T?F?2147483648?1?.")
tmrScriptTimer.Interval=60000
tmrScriptTimer.Enabled=True
iOff=False
colUsers.SendChatToAll cStr(sBotName),"Gadget's Searchkick 1.5 started on "+cStr(Now())
End Sub
Sub tmrScriptTimer_Timer()
If iSearchInterval=0 or iOff Then Exit Sub
iMinute=iMinute+1
If iMinute=>iSearchInterval Then
iMinute=0
For Each sUser in colUsers
sUser.SendData "$Search Hub:"+CStr(sBotName)+cStr(Rnd*100)+" "+aSearchString(Int(Rnd*(UBound(aSearchString)+1)))+"|"
Next
End If
End Sub
Sub NewUserConnected(curUser)
If iSearchInterval=0 or iOff Then Exit Sub
For i=0 To UBound(aSearchString)
curUser.SendData "$Search Hub:"+CStr(sBotName)+CStr(i)+" "+aSearchString(i)+"|"
Next
End Sub
Sub DataArival (curUser, sCurData)
If curUser.bOperator and LCase(sCurData)=LCase("<"+curUser.sName+"> "+sBotname+" on") Then
iOff=False
colUsers.SendChatToAll cStr(sBotName),cStr(sBotname)+" is on"
End If
If curUser.bOperator and LCase(sCurData)=LCase("<"+curUser.sName+"> "+sBotname+" off") Then
iOff=True
colUsers.SendChatToAll cStr(sBotName),cStr(sBotname)+" is off"
End If
If curUser.bOperator or iOff Then Exit Sub
Reason=""
If Left(sCurData,4)<>Chr(36)+"SR " Then Exit Sub
i=InStr(1,sCurData,chr(5))
if i=0 then Exit Sub
sFileName=Lcase(Mid(sCurData,InStr(5,sCurData," ")+1,i-InStr(5,sCurData," ")-1))
Suffix=Right(sFileName,4)
If Suffix=".tmp" or Right(sFileName,5)=".temp" Then Reason="NO TEMP FILES!"
If Suffix=".vob" Then Reason="NO VOB FILES!"
If Suffix=".dat" Then
If instr(1,sFileName,"download10")>1 Then Reason="DO NOT SHARE YOUR KAZAA TEMP FILES!"
End If
If Suffix=".wav" Then
If FileSize(sCurData)>10*1024^2 Then Reason="NO WAVS OVER 10 MB!"
End If
If sFileName="windows\explorer.exe" Or sFileName="winnt\explorer.exe" Then Reason="DO NOT SHARE YOUR WINDOWS FOLDER!"
If sFileName="windows\system.ini" Or sFileName="winnt\system.ini" Then Reason="DO NOT SHARE YOUR WINDOWS FOLDER!"
If Right(sFileName,17)="express\msimn.exe" Then Reason="DO NOT SHARE INSTALLED APPS!"
If Right(sFileName,14)="\dcplusplus.xml" Then Reason="DO NOT SHARE INSTALLED APPS!"
If sFileName="C:\autoexec.bat" Then Reason="DO NOT SHARE YOUR WHOLE HARD DISK!"
If InStr(1,sFileName,"\__incomplete__") Then Reason="DO NOT SHARE AUDIOGALAXY TEMP FILES!"
If InStr(1,sFileName,"share faker") Then Reason="NO SHARE FAKERS!"
If FileSize(sCurData)>iMaxFileSize Then Reason="TOO LARGE FILE ON SHARE!"
If Reason="" Then Exit Sub
Do
i=InStr(i+1,sCurData,Chr(5))
Loop Until InStr(i+1,sCurData,Chr(5))<1
Kicker=Mid(sCurData,i+1)
If Kicker="" Then Kicker=sBotName
If Left(Kicker,Len(sBotName))=sBotName Then Kicker=sBotName
If CurUser.sName=LastKicked Then Exit Sub
LastKicked=CurUser.sName
If iQuietMode Then
curUser.PrivateMessage cStr(Kicker),Kicker+" is kicking "+CurUser.sName+" because: "+Reason+" ("+sFileName+")"
colUsers.ItemByName(cStr(Kicker)).PrivateMessage cStr(sBotName),Kicker+" is kicking "+CurUser.sName+" because: "+Reason+" ("+sFileName+")"
colUsers.ItemByName(cStr(Kicker)).PrivateMessage cStr(sBotName),"The user "+CurUser.sName+" was kicked by "+Kicker+". IP: "+CurUser.IP
frmHub.DoEventsForMe
curUser.Kick()
Else
curUser.PrivateMessage cStr(Kicker),Kicker+" is kicking "+CurUser.sName+" because: "+Reason+" ("+sFileName+")"
colUsers.SendChatToAll cStr(Kicker),Kicker+" is kicking "+CurUser.sName+" because: "+Reason+" ("+sFileName+")"
colUsers.SendChatToAll "Hub-Security","The user "+CurUser.sName+" was kicked by "+Kicker+". IP: "+CurUser.IP
frmHub.DoEventsForMe
curUser.Kick()
End If
End Sub
Function FileSize(SearchData)
i=InStr(1,SearchData,Chr(5))
FileSize=CDbl(Mid(SearchData,i+1,InStr(i,SearchData," ")-i-1))
End Function