Skip to content

Request some java help

Featured Replies

Hi, this topic is specially for developers..Or for the ppl who used it before..

I'm using acis pack.. also i added Hyperfilter protection..

What changes should i make in pack to disable the ip protections since all players got same ip??

 

Would be rly helpfull if anyone know to configure it somehow..Thanks!

You just need to find which class object is counting the IPs in the source and disable it... generally it does a check '<= 3', so you should be able to find it.

Hi, this topic is specially for developers..Or for the ppl who used it before..

I'm using acis pack.. also i added Hyperfilter protection..

What changes should i make in pack to disable the ip protections since all players got same ip??

 

Would be rly helpfull if anyone know to configure it somehow..Thanks!

 

i had same problem ;@

This is very easy to fix, whoever wrote this code, was stupid, lol...

Go to :

 

IPV4Filter.java

 

Change :

 

@Override
public boolean accept(SocketChannel sc)
{
	InetAddress addr = sc.socket().getInetAddress();
	int h = hash(addr.getAddress());

	long current = System.currentTimeMillis();
	Flood f;
	synchronized (_ipFloodMap)
	{
		f = _ipFloodMap.get(h);
	}
	if (f != null)
	{
		if (f.trys == -1)
		{
			f.lastAccess = current;
			return false;
		}

		if (f.lastAccess + 1000 > current)
		{
			f.lastAccess = current;

			if (f.trys >= 3)
			{
				f.trys = -1;
				return false;
			}

			f.trys++;
		}
		else
		{
			f.lastAccess = current;
		}
	}
	else
	{
		synchronized (_ipFloodMap)
		{
			_ipFloodMap.put(h, new Flood());
		}
	}

	return true;
}

 

By :

 

@Override
public boolean accept(SocketChannel sc)
{
	InetAddress addr = sc.socket().getInetAddress();
	int h = hash(addr.getAddress());

	long current = System.currentTimeMillis();
	Flood f;
	synchronized (_ipFloodMap)
	{
		f = _ipFloodMap.get(h);
	}
	if (f != null)
	{
		if (f.trys == -1)
		{
			f.lastAccess = current;
			return true;
		}

		if (f.lastAccess + 1000 > current)
		{
			f.lastAccess = current;

			if (f.trys >= 3)
			{
				f.trys = -1;
				return true;
			}

			f.trys++;
		}
		else
		{
			f.lastAccess = current;
		}
	}
	else
	{
		synchronized (_ipFloodMap)
		{
			_ipFloodMap.put(h, new Flood());
		}
	}

	return true;
}

 

Recompile both servers and GG...

 

(This is just for HyperFilter, since they already 'do' IP Protection for you, so you don't need L2J one...).

Go to :

 

IPV4Filter.java

 

Change :

 

@Override
public boolean accept(SocketChannel sc)
{
	InetAddress addr = sc.socket().getInetAddress();
	int h = hash(addr.getAddress());

	long current = System.currentTimeMillis();
	Flood f;
	synchronized (_ipFloodMap)
	{
		f = _ipFloodMap.get(h);
	}
	if (f != null)
	{
		if (f.trys == -1)
		{
			f.lastAccess = current;
			return false;
		}

		if (f.lastAccess + 1000 > current)
		{
			f.lastAccess = current;

			if (f.trys >= 3)
			{
				f.trys = -1;
				return false;
			}

			f.trys++;
		}
		else
		{
			f.lastAccess = current;
		}
	}
	else
	{
		synchronized (_ipFloodMap)
		{
			_ipFloodMap.put(h, new Flood());
		}
	}

	return true;
}

 

By :

 

@Override
public boolean accept(SocketChannel sc)
{
	InetAddress addr = sc.socket().getInetAddress();
	int h = hash(addr.getAddress());

	long current = System.currentTimeMillis();
	Flood f;
	synchronized (_ipFloodMap)
	{
		f = _ipFloodMap.get(h);
	}
	if (f != null)
	{
		if (f.trys == -1)
		{
			f.lastAccess = current;
			return true;
		}

		if (f.lastAccess + 1000 > current)
		{
			f.lastAccess = current;

			if (f.trys >= 3)
			{
				f.trys = -1;
				return true;
			}

			f.trys++;
		}
		else
		{
			f.lastAccess = current;
		}
	}
	else
	{
		synchronized (_ipFloodMap)
		{
			_ipFloodMap.put(h, new Flood());
		}
	}

	return true;
}

 

Recompile both servers and GG...

 

(This is just for HyperFilter, since they already 'do' IP Protection for you, so you don't need L2J one...).

 

Edit: Now i see

Maybe if you check with attention, you will notice :P, it is just a small 'hacky fix' :D.

Maybe if you check with attention, you will notice :P, it is just a small 'hacky fix' :D.

 

I saw...

				return false;

 

to

				return true;

I saw...

 

More than enough to avoid troubles :) !

  • Author

Thanks alot! I've fixed it.

Apreciate your help.

Soz for the wrong side but i was rly need a fast help and i got it ^^

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.