private static Packet getRegistrationPacket(String packet) {
        
        Scanner sc = new Scanner(packet);
        
        if(!sc.next().equals(Packet.PACKET_CODES.REGISTRATION_CMD))    return null;
        Packet res = new Packet(Packet.PACKET_CODES.REGISTRATION_CMD);
        
        HashMap<String, String> data = new HashMap<String, String>();
        
        if(!sc.hasNext())    return null;
        data.put(Packet.LOGIN_KEY, sc.next());
        
        if(!sc.hasNext())    return null;
        data.put(Packet.PASSWORD_KEY, sc.next());
        
        res.setData(data);
        
        return res;
    }