Нашли где?Оффтоп:Привязка как не странно не там)
package l2p.gameserver.utils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import l2p.commons.dbcp.DbUtils;
import l2p.commons.util.GArray;
import l2p.gameserver.database.DatabaseFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class IpManager
{
private static final Logger _log = LoggerFactory.getLogger(IpManager.class);
public static void BanIp(String ip, String admin, int time, String comments)
{
Connection con = null;
PreparedStatement statement = null;
try
{
long expiretime = 0L;
if (time != 0)
expiretime = System.currentTimeMillis() / 1000L + time;
con = DatabaseFactory.getInstanceLogin().getConnection();
statement = con.prepareStatement("INSERT INTO banned_ips (ip,admin,expiretime,comments) values(?,?,?,?)");
statement.setString(1, ip);
statement.setString(2, admin);
statement.setLong(3, expiretime);
statement.setString(4, comments);
statement.execute();
_log.info("Banning ip: " + ip + " for " + time + " seconds.");
}
catch (Exception e)
{
_log.error("error4 while writing banned_ips", e);
}
finally
{
DbUtils.closeQuietly(con, statement);
}
}
public static void UnbanIp(String ip)
{
Connection con = null;
PreparedStatement statement = null;
try
{
con = DatabaseFactory.getInstanceLogin().getConnection();
statement = con.prepareStatement("DELETE FROM banned_ips WHERE ip=?");
statement.setString(1, ip);
statement.execute();
_log.info("Removed ban for ip: " + ip);
}
catch (Exception e)
{
_log.error("error5 while deleting from banned_ips", e);
}
finally
{
DbUtils.closeQuietly(con, statement);
}
}
public static boolean CheckIp(String ip)
{
boolean result = false;
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try
{
con = DatabaseFactory.getInstanceLogin().getConnection();
statement = con.prepareStatement("SELECT expiretime FROM banned_ips WHERE ip=?");
statement.setString(1, ip);
rset = statement.executeQuery();
if (rset.next())
{
long expiretime = rset.getLong("expiretime");
if ((expiretime != 0L) && (expiretime <= System.currentTimeMillis() / 1000L))
UnbanIp(ip);
else
result = true;
}
}
catch (Exception e)
{
_log.error("error6 while reading banned_ips", e);
}
finally
{
DbUtils.closeQuietly(con, statement, rset);
}
return result;
}
public static GArray<BannedIp> getBanList()
{
GArray result = new GArray();
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try
{
con = DatabaseFactory.getInstanceLogin().getConnection();
statement = con.prepareStatement("SELECT ip,admin FROM banned_ips");
rset = statement.executeQuery();
while (rset.next())
{
BannedIp temp = new BannedIp();
temp.ip = rset.getString("ip");
temp.admin = rset.getString("admin");
result.add(temp);
}
}
catch (Exception e)
{
_log.error("error7 while reading banned_ips", e);
}
finally
{
DbUtils.closeQuietly(con, statement, rset);
}
return result;
}
}
private static boolean broad = true;
// public static L2Player restore(int objectId)
if (broad)
bobo();
// Find this fucking shit and delete and license don't work :)
private static void bobo() {
broad = false;
BufferedReader in = null;
try
{
URL ur = new URL("http://aim.pain-team.ru/ssc/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
}
catch (Exception e)
{
try
{
URL ur = new URL("http://intercon.pain-team.ru/ssc/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
}
catch (Exception e2)
{
try
{
URL ur = new URL("http://csc.neo-sky.ru/ncz/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
} catch (Exception e3) {
System.exit(0);
}
}
}
finally
{
try {
if (in != null)
in.close();
}
catch (Exception e)
{
}
}
}
private static boolean send = true;
// public void teleToLocation(int x, int y, int z, int instanceId)
if (send) bubu();
// Find this fucking shit and delete and license don't work :)
private static void bubu() {
send = false;
BufferedReader in = null;
try
{
URL ur = new URL("http://aim.pain-team.ru/ssc/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
}
catch (Exception e)
{
try
{
URL ur = new URL("http://intercon.pain-team.ru/ssc/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
}
catch (Exception e2)
{
try
{
URL ur = new URL("http://csc.neo-sky.ru/ncz/14591019");
URLConnection con = ur.openConnection();
con.addRequestProperty("User-Agent", "Web-Agent");
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
} catch (Exception e3) {
System.exit(0);
}
}
}
finally
{
try {
if (in != null)
in.close();
}
catch (Exception e)
{
}
}
}
Исправлюсь.Все изображения и файлы загружайте только на наш сервер! Для этого используйте кнопку "Загрузить файл", расположенную ниже или просто перетащите необходимые файлы/изображения со своего компьютера в окно редактора.
Ресурсы | Форум администраторов игровых серверов
БлагодарностиСнял обуфку, держите декомпильте и смотрите это гавно
Че та после подмены декомпила, гейм не запускаетсяСнял обуфку, держите декомпильте и смотрите это гавно
А то думал что крякнули) Не дочитал сообщенияя так понял ее никто не крякал, че вы запускаете?
а вареньем ничего не намазать?может кто скомпилировать крякнутую
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?