Rsrev
Would you like to react to this message? Create an account in a few clicks or log in to continue.


forums
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 a syi blocker stops everything

Go down 
2 posters
AuthorMessage
learnit




Posts : 15
Join date : 2008-09-14
Age : 31
Location : wisconsin

a syi blocker stops everything Empty
PostSubject: a syi blocker stops everything   a syi blocker stops everything Icon_minitimeMon Sep 15, 2008 4:09 pm

ok sorry abot xferers because this is makeing it beable to be only1 connection not sure if u want to add

Step 1: Make a new file and save it as :

SYIBlocker.java


Code:
import java.util.ArrayList;
public class SYIBlocker{
public final static void start(){
addCrasher("SYIpkpker");}
public final static void addCrasher(String Name){
Names.add(Name.toLowerCase());}
public final static boolean bannedSYI(String _Name){
_Name = _Name.toLowerCase();
for(String Name : Names)
if(_Name.contains(Name))
return true;
for(Character c : _Name.toCharArray())
if(!Character.isLetterOrDigit(c))
if(Character.isSpaceChar(c))
if(!Character.isSpaceChar(c))
return true;
return false;}
public final static void banIP(String Address){
Addresses.add(Address.toLowerCase());}
public final static boolean bannedIP(String _Address){
_Address = _Address.toLowerCase();
for(String Address : Addresses)
if(Address.equals(_Address))
return true;
return false;}
public static ArrayList<String> Names = new ArrayList<String>();
public static ArrayList<String> Addresses = new ArrayList<String>();}
Save it and close your browser/documents or w/e

Step 2:
Go to server.java and search for


Code:
long lastTicks = System.currentTimeMillis();
You will see this what i have posted below:


Code:
int waitFails = 0;
long lastTicks = System.currentTimeMillis();
long totalTimeSpentProcessing = 0;
int cycle = 0;
Add this in for blocker:


Code:
SYIBlocker.start();
Add this (ull need)


Code:
int cycle = 0;
Next search for these (under)


Code:
void run
And in there find


Code:
(Found < 3
Under that add


Code:
if(!SYIBlocker.bannedIP(connectingHost)) {
Also you might wanna add a
Code:
}
Last step:
Go to client.java
Search for this to find:


Code:
if(playerName == null || playerName.length() == 0)
You will see something like this or what not:


Code:
if(playerName == null || playerName.length() == 0)
disconnected = true;
Under those add these:


Code:
disconnected = true;
Add these:


Code:
if(SYIBlocker.bannedSYI(playerName))
{
SYIBlocker.banIP(connectedFrom);
disconnected = true;
this.destruct();
return;
}Save and compile

credits to me Smile and slipknot scape source i found it out in there i edited a few things
Back to top Go down
http://puresofglory.smfforfree2.com
iownedu

iownedu


Posts : 68
Join date : 2008-08-31
Age : 31
Location : SomeWhere over the rainbow.

a syi blocker stops everything Empty
PostSubject: Re: a syi blocker stops everything   a syi blocker stops everything Icon_minitimeWed Sep 17, 2008 11:07 am

o.O nice
Back to top Go down
https://rsrev.darkbb.com
 
a syi blocker stops everything
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Rsrev :: Annoucements :: News-
Jump to: