.dll probs
Moderator: Moderators
-
ChaosTheKitty
- Posts: 6
- Joined: 2003-07-10 16:07
.dll probs
I was wondering if there is a script I can use to keep .dll files out of my hub. Nothing wrong with .dll files, just not what you're sposed to share in anime hub 
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
Modify SearchKick to not allow DLLs
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.4 by Gadget <[email protected]>
'Modified by BSOD2600 to send only to OPs
Dim Reason,i,Filename,Suffix,Kicker,ShowAll,LastKicked,sBotName,OpsOnly,iQuietMode,iSearchInterval,aSearchString,iMinute,iMaxFileSize
Sub Main()
'----------EDITABLE SETTINGS----------
iQuietMode = False '<- False=all OPs can see kick messages, True=Only "kicker" and kicked gets private messages.
sBotName = "Searchkick" '<- Bot's name
iSearchInterval = 3 '<- Bad file search interval in minutes. 0=Disable self-search.
iMaxFileSize = 2*1024^4 '<- (5 gigabytes) ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes.
'----------END OF SETTINGS----------
aSearchString=Array("T?F?0?1?uninst.inu","T?F?0?1?msimn.exe","T?F?0?1?kazaa.exe","T?F?209715200?1?.vob","T?F?10485760?1?.wav","T?T?1013760?1?hl.exe","T?F?0?1?bfdist.vlu","T?F?0?1?War3Inst.log","T?F?0?1?ut2003.log","T?F?0?1?NFSHP2.exe","T?F?0?1?avp2.rez","T?F?0?1?utmenu.int","T?F?0?1?ntuser.dat","T?F?0?1?winword.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
colUsers.SendChatToAll cStr(sBotName),"Gadget's Searchkick 1.4 started on "+cStr(Now())
End Sub
Sub tmrScriptTimer_Timer()
If iSearchInterval=0 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 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 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=".vob" Then
If FileSize(sCurData)>200*1024^2 Then Reason="No VOBs over 200 MB!"
End If
If Suffix=".wav" Then
If FileSize(sCurData)>50*1024^2 Then Reason="No WAVs over 50 MB! Join the 21st century with converting to something called MP3!"
End If
If sFileName="windows\explorer.exe" Or sFileName="winnt\explorer.exe" Then Reason="Do not share your Windows folder,it's a good way to share sensitive information!"
If sFileName="windows\system.ini" Or sFileName="winnt\system.ini" Then Reason="Do not share your Windows folder,it's a good way to share sensitive information!"
'If Right(sFileName,5)="info2" Then Reason="You may live in a trailer park surrounded by trash, but the rest of us do not. Keep your RecycleBin to yourself!"
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 Right(sFileName,11)="winword.exe" Then Reason="Do not share installed apps!"
If Right(sFileName,9)="kazaa.exe" Then Reason="Do not share installed apps!"
If Right(sFileName,10)="uninst.inu" Then Reason="Do not share installed programs you dolt!"
If Right(sFileName,6)="hl.exe" Then Reason="Do not share installed games!"
If Right(sFileName,10)="bfdist.vlu" Then Reason="Do not share installed games!"
If Right(sFileName,12)="War3Inst.log" Then Reason="Do not share installed games!"
If Right(sFileName,10)="ut2003.log" Then Reason="Do not share installed games!"
If Right(sFileName,10)="NFSHP2.exe" Then Reason="Do not share installed games!"
If Right(sFileName,8)="avp2.rez" Then Reason="Do not share installed games!"
If Right(sFileName,10)="utmenu.int" Then Reason="Do not share installed games!"
If Right(sFileName,10)="ntuser.dat" Then Reason="Don't share your user profile"
If sFileName="C:\autoexec.bat" Then Reason="Do not share your entire C drive, it's a good way to share sensitive information!"
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+")"
SendChatToOps sBotName, +Kicker+" is kicking "+CurUser.sName+" because: "+Reason+" ("+sFileName+")"
SendChatToOps "Hub-Security","The user "+CurUser.sName+" was kicked by "+Kicker+". IP: "+CurUser.IP
frmHub.DoEventsForMe
curUser.Kick()
End If
End Sub
Sub SendChatToOps(sName, dMessage)
Dim sOPName
For Each sOPName in frmHub.lstOps.ListItems
If colUsers.Online(cStr(sOPName.Text)) Then
With colUsers.ItemByName(cstr(sOPName.Text))
If .bOperator Then .SendData cStr("<" & sName & "> " & dMessage)
End With
End If
Next
End Sub
Function FileSize(SearchData)
i=InStr(1,SearchData,Chr(5))
FileSize=CDbl(Mid(SearchData,i+1,InStr(i,SearchData," ")-i-1))
End Function
Who is online
Users browsing this forum: Google [Bot] and 0 guests