|
Рынок / Marketplace
Описание темы:Клиент+сервер |
Ссылки сообщества |
Изображения и альбомы |
Пользователи |
К странице... |
Опции темы |
24.05.2010, 06:54 | #11 |
ЛК под любые игры
|
Re: LameGuard
автор полное ололо. ну и что, что у тебя либа есть? интеграцию в клиент ты сделаешь? убейся
|
24.05.2010, 10:28 | #12 |
Пользователь
|
Re: LameGuard
Того же мнения, что такую вещь надо покупать только у разработчика... и больше ни у кого. Нафиг надо левую хрень покупать без поддержки, без доработки, без гарантий и т.д.
Бред, в общем... |
24.05.2010, 10:33 | #13 | |
Регистрация: 13.05.2010
Адрес: forum.zone-game.info
Сообщений: 890
Отблагодарили 455 раз(а)
Рейтинг мнений:
453
|
Re: LameGuard
Просто тупой развод так как он скидывай файлики типа исходав (какие исходы ето на исходы и непохожее декомпил чистой воды).
Лучьше отжалеть денег и купить нормальную LG у разработчика. Добавлено через 2 часа 15 минут Автор полный разводила. Я попрасил его скинуть хоть 1 исходник он скинул файлик LameGuard.java и PacketBuilder.java клялся что реальный исходник. Цитата:
По его словам это реальный исходник 2(файла): LameGuard.java Скрытый текст:Свернуть ↑
Свернуть ↑Развернуть ↓
package com.lameguard; import com.lameguard.exception.LameGuardClientBannedExcep tion; import com.lameguard.exception.LameGuardException; import com.lameguard.exception.LameGuardHackerException; import com.lameguard.exception.LameGuardIncorrectDataExce ption; import com.lameguard.exception.LameGuardIncorrectPatchExc eption; import com.lameguard.exception.LameGuardIncorrectRevision Exception; import com.lameguard.exception.LameGuardIncorrectVersionE xception; import com.lameguard.exception.LameGuardInstanceLimitExce ption; import com.lameguard.exception.LameGuardInternalException ; import com.lameguard.session.ClientSession; import com.lameguard.session.IpSession; import com.lameguard.utils.Utils; import java.util.Collections; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; import org.apache.log4j.Logger; public class LameGuard { private static final Logger _log = Logger.getLogger(LameGuard.class); private static final LameGuard _instance = new LameGuard(); private final Map<String, IpSession> ipSessions; private final Map<Object, ClientSession> awaitingSessions; private final Map<Object, ClientSession> clientSessions; private long lastCleanUp; public static final LameGuard getInstance() { return _instance; } private LameGuard() { this.awaitingSessions = new ConcurrentHashMap(); this.clientSessions = Collections.synchronizedMap(new WeakHashMap()); this.ipSessions = new ConcurrentHashMap(); this.lastCleanUp = System.currentTimeMillis(); } public String getHWID(Object client) { if (client == null) return null; ClientSession clientData = (ClientSession)this.clientSessions.get(client); if (clientData == null) return null; return clientData.getHWID(); } public void onProtocolVersionPacket(Object client, int revision, int version, int patch, int instances, byte[] data) throws LameGuardException { if ((revision == -2) || (revision == -3) || (revision == 65534) || (revision == 65533)) return; String ip = Utils.findIP(client.toString()); if (ip == null) { _log.warn(new StringBuilder().append("Cannot find ip : ").append(client.toString()).append(".").toString( )); throw new LameGuardInternalException(); } if (BanList.getInstance().isIPBanned(ip)) { _log.info(new StringBuilder().append("Client [ip : ").append(ip).append("] banned by ip, closing connection.").toString()); throw new LameGuardClientBannedException(); } IpSession ipSession = (IpSession)this.ipSessions.get(ip); if (ipSession == null) { ipSession = new IpSession(ip); this.ipSessions.put(ip, ipSession); } if (data == null) { if (2106 == Config.LAMEGUARD_LOGIN_PORT) { addBanPoints(ipSession, 0, Config.LAMEGUARD_INCORRECT_CLIENT_BAN_POINTS); throw new LameGuardIncorrectRevisionException(); } addBanPoints(ipSession, 1, Config.LAMEGUARD_INCORRECT_PACKETS_BAN_POINTS); throw new LameGuardIncorrectDataException(); } int start = (data[1] & 0xFF) << 8 | (data[0] & 0xFF) << 0; version ^= start; patch ^= start; instances ^= start; if ((version < Config.LAMEGUARD_MIN_VERSION) || (version > Config.LAMEGUARD_MAX_VERSION)) { addBanPoints(ipSession, 0, Config.LAMEGUARD_INCORRECT_VERSION_BAN_POINTS); throw new LameGuardIncorrectVersionException(); } byte[] a_crc32 = new byte[4]; byte[] a_token = new byte[4]; byte[] a_hwid = new byte[16]; byte[] a_account = new byte[16]; try { PacketBuilder.decompilePacket(data, a_token, a_hwid, a_account, a_crc32); } catch (LameGuardHackerException lghe) { String hwid = Utils.asHex(a_hwid); String account = new String(a_account).trim(); addBanPoints(ipSession, hwid, account, 4, Config.LAMEGUARD_HACKER_DETECT_BAN_POINTS); throw lghe; } catch (LameGuardIncorrectDataException lgide) { addBanPoints(ipSession, 2, Config.LAMEGUARD_INCORRECT_PACKETS_BAN_POINTS); throw lgide; } catch (Exception e) { _log.error("Error while decrypting packet :", e); throw new LameGuardInternalException(); } String hwid = Utils.asHex(a_hwid); String account = new String(a_account).trim(); int crc32 = Utils.bytesToInt(a_crc32, 0); int token = Utils.bytesToInt(a_token, 0); ClientSession clientSession = new ClientSession(ip, hwid, account, token); if (BanList.getInstance().isHWIDBanned(hwid)) { _log.info(new StringBuilder().append("Client ").append(clientSession).append(" banned by hwid, closing connection.").toString()); throw new LameGuardClientBannedException(); } if (!(ipSession.isUnique(token, crc32))) { addBanPoints(ipSession, hwid, account, 3, Config.LAMEGUARD_DUPLICATE_PACKETS_BAN_POINTS); throw new LameGuardHackerException(); } ipSession.setData(token, crc32); if ((patch < Config.LAMEGUARD_MIN_PATCH_VERSION) || (patch > Config.LAMEGUARD_MAX_PATCH_VERSION)) { _log.info(new StringBuilder().append("Client ").append(clientSession).append(" has incorrect patch version : ").append(patch).append(", closing connection.").toString()); throw new LameGuardIncorrectPatchException(); } if (instances > Config.LAMEGUARD_MAX_INSTANCES) { _log.info(new StringBuilder().append("Client ").append(clientSession).append(" exceed maximum of allowed loaded instances : ").append(instances).append(", closing connection.").toString()); throw new LameGuardInstanceLimitException(); } _log.info(new StringBuilder().append("Client ").append(clientSession).append(" connected, ip ban points : ").append(ipSession.getBanPoints()).append(".").to String()); cleanUpAwaiting(); this.awaitingSessions.put(client, clientSession); } public void onKeyPacket(Object client, byte[] key, byte[] data) throws LameGuardException { if (this.awaitingSessions.containsKey(client)) { ClientSession clientData = (ClientSession)this.awaitingSessions.get(client); try { byte[] a_token = new byte[4]; a_token = Utils.intToBytes(clientData.getToken()); byte[] a_key = new byte[8]; System.arraycopy(key, 0, a_key, 0, a_key.length); PacketBuilder.compilePacket(data, a_token, a_key); this.clientSessions.put(client, clientData); } catch (Exception e) { throw new LameGuardInternalException(); } finally { this.awaitingSessions.remove(client); } } else { _log.error(new StringBuilder().append("Error while sending lameguard init packet. Client : ").append(client.toString()).append(" is not in awaiting list!").toString()); throw new LameGuardInternalException(); } } private void addBanPoints(IpSession session, int level, int points) { addBanPoints(session, null, null, level, points); } private void addBanPoints(IpSession session, String hwid, String account, int level, int points) { session.addBanPoints(points); String toString = new StringBuilder().append("[").append(((account != null) && (account.length() > 0)) ? new StringBuilder().append("login : ").append(account).append(", ").toString() : "").append("ip : ").append(session.getIP()).append((hwid != null) ? new StringBuilder().append(", hwid : ").append(hwid).toString() : "").append("]").toString(); if (level > 0) { _log.warn(new StringBuilder().append("Client ").append(toString).append(" possible hacker [").append(level).append("], ban points : ").append(session.getBanPoints()).append(".").toSt ring()); } else { _log.warn(new StringBuilder().append("Client ").append(toString).append(" is bot or old client [").append(level).append("] , ban points : ").append(session.getBanPoints()).append(".").toSt ring()); } if (Config.LAMEGUARD_MAX_BAN_POINTS <= session.getBanPoints()) { _log.warn(new StringBuilder().append("Client ").append(toString).append(" has reached ban points limit.").toString()); BanList.getInstance().addIP(session.getIP(), account, level); if (hwid != null) BanList.getInstance().addHWID(hwid, account, level); } } private void cleanUpAwaiting() { if (Math.abs(System.currentTimeMillis() - this.lastCleanUp) < Config.LAMEGUARD_CLEANUP_DELAY) return; _log.debug("Awaiting clients clean up..."); for (Iterator i$ = this.awaitingSessions.keySet().iterator(); i$.hasNext(); ) { Object client = i$.next(); ClientSession clientData = (ClientSession)this.awaitingSessions.get(client); if (Math.abs(System.currentTimeMillis() - clientData.getConnectTime()) > Config.LAMEGUARD_MAX_AWAITING_DELAY) { this.awaitingSessions.remove(client); } } this.lastCleanUp = System.currentTimeMillis(); } } Ещо один файл его PacketBuilder.java package com.lameguard; import com.lameguard.exception.LameGuardHackerException; import com.lameguard.exception.LameGuardIncorrectDataExce ption; import com.lameguard.utils.Utils; import java.util.Random; import java.util.zip.CRC32; import java.util.zip.Checksum; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; public class PacketBuilder { private static final Random random = new Random(); public static final void compilePacket(byte[] data, byte[] token, byte[] key) throws Exception { random.nextBytes(data); int offset = 1; for (int i = 0; i < token.length; ++i) { data[offset] = token[i]; data[(offset + 1)] = (byte)(2 + random.nextInt(57)); offset += (data[(offset + 1)] & 0xFF); } for (i = 0; i < key.length; ++i) { data[offset] = key[i]; data[(offset + 1)] = (byte)(2 + random.nextInt(57)); offset += (data[(offset + 1)] & 0xFF); } Checksum checksum = new CRC32(); checksum.update(data, 0, offset); byte[] crc32 = Utils.intToBytes((int)checksum.getValue()); for (int i = 0; i < 4; ++i) { data[offset] = crc32[i]; data[(offset + 1)] = (byte)(2 + random.nextInt(23)); offset += (data[(offset + 1)] & 0xFF); } data[(data.length - 1)] = -1; for (i = 0; i < data.length - 1; ++i) { int tmp218_217 = (data.length - 1); byte[] tmp218_213 = data; tmp218_213[tmp218_217] = (byte)(tmp218_213[tmp218_217] ^ data[i]); } IvParameterSpec ivSpec = new IvParameterSpec(Config.LAMEGUARD_SERVER_KEY.substr ing(0, 16).getBytes()); SecretKeySpec skeySpec = new SecretKeySpec(Config.LAMEGUARD_SERVER_KEY.substrin g(16, 32).getBytes(), "AES"); Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); cipher.init(1, skeySpec, ivSpec); byte[] encrypted = cipher.doFinal(data); System.arraycopy(encrypted, 0, data, 0, data.length); } public static final void decompilePacket(byte[] data, byte[] token, byte[] hwid, byte[] account, byte[] crc32) throws Exception { IvParameterSpec ivSpec = new IvParameterSpec(Config.LAMEGUARD_CLIENT_KEY.substr ing(0, 16).getBytes()); SecretKeySpec skeySpec = new SecretKeySpec(Config.LAMEGUARD_CLIENT_KEY.substrin g(16, 32).getBytes(), "AES"); Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); cipher.init(2, skeySpec, ivSpec); data = cipher.doFinal(data); byte c = -1; for (int i = 0; i < data.length - 1; ++i) c = (byte)(c ^ data[i]); if (c != data[(data.length - 1)]) throw new LameGuardIncorrectDataException(); int offset = 1; for (int i = 0; i < token.length; ++i) { token[i] = (byte)(data[offset] ^ data[0]); offset += (data[(offset + 1)] & 0xFF); } for (i = 0; i < hwid.length; ++i) { hwid[i] = (byte)(data[offset] ^ data[0]); offset += (data[(offset + 1)] & 0xFF); } for (i = 0; i < account.length; ++i) { account[i] = (byte)(data[offset] ^ data[0]); offset += (data[(offset + 1)] & 0xFF); if (account[i] == 0) break; } Checksum checksum = new CRC32(); checksum.update(data, 0, offset); for (int i = 0; i < crc32.length; ++i) { crc32[i] = (byte)(data[offset] ^ data[0]); offset += (data[(offset + 1)] & 0xFF); } if ((Utils.bytesToInt(crc32, 0) & 0xFFFFFFFF) != checksum.getValue()) { if (Utils.bytesToInt(token, 0) == Utils.bytesToInt(crc32, 0)) throw new LameGuardHackerException(); throw new LameGuardIncorrectDataException(); } random.nextBytes(data); } } Я взял защиту за 2008-начало 2009 январь. Декомпилировал в JD вообщем вот что получилось решайте сами! LameGuard.java /* */ package com.lameguard; /* */ /* */ import com.lameguard.exception.LameGuardClientBannedExcep tion; /* */ import com.lameguard.exception.LameGuardException; /* */ import com.lameguard.exception.LameGuardHackerException; /* */ import com.lameguard.exception.LameGuardIncorrectDataExce ption; /* */ import com.lameguard.exception.LameGuardIncorrectPatchExc eption; /* */ import com.lameguard.exception.LameGuardIncorrectRevision Exception; /* */ import com.lameguard.exception.LameGuardIncorrectVersionE xception; /* */ import com.lameguard.exception.LameGuardInstanceLimitExce ption; /* */ import com.lameguard.exception.LameGuardInternalException ; /* */ import com.lameguard.session.ClientSession; /* */ import com.lameguard.session.IpSession; /* */ import com.lameguard.utils.Utils; /* */ import java.util.Collections; /* */ import java.util.Iterator; /* */ import java.util.Map; /* */ import java.util.Set; /* */ import java.util.WeakHashMap; /* */ import java.util.concurrent.ConcurrentHashMap; /* */ import org.apache.log4j.Logger; /* */ /* */ public class LameGuard /* */ { /* 29 */ private static final Logger _log = Logger.getLogger(LameGuard.class); /* */ /* 31 */ private static final LameGuard _instance = new LameGuard(); /* */ private final Map<String, IpSession> ipSessions; /* */ private final Map<Object, ClientSession> awaitingSessions; /* */ private final Map<Object, ClientSession> clientSessions; /* */ private long lastCleanUp; /* */ /* */ public static final LameGuard getInstance() /* */ { /* 41 */ return _instance; /* */ } /* */ /* */ private LameGuard() /* */ { /* 46 */ this.awaitingSessions = new ConcurrentHashMap(); /* 47 */ this.clientSessions = Collections.synchronizedMap(new WeakHashMap()); /* 48 */ this.ipSessions = new ConcurrentHashMap(); /* */ /* 50 */ this.lastCleanUp = System.currentTimeMillis(); /* */ } /* */ /* */ public String getHWID(Object client) /* */ { /* 55 */ if (client == null) { /* 56 */ return null; /* */ } /* 58 */ ClientSession clientData = (ClientSession)this.clientSessions.get(client); /* */ /* 60 */ if (clientData == null) { /* 61 */ return null; /* */ } /* 63 */ return clientData.getHWID(); /* */ } /* */ /* */ public void onProtocolVersionPacket(Object client, int revision, int version, int patch, int instances, byte[] data) /* */ throws LameGuardException /* */ { /* 69 */ if ((revision == -2) || (revision == -3) || (revision == 65534) || (revision == 65533)) { /* 70 */ return; /* */ } /* 72 */ String ip = Utils.findIP(client.toString()); /* */ /* 74 */ if (ip == null) /* */ { /* 76 */ _log.warn(new StringBuilder().append("Cannot find ip : ").append(client.toString()).append(".").toString( )); /* 77 */ throw new LameGuardInternalException(); /* */ } /* */ /* 81 */ if (BanList.getInstance().isIPBanned(ip)) /* */ { /* 83 */ _log.info(new StringBuilder().append("Client [ip : ").append(ip).append("] banned by ip, closing connection.").toString()); /* */ /* 85 */ throw new LameGuardClientBannedException(); /* */ } /* */ /* 88 */ IpSession ipSession = (IpSession)this.ipSessions.get(ip); /* */ /* 90 */ if (ipSession == null) /* */ { /* 92 */ ipSession = new IpSession(ip); /* 93 */ this.ipSessions.put(ip, ipSession); /* */ } /* */ /* 96 */ if (data == null) /* */ { /* 98 */ if (2106 == Config.LAMEGUARD_LOGIN_PORT) /* */ { /* 100 */ addBanPoints(ipSession, 0, Config.LAMEGUARD_INCORRECT_CLIENT_BAN_POINTS); /* */ /* 102 */ throw new LameGuardIncorrectRevisionException(); /* */ } /* */ /* 106 */ addBanPoints(ipSession, 1, Config.LAMEGUARD_INCORRECT_PACKETS_BAN_POINTS); /* */ /* 108 */ throw new LameGuardIncorrectDataException(); /* */ } /* */ /* 112 */ int start = (data[1] & 0xFF) << 8 | (data[0] & 0xFF) << 0; /* 113 */ version ^= start; /* 114 */ patch ^= start; /* 115 */ instances ^= start; /* */ /* 119 */ if ((version < Config.LAMEGUARD_MIN_VERSION) || (version > Config.LAMEGUARD_MAX_VERSION)) /* */ { /* 121 */ addBanPoints(ipSession, 0, Config.LAMEGUARD_INCORRECT_VERSION_BAN_POINTS); /* */ /* 123 */ throw new LameGuardIncorrectVersionException(); /* */ } /* */ /* 126 */ byte[] a_crc32 = new byte[4]; /* 127 */ byte[] a_token = new byte[4]; /* 128 */ byte[] a_hwid = new byte[16]; /* 129 */ byte[] a_account = new byte[16]; /* */ try /* */ { /* 133 */ PacketBuilder.decompilePacket(data, a_token, a_hwid, a_account, a_crc32); /* */ } /* */ catch (LameGuardHackerException lghe) /* */ { /* 137 */ String hwid = Utils.asHex(a_hwid); /* 138 */ String account = new String(a_account).trim(); /* */ /* 140 */ addBanPoints(ipSession, hwid, account, 4, Config.LAMEGUARD_HACKER_DETECT_BAN_POINTS); /* */ /* 142 */ throw lghe; /* */ } /* */ catch (LameGuardIncorrectDataException lgide) /* */ { /* 146 */ addBanPoints(ipSession, 2, Config.LAMEGUARD_INCORRECT_PACKETS_BAN_POINTS); /* */ /* 148 */ throw lgide; /* */ } /* */ catch (Exception e) /* */ { /* 152 */ _log.error("Error while decrypting packet :", e); /* */ /* 154 */ throw new LameGuardInternalException(); /* */ } /* */ /* 157 */ String hwid = Utils.asHex(a_hwid); /* 158 */ String account = new String(a_account).trim(); /* 159 */ int crc32 = Utils.bytesToInt(a_crc32, 0); /* 160 */ int token = Utils.bytesToInt(a_token, 0); /* */ /* 162 */ ClientSession clientSession = new ClientSession(ip, hwid, account, token); /* */ /* 165 */ if (BanList.getInstance().isHWIDBanned(hwid)) /* */ { /* 167 */ _log.info(new StringBuilder().append("Client ").append(clientSession).append(" banned by hwid, closing connection.").toString()); /* */ /* 169 */ throw new LameGuardClientBannedException(); /* */ } /* */ /* 173 */ if (!ipSession.isUnique(token, crc32)) /* */ { /* 175 */ addBanPoints(ipSession, hwid, account, 3, Config.LAMEGUARD_DUPLICATE_PACKETS_BAN_POINTS); /* */ /* 177 */ throw new LameGuardHackerException(); /* */ } /* */ /* 180 */ ipSession.setData(token, crc32); /* */ /* 182 */ if ((patch < Config.LAMEGUARD_MIN_PATCH_VERSION) || (patch > Config.LAMEGUARD_MAX_PATCH_VERSION)) /* */ { /* 184 */ _log.info(new StringBuilder().append("Client ").append(clientSession).append(" has incorrect patch version : ").append(patch).append(", closing connection.").toString()); /* */ /* 186 */ throw new LameGuardIncorrectPatchException(); /* */ } /* */ /* 189 */ if (instances > Config.LAMEGUARD_MAX_INSTANCES) /* */ { /* 191 */ _log.info(new StringBuilder().append("Client ").append(clientSession).append(" exceed maximum of allowed loaded instances : ").append(instances).append(", closing connection.").toString()); /* */ /* 193 */ throw new LameGuardInstanceLimitException(); /* */ } /* */ /* 196 */ _log.info(new StringBuilder().append("Client ").append(clientSession).append(" connected, ip ban points : ").append(ipSession.getBanPoints()).append(".").to String()); /* */ /* 198 */ cleanUpAwaiting(); /* 199 */ this.awaitingSessions.put(client, clientSession); /* */ } /* */ /* */ public void onKeyPacket(Object client, byte[] key, byte[] data) throws LameGuardException /* */ { /* 204 */ if (this.awaitingSessions.containsKey(client)) /* */ { /* 206 */ ClientSession clientData = (ClientSession)this.awaitingSessions.get(client); /* */ try /* */ { /* 210 */ byte[] a_token = new byte[4]; /* 211 */ a_token = Utils.intToBytes(clientData.getToken()); /* */ /* 213 */ byte[] a_key = new byte[8]; /* 214 */ System.arraycopy(key, 0, a_key, 0, a_key.length); /* */ /* 216 */ PacketBuilder.compilePacket(data, a_token, a_key); /* */ /* 218 */ this.clientSessions.put(client, clientData); /* */ } /* */ catch (Exception e) /* */ { /* 224 */ throw new LameGuardInternalException(); /* */ } /* */ finally /* */ { /* 228 */ this.awaitingSessions.remove(client); /* */ } /* */ } /* */ else /* */ { /* 233 */ _log.error(new StringBuilder().append("Error while sending lameguard init packet. Client : ").append(client.toString()).append(" is not in awaiting list!").toString()); /* 234 */ throw new LameGuardInternalException(); /* */ } /* */ } /* */ /* */ private void addBanPoints(IpSession session, int level, int points) /* */ { /* 240 */ addBanPoints(session, null, null, level, points); /* */ } /* */ /* */ private void addBanPoints(IpSession session, String hwid, String account, int level, int points) /* */ { /* 245 */ session.addBanPoints(points); /* */ /* 247 */ String toString = new StringBuilder().append("[").append(((account != null) && (account.length() > 0)) ? new StringBuilder().append("login : ").append(account).append(", ").toString() : "").append("ip : ").append(session.getIP()).append((hwid != null) ? new StringBuilder().append(", hwid : ").append(hwid).toString() : "").append("]").toString(); /* */ /* 250 */ if (level > 0) /* */ { /* 252 */ _log.warn(new StringBuilder().append("Client ").append(toString).append(" possible hacker [").append(level).append("], ban points : ").append(session.getBanPoints()).append(".").toSt ring()); /* */ } /* */ else /* */ { /* 256 */ _log.warn(new StringBuilder().append("Client ").append(toString).append(" is bot or old client [").append(level).append("] , ban points : ").append(session.getBanPoints()).append(".").toSt ring()); /* */ } /* */ /* 259 */ if (Config.LAMEGUARD_MAX_BAN_POINTS > session.getBanPoints()) /* */ return; /* 261 */ _log.warn(new StringBuilder().append("Client ").append(toString).append(" has reached ban points limit.").toString()); /* */ /* 263 */ BanList.getInstance().addIP(session.getIP(), account, level); /* */ /* 265 */ if (hwid != null) /* 266 */ BanList.getInstance().addHWID(hwid, account, level); /* */ } /* */ /* */ private void cleanUpAwaiting() /* */ { /* 272 */ if (Math.abs(System.currentTimeMillis() - this.lastCleanUp) < Config.LAMEGUARD_CLEANUP_DELAY) { /* 273 */ return; /* */ } /* 275 */ _log.debug("Awaiting clients clean up..."); /* */ /* 277 */ for (Iterator i$ = this.awaitingSessions.keySet().iterator(); i$.hasNext(); ) { Object client = i$.next(); /* */ /* 279 */ ClientSession clientData = (ClientSession)this.awaitingSessions.get(client); /* */ /* 281 */ if (Math.abs(System.currentTimeMillis() - clientData.getConnectTime()) > Config.LAMEGUARD_MAX_AWAITING_DELAY) /* */ { /* 283 */ this.awaitingSessions.remove(client); /* */ } } /* */ /* */ /* 287 */ this.lastCleanUp = System.currentTimeMillis(); /* */ } /* */ } /* Location: C:\Documents and Settings\Admin\Рабочий стол\lameguard\lameguard-1.9.3.jar * Qualified Name: com.lameguard.LameGuard * JD-Core Version: 0.5.4 */ PacketBuilder.java /* */ package com.lameguard; /* */ /* */ import com.lameguard.exception.LameGuardHackerException; /* */ import com.lameguard.exception.LameGuardIncorrectDataExce ption; /* */ import com.lameguard.utils.Utils; /* */ import java.util.Random; /* */ import java.util.zip.CRC32; /* */ import java.util.zip.Checksum; /* */ import javax.crypto.Cipher; /* */ import javax.crypto.spec.IvParameterSpec; /* */ import javax.crypto.spec.SecretKeySpec; /* */ /* */ public class PacketBuilder /* */ { /* 21 */ private static final Random random = new Random(); /* */ /* */ public static final void compilePacket(byte[] data, byte[] token, byte[] key) throws Exception /* */ { /* 25 */ random.nextBytes(data); /* */ /* 27 */ int offset = 1; /* */ /* 29 */ for (int i = 0; i < token.length; ++i) /* */ { /* 31 */ data[offset] = token[i]; /* 32 */ data[(offset + 1)] = (byte)(2 + random.nextInt(57)); /* 33 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 36 */ for (int i = 0; i < key.length; ++i) /* */ { /* 38 */ data[offset] = key[i]; /* 39 */ data[(offset + 1)] = (byte)(2 + random.nextInt(57)); /* 40 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 43 */ Checksum checksum = new CRC32(); /* 44 */ checksum.update(data, 0, offset); /* */ /* 46 */ byte[] crc32 = Utils.intToBytes((int)checksum.getValue()); /* */ /* 48 */ for (int i = 0; i < 4; ++i) /* */ { /* 50 */ data[offset] = crc32[i]; /* 51 */ data[(offset + 1)] = (byte)(2 + random.nextInt(23)); /* 52 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 55 */ data[(data.length - 1)] = -1; /* */ /* 57 */ for (int i = 0; i < data.length - 1; ++i) /* */ { /* */ int tmp218_217 = (data.length - 1); data[tmp218_217] = (byte)(data[tmp218_217] ^ data[i]); /* */ } /* 60 */ IvParameterSpec ivSpec = new IvParameterSpec(Config.LAMEGUARD_SERVER_KEY.substr ing(0, 16).getBytes()); /* 61 */ SecretKeySpec skeySpec = new SecretKeySpec(Config.LAMEGUARD_SERVER_KEY.substrin g(16, 32).getBytes(), "AES"); /* */ /* 63 */ Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); /* */ /* 65 */ cipher.init(1, skeySpec, ivSpec); /* */ /* 67 */ byte[] encrypted = cipher.doFinal(data); /* */ /* 69 */ System.arraycopy(encrypted, 0, data, 0, data.length); /* */ } /* */ /* */ public static final void decompilePacket(byte[] data, byte[] token, byte[] hwid, byte[] account, byte[] crc32) throws Exception /* */ { /* 74 */ IvParameterSpec ivSpec = new IvParameterSpec(Config.LAMEGUARD_CLIENT_KEY.substr ing(0, 16).getBytes()); /* 75 */ SecretKeySpec skeySpec = new SecretKeySpec(Config.LAMEGUARD_CLIENT_KEY.substrin g(16, 32).getBytes(), "AES"); /* */ /* 77 */ Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); /* */ /* 79 */ cipher.init(2, skeySpec, ivSpec); /* */ /* 81 */ data = cipher.doFinal(data); /* */ /* 83 */ byte c = -1; /* */ /* 85 */ for (int i = 0; i < data.length - 1; ++i) { /* 86 */ c = (byte)(c ^ data[i]); /* */ } /* 88 */ if (c != data[(data.length - 1)]) { /* 89 */ throw new LameGuardIncorrectDataException(); /* */ } /* 91 */ int offset = 1; /* */ /* 93 */ for (int i = 0; i < token.length; ++i) /* */ { /* 95 */ token[i] = (byte)(data[offset] ^ data[0]); /* 96 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 99 */ for (int i = 0; i < hwid.length; ++i) /* */ { /* 101 */ hwid[i] = (byte)(data[offset] ^ data[0]); /* 102 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 105 */ for (int i = 0; i < account.length; ++i) /* */ { /* 107 */ account[i] = (byte)(data[offset] ^ data[0]); /* 108 */ offset += (data[(offset + 1)] & 0xFF); /* */ /* 110 */ if (account[i] == 0) { /* */ break; /* */ } /* */ } /* 114 */ Checksum checksum = new CRC32(); /* 115 */ checksum.update(data, 0, offset); /* */ /* 117 */ for (int i = 0; i < crc32.length; ++i) /* */ { /* 119 */ crc32[i] = (byte)(data[offset] ^ data[0]); /* 120 */ offset += (data[(offset + 1)] & 0xFF); /* */ } /* */ /* 123 */ if ((Utils.bytesToInt(crc32, 0) & 0xFFFFFFFF) != checksum.getValue()) /* */ { /* 125 */ if (Utils.bytesToInt(token, 0) == Utils.bytesToInt(crc32, 0)) { /* 126 */ throw new LameGuardHackerException(); /* */ } /* 128 */ throw new LameGuardIncorrectDataException(); /* */ } /* */ /* 131 */ random.nextBytes(data); /* */ } /* */ } /* Location: C:\Documents and Settings\Admin\Рабочий стол\lameguard\lameguard-1.9.3.jar * Qualified Name: com.lameguard.PacketBuilder * JD-Core Version: 0.5.4 */ Защита 2008-2009 год http://depositfiles.com/files/n2vdqhgbg Сделайте декомпил и увидите что за исходники он продает (ну и защиту наверно). Решать вам Последний раз редактировалось Mangol; 24.05.2010 в 13:07. Причина: Добавлено сообщение |
|
24.05.2010, 13:56 | #14 |
Пользователь
|
Re: LameGuard
Поездун детектед
Еще и нагло врет что работал в ЛГ, потом говорит что не работал, а его друг работает, и скидывает ему обновления Ахах) Автор полный лох) Удачи ему с декомпилами |
24.05.2010, 21:12 | #16 |
Пользователь
|
Re: LameGuard
Ах, кстати... Цену то он назвал 15-30$
|
25.05.2010, 03:53 | #18 | |
ЛК под любые игры
|
Re: LameGuard
Цитата:
Последний раз редактировалось Dizband; 30.06.2012 в 18:34. |
|
20.05.2014, 17:50 | #19 |
Пользователь
|
Re: LameGuard
глупый вопрос появился ,как защита будет логин сервер определять если регить по домену ,ведь делегирование на домен делается для сайта ,а у дедика же другой ip?объясните плиз?
|
20.05.2014, 18:00 | #20 |
Герой
|
Re: LameGuard
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1) | |
|
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
[шара] - защита LameGuard | Tonchi | Lineage II | 13 | 15.04.2010 19:58 |
LameGuard vs SPS | RaZoR.eXe | Lineage II | 13 | 22.02.2010 04:21 |