Компиляция защиты rGuard

Soanymore

Выдающийся
Только чтение
Сообщения
191
Розыгрыши
0
Репутация
23
Реакции
491
Баллы
1 393
Код:
init:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\ServerSide\build

compile-guard:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\ServerSide\build\classes
    [javac] Compiling 21 source files to C:\Users\Владимир\Desktop\ServerSide\build\classes
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\commons-dbcp-1.4.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\commons-io-2.4.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\commons-lang3-3.3.2.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\commons-pool-1.6.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\dom4j-2.0.0-ALPHA-2.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\ecj-4.4.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\ehcache-core-2.6.8.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\javolution-5.5.1.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\log4j-1.2.17.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\mysql-connector-java-5.1.33-bin.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\napile.primitive.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\slf4j-api-1.7.7.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\slf4j-log4j12-1.7.7.jar": no such file or directory
    [javac] warning: [path] bad path element "C:\Users\Владимир\Desktop\ServerSide\lib\trove-3.0.3.jar": no such file or directory
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDAdminBan.java:8: error: HWIDAdminBan is not abstract and does not override abstract method getAdminCommandList() in IAdminCommandHandler
    [javac] public class HWIDAdminBan implements IAdminCommandHandler
    [javac]        ^
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDAdminBan.java:16: warning: [rawtypes] found raw type: Enum
    [javac]     public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, Player player)
    [javac]                                    ^
    [javac]   missing type arguments for generic class Enum<E>
    [javac]   where E is a type-variable:
    [javac]     E extends Enum<E> declared in class Enum
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDBan.java:78: error: cannot find symbol
    [javac]             if (_lists.get(i).getHWID().equals(client.getHWID()))
    [javac]                                                      ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDBan.java:93: error: cannot find symbol
    [javac]         String HWID = client.getHWID();
    [javac]                             ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDManager.java:79: error: cannot find symbol
    [javac]             if (_listHWID.get(i).getHWID().equals(client.getHWID()))
    [javac]                                                         ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDManager.java:89: error: cannot find symbol
    [javac]         hInfo.setHwids(client.getHWID());
    [javac]                              ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDManager.java:99: error: cannot find symbol
    [javac]                 statement.setString(2, client.getHWID());
    [javac]                                              ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\hwidmanager\HWIDManager.java:117: error: cannot find symbol
    [javac]                 statement.setString(1, client.getHWID());
    [javac]                                              ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:25: error: cannot find symbol
    [javac]                 client.sendPacket(new SpecialString(1, true, -1, ConfigProtection.PositionXNameServerInfoInClient, ConfigProtection.PositionYNameServerInfoInClient, ConfigProtection.ColorNameServerInfoInClient, (client.getActiveChar().isLangRus() ? "Сервер: " : "Server: ") + ConfigProtection.NameServerInfoInClient));
    [javac]                                                                                                                                                                                                                                           ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:27: error: cannot find symbol
    [javac]                 client.sendPacket(new SpecialString(15, true, -1, ConfigProtection.PositionXRealTimeInClient, ConfigProtection.PositionYRealTimeInClient, ConfigProtection.ColorRealTimeInClient, client.getActiveChar().isLangRus() ? "Реальное время: " : "Real time: "));
    [javac]                                                                                                                                                                                                                         ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:35: error: cannot find symbol
    [javac]             client.sendPacket(new SpecialString(2, true, -1, ConfigProtection.PositionXOnlineInClient, ConfigProtection.PositionYOnlineInClient, ConfigProtection.ColorOnlineInClient, (client.isLangRus() ? "Онлайн: " : "Online: ") + GameObjectsStorage.getAllPlayersCount()));
    [javac]                                                                                                                                                                                               ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: variable client of type Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:43: error: cannot find symbol
    [javac]                 nd = client.isLangRus() ? "Ночь." : "Night.";
    [javac]                            ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: variable client of type Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:45: error: cannot find symbol
    [javac]                 nd = client.isLangRus() ? "День." : "Day.";
    [javac]                            ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: variable client of type Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:54: error: cannot find symbol
    [javac]             client.sendPacket(new SpecialString(3, true, -1, ConfigProtection.PositionXServerTimeInClient, ConfigProtection.PositionYServerTimeInClient, ConfigProtection.ColorServerTimeInClient, (client.isLangRus() ? "Игровое время: " : "Game time: ") + strH + ":" + strM + " (" + nd + ")"));
    [javac]                                                                                                                                                                                                           ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: variable client of type Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:57: error: cannot find symbol
    [javac]             client.sendPacket(new SpecialString(14, true, -1, ConfigProtection.PositionXPingInClient, ConfigProtection.PositionYPingInClient, ConfigProtection.ColorPingInClient, client.isLangRus() ? "Пинг: " : "Ping: "));
    [javac]                                                                                                                                                                                         ^
    [javac]   symbol:   method isLangRus()
    [javac]   location: variable client of type Player
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:101: error: cannot find symbol
    [javac]                 if (client != null && client.getActiveChar() != null && !client.isGameGuardOk())
    [javac]                                                                                ^
    [javac]   symbol:   method isGameGuardOk()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\ProtectionManager.java:108: error: cannot find symbol
    [javac]                     _log.info("Client "+client+" is banned. Kicked! |HWID: " + client.getHWID() + " IP: " + client.getIpAddr());
    [javac]                                                                                      ^
    [javac]   symbol:   method getHWID()
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\clientpackets\GameGuardReply.java:21: error: cannot find symbol
    [javac]             client.setGameGuardOk(true);
    [javac]                   ^
    [javac]   symbol:   method setGameGuardOk(boolean)
    [javac]   location: variable client of type GameClient
    [javac] C:\Users\Владимир\Desktop\ServerSide\java\rGuard\network\clientpackets\GameGuardReply.java:23: error: cannot find symbol
    [javac]             client.setGameGuardOk(false);
    [javac]                   ^
    [javac]   symbol:   method setGameGuardOk(boolean)
    [javac]   location: variable client of type GameClient
    [javac] 18 errors
    [javac] 15 warnings

BUILD FAILED
C:\Users\Владимир\Desktop\ServerSide\build-guard.xml:48: Compile failed; see the compiler error output for details.

Total time: 1 second
Подскажите что не так делаю?
p.s. знаю о неактуальности данной защиты, просто таким способом я решил учиться
 

Делал так,скомпилировал ядро сервера,ядро сервера закинул в ServerSide,после того начал компилировать защиту
 
С меня лайк за подсказку
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Точно не уверен, но может быть папку Владимир, переименовать к примеру на Vladimir
 
Move all files to C://Serverside
 
Что вы за бред говорите?
 
По ошибке видно что нужно добавить методы в GameClient, Player
 
По ошибке видно что нужно добавить методы в GameClient, Player
То есть получаеться добавить методы в GameClient, Player,скомпилировать ядро,ядро закинуть в папку с защитой в либы и скомпилировать защиту?
 
То есть получаеться добавить методы в GameClient, Player,скомпилировать ядро,ядро закинуть в папку с защитой в либы и скомпилировать защиту?
В зависимости от того, как у Вас подключается защита. Но в большинстве случаев именно так.
 
Добавил импорты и методы
В Player.java
Код:
import rGuard.Protection;
import rGuard.network.ProtectionManager;

/**
     * Method kick.
     */
    public void kick()
    {
        if(Protection.isProtectionOn())
        {
            ProtectionManager.scheduleSendPacketToClient(0, this);
        }
        if (_connection != null)
        {
            _connection.close(LeaveWorld.STATIC);
            setNetConnection(null);
        }
       
        prepareToLogout();
        deleteMe();
    }
   
    /**
     * Method restart.
     */
    public void restart()
    {
        if(Protection.isProtectionOn())
        {
            ProtectionManager.scheduleSendPacketToClient(0, this);
        }
        if (_connection != null)
        {
            _connection.setActiveChar(null);
            setNetConnection(null);
        }
       
        prepareToLogout();
        deleteMe();
    }
   
    /**
     * Method logout.
     */
    public void logout()
    {
        if(Protection.isProtectionOn())
        {
            ProtectionManager.scheduleSendPacketToClient(0, this);
        }
        if (_connection != null)
        {
            _connection.close(ServerClose.STATIC);
            setNetConnection(null);
        }
       
        prepareToLogout();
        deleteMe();
    }
В GameClient.java
Код:
import rGuard.Protection;

public byte[] enableCrypt()
    {
        byte[] key = BlowFishKeygen.getRandomKey();
        _crypt.setKey(key);

        if(Protection.isProtectionOn())
        {
            key = Protection.getKey(key);
        }

        return key;
    }
 
Код:
checkRequirements:

clean:

init:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build

compile-commons:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build\classes
    [javac] Compiling 84 source files to C:\Users\Владимир\Desktop\build\classes

commons-jar:
      [jar] Building jar: C:\Users\Владимир\Desktop\build\l2r-commons.jar

compile-gameserver:
   [delete] Deleting directory C:\Users\Владимир\Desktop\build\classes
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build\classes
    [javac] Compiling 1899 source files to C:\Users\Владимир\Desktop\build\classes
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\network\GameClient.java:24: error: package rGuard does not exist
    [javac] import rGuard.Protection;
    [javac]              ^
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:59: error: package rGuard does not exist
    [javac] import rGuard.Protection;
    [javac]              ^
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:60: error: package rGuard.network does not exist
    [javac] import rGuard.network.ProtectionManager;
    [javac]                      ^
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\network\GameClient.java:494: error: cannot find symbol
    [javac]         if(Protection.isProtectionOn())
    [javac]            ^
    [javac]   symbol:   variable Protection
    [javac]   location: class GameClient
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\network\GameClient.java:496: error: cannot find symbol
    [javac]             key = Protection.getKey(key);
    [javac]                   ^
    [javac]   symbol:   variable Protection
    [javac]   location: class GameClient
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:929: error: cannot find symbol
    [javac]         if(Protection.isProtectionOn())
    [javac]            ^
    [javac]   symbol:   variable Protection
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:931: error: cannot find symbol
    [javac]             ProtectionManager.scheduleSendPacketToClient(0, this);
    [javac]             ^
    [javac]   symbol:   variable ProtectionManager
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:948: error: cannot find symbol
    [javac]         if(Protection.isProtectionOn())
    [javac]            ^
    [javac]   symbol:   variable Protection
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:950: error: cannot find symbol
    [javac]             ProtectionManager.scheduleSendPacketToClient(0, this);
    [javac]             ^
    [javac]   symbol:   variable ProtectionManager
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:967: error: cannot find symbol
    [javac]         if(Protection.isProtectionOn())
    [javac]            ^
    [javac]   symbol:   variable Protection
    [javac]   location: class Player
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\model\Player.java:969: error: cannot find symbol
    [javac]             ProtectionManager.scheduleSendPacketToClient(0, this);
    [javac]             ^
    [javac]   symbol:   variable ProtectionManager
    [javac]   location: class Player
    [javac] 11 errors

BUILD FAILED
C:\Users\Владимир\Desktop\Lindvior Source\build.xml:72: Compile failed; see the compiler error output for details.

Total time: 9 seconds
 
А Player.java?
 
Код:
@SuppressWarnings("deprecation")
    public void checkHwid(String allowedHwid)
    {
        if(!allowedHwid.equalsIgnoreCase("") && !getHWID().equalsIgnoreCase(allowedHwid))
        {
            closeNow(false);
        }
    }

    public String getHWID()
    {
        return _hwid;
    }

    public void setHWID(String hwid)
    {
        _hwid = hwid;
    }

    public boolean isProtected()
    {
        return _isProtected;
    }

    public void setProtected(boolean isProtected)
    {
        _isProtected = isProtected;
    }

    public SecondaryPasswordAuth getSecondaryAuth()
    {
        return _secondaryAuth;
    }

    public boolean isGameGuardOk()
    {
        return _gameGuardOk;
    }

    public void setGameGuardOk(boolean gameGuardOk)
    {
        _gameGuardOk = gameGuardOk;
    }

    public int getPremiumPoint()
    {
        return _points;
    }

    public void setPremiumPoint(int points)
    {
        _points = points;
        LoginServerCommunication.getInstance().sendPacket(new PointConnectionGS(getLogin(), getPremiumPoint()));
    }

Вот полный код который в GameClient надо
 
Код:
checkRequirements:

clean:

init:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build

compile-commons:
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build\classes
    [javac] Compiling 84 source files to C:\Users\Владимир\Desktop\build\classes

commons-jar:
      [jar] Building jar: C:\Users\Владимир\Desktop\build\l2r-commons.jar

compile-gameserver:
   [delete] Deleting directory C:\Users\Владимир\Desktop\build\classes
    [mkdir] Created dir: C:\Users\Владимир\Desktop\build\classes
    [javac] Compiling 1899 source files to C:\Users\Владимир\Desktop\build\classes
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\network\GameClient.java:615: error: cannot find symbol
    [javac]         _gameGuardOk = gameGuardOk;
    [javac]         ^
    [javac]   symbol:   variable _gameGuardOk
    [javac]   location: class GameClient
    [javac] C:\Users\Владимир\Desktop\Lindvior Source\java\l2r\gameserver\network\GameClient.java:620: error: cannot find symbol
    [javac]         return _gameGuardOk;
    [javac]                ^
    [javac]   symbol:   variable _gameGuardOk
    [javac]   location: class GameClient
    [javac] 2 errors

BUILD FAILED
C:\Users\Владимир\Desktop\Lindvior Source\build.xml:72: Compile failed; see the compiler error output for details.

Total time: 9 seconds
Че то забыл(
 

Вложения

  • GameClient.zip
    3,4 КБ · Просмотры: 60
переменную типа boolean что не нужно объявлять? _gameGuardOk, там ведь понятным языком написано в описании ошибки что не так...

П.С. Если не понимаете что от вас хочет компилятор(что пишет в ошибках) пользуйтесь гугл транслейтом.
 
Переменную
_gameGuardOk
 
Назад
Сверху Снизу