Thread: Logging in with the same account

Results 1 to 3 of 3
  1. #1 Logging in with the same account 
    Registered Member
    Join Date
    Mar 2014
    Posts
    42
    Thanks given
    5
    Thanks received
    2
    Rep Power
    15
    Basically I can log in with the same account multiple times. I checked the client code but it seems to be all there, (obviously its not). Any help is appreciated, thanks!

    Spoiler for Login Method:
    Code:
    private void login(String s, String s1, boolean flag) {
    		signlink.errorname = s;
    		try {
    			if (!flag) {
    				loginMessage2 = "";
    				loginMessage1 = "Connecting to server...";
    				drawLoginScreen();
    			}
    			socketStream = new RSSocket(this, openSocket(43594 + portOff));
    			long l = TextClass.longForName(s);
    			int i = (int) (l >> 16 & 31L);
    			stream.currentOffset = 0;
    			stream.writeWordBigEndian(14);
    			stream.writeWordBigEndian(i);
    			socketStream.queueBytes(2, stream.buffer);
    			for (int j = 0; j < 8; j++)
    				socketStream.read();
    
    			int k = socketStream.read();
    			int i1 = k;
    			if (k == 0) {
    				socketStream.flushInputStream(inStream.buffer, 8);
    				inStream.currentOffset = 0;
    				aLong1215 = inStream.readQWord();
    				int ai[] = new int[4];
    				ai[0] = (int) (Math.random() * 99999999D);
    				ai[1] = (int) (Math.random() * 99999999D);
    				ai[2] = (int) (aLong1215 >> 32);
    				ai[3] = (int) aLong1215;
    				stream.currentOffset = 0;
    				stream.writeWordBigEndian(10);
    				stream.writeDWord(ai[0]);
    				stream.writeDWord(ai[1]);
    				stream.writeDWord(ai[2]);
    				stream.writeDWord(ai[3]);
    				stream.writeDWord(signlink.uid + j29);
    				// stream.writeString(CreateUID.generateUID());
    				stream.writeString(s);
    				stream.writeString(s1);
    				stream.doKeys();
    				aStream_847.currentOffset = 0;
    				if (flag)
    					aStream_847.writeWordBigEndian(18);
    				else
    					aStream_847.writeWordBigEndian(16);
    				aStream_847.writeWordBigEndian(stream.currentOffset + 36 + 1
    						+ 1 + 2);
    				aStream_847.writeWordBigEndian(255);
    				aStream_847.writeWord(317);
    				aStream_847.writeWordBigEndian(lowMem ? 1 : 0);
    				for (int l1 = 0; l1 < 9; l1++)
    					aStream_847.writeDWord(expectedCRCs[l1]);
    
    				aStream_847.writeBytes(stream.buffer, stream.currentOffset, 0);
    				stream.encryption = new ISAACRandomGen(ai);
    				for (int j2 = 0; j2 < 4; j2++)
    					ai[j2] += 50;
    
    				encryption = new ISAACRandomGen(ai);
    				socketStream.queueBytes(aStream_847.currentOffset,
    						aStream_847.buffer);
    				k = socketStream.read();
    			}
    			if (k == 1) {
    				try {
    					Thread.sleep(2000L);
    				} catch (Exception _ex) {
    				}
    				login(s, s1, flag);
    				return;
    			}
    			if (k == 2) {
    				myPrivilege = socketStream.read();
    				flagged = socketStream.read() == 1;
    				aLong1220 = 0L;
    				anInt1022 = 0;
    				mouseDetection.coordsIndex = 0;
    				super.awtFocus = true;
    				aBoolean954 = true;
    				loggedIn = true;
    				stream.currentOffset = 0;
    				inStream.currentOffset = 0;
    				pktType = -1;
    				anInt841 = -1;
    				anInt842 = -1;
    				anInt843 = -1;
    				pktSize = 0;
    				anInt1009 = 0;
    				anInt1104 = 0;
    				anInt1011 = 0;
    				anInt855 = 0;
    				menuActionRow = 0;
    				menuOpen = false;
    				super.idleTime = 0;
    				for (int j1 = 0; j1 < 100; j1++)
    					chatMessages[j1] = null;
    
    				itemSelected = 0;
    				spellSelected = 0;
    				loadingStage = 0;
    				currentSound = 0;
    				setNorth();
    				anInt1021 = 0;
    				anInt985 = -1;
    				destX = 0;
    				destY = 0;
    				playerCount = 0;
    				npcCount = 0;
    				for (int i2 = 0; i2 < maxPlayers; i2++) {
    					playerArray[i2] = null;
    					aStreamArray895s[i2] = null;
    				}
    
    				for (int k2 = 0; k2 < 16384; k2++)
    					npcArray[k2] = null;
    
    				myPlayer = playerArray[myPlayerIndex] = new Player();
    				aClass19_1013.removeAll();
    				aClass19_1056.removeAll();
    				for (int l2 = 0; l2 < 4; l2++) {
    					for (int i3 = 0; i3 < 104; i3++) {
    						for (int k3 = 0; k3 < 104; k3++)
    							groundArray[l2][i3][k3] = null;
    
    					}
    
    				}
    
    				aClass19_1179 = new NodeList();
    				fullscreenInterfaceID = -1;
    				anInt900 = 0;
    				friendsCount = 0;
    				dialogID = -1;
    				backDialogID = -1;
    				openInterfaceID = -1;
    				invOverlayInterfaceID = -1;
    				anInt1018 = -1;
    				aBoolean1149 = false;
    				tabID = 3;
    				inputDialogState = 0;
    				menuOpen = false;
    				messagePromptRaised = false;
    				aString844 = null;
    				anInt1055 = 0;
    				anInt1054 = -1;
    				aBoolean1047 = true;
    				method45();
    				for (int j3 = 0; j3 < 5; j3++)
    					anIntArray990[j3] = 0;
    
    				for (int l3 = 0; l3 < 5; l3++) {
    					atPlayerActions[l3] = null;
    					atPlayerArray[l3] = false;
    				}
    
    				anInt1175 = 0;
    				anInt1134 = 0;
    				anInt986 = 0;
    				anInt1288 = 0;
    				anInt924 = 0;
    				anInt1188 = 0;
    				anInt1155 = 0;
    				anInt1226 = 0;
    				resetImageProducers2();
    				setDefaultCursor();
    				saveConfigurations();
    				// resize(clientWidth, clientHeight);
    				if (is474) {
    					sendFrame126("474", 37058);
    				}
    				if (is554) {
    					sendFrame126("600+", 37058);
    				}
    				if (!is474 && !is554) {
    					sendFrame126("500+", 37058);
    				}
    				if (HPBarToggle) {
    					sendFrame126("@gre@On ", 37061);
    				} else {
    					sendFrame126("@red@Off ", 37061);
    				}
    				if (sky) {
    					sendFrame126("@gre@On", 37065);
    				} else {
    					sendFrame126("@red@Off ", 37065);
    				}
    				if (newDamage) {
    					sendFrame126("@gre@On ", 37059);
    				} else {
    					sendFrame126("@red@Off ", 37059);
    				}
    				if (menuToggle) {
    					sendFrame126("@gre@On", 37062);
    				} else {
    					sendFrame126("@red@Off ", 37062);
    				}
    				if (headname) {
    					sendFrame126("@gre@On", 37063);
    				} else {
    					sendFrame126("@red@Off ", 37063);
    				}
    				if (hitmarks) {
    					sendFrame126("@gre@On ", 37060);
    				} else {
    					sendFrame126("@red@Off ", 37060);
    				}
    				if (headhp) {
    					sendFrame126("@gre@On", 37064);
    				} else {
    					sendFrame126("@red@Off ", 37064);
    				}
    				return;
    			}
    			if (k == 3) {
    				loginMessage1 = "Invalid username or password.";
    				loginMessage2 = "";
    				return;
    			}
    			if (k == 4) {
    				loginMessage1 = "Your account has been disabled.";
    				loginMessage2 = "Please appeal on forums.";
    				return;
    			}
    			if (k == 5) {
    				loginMessage1 = "Your account is already logged in.";
    				loginMessage2 = "Try again in 60 secs...";
    				return;
    			}
    			if (k == 6) {
    				loginMessage1 = "Vengeance has been updated!";
    				loginMessage2 = "Please reload this page.";
    				return;
    			}
    			if (k == 7) {
    				loginMessage1 = "This world is full.";
    				loginMessage2 = "Please use a different world.";
    				return;
    			}
    			if (k == 8) {
    				loginMessage1 = "Unable to connect.";
    				loginMessage2 = "Login server offline.";
    				return;
    			}
    			if (k == 9) {
    				loginMessage1 = "Login limit exceeded.";
    				loginMessage2 = "Too many connections from your address.";
    				return;
    			}
    			if (k == 10) {
    				loginMessage1 = "Unable to connect.";
    				loginMessage2 = "Bad session id.";
    				return;
    			}
    			if (k == 11) {
    				loginMessage2 = "Login server rejected session.";
    				loginMessage2 = "Please try again.";
    				return;
    			}
    			if (k == 12) {
    				loginMessage1 = "You must register an account to play. Visit";
    				loginMessage2 = "Vengeance to register your account.";
    				launchURL("www.vengeanceps.com");
    				return;
    			}
    			if (k == 13) {
    				loginMessage1 = "Could not complete login.";
    				loginMessage2 = "Please try using a different world.";
    				return;
    			}
    			if (k == 14) {
    				loginMessage1 = "The server is being updated.";
    				loginMessage2 = "Please wait 1 minute and try again.";
    				return;
    			}
    			if (k == 15) {
    				loggedIn = true;
    				stream.currentOffset = 0;
    				inStream.currentOffset = 0;
    				pktType = -1;
    				anInt841 = -1;
    				anInt842 = -1;
    				anInt843 = -1;
    				pktSize = 0;
    				anInt1009 = 0;
    				anInt1104 = 0;
    				menuActionRow = 0;
    				menuOpen = false;
    				aLong824 = System.currentTimeMillis();
    				return;
    			}
    			if (k == 16) {
    				loginMessage1 = "Login attempts exceeded.";
    				loginMessage2 = "Please wait 1 minute and try again.";
    				return;
    			}
    			if (k == 17) {
    				loginMessage1 = "You are standing in a members-only area.";
    				loginMessage2 = "To play on this world move to a free area first";
    				return;
    			}
    			if (k == 20) {
    				loginMessage1 = "Invalid loginserver requested";
    				loginMessage2 = "Please try using a different world.";
    				return;
    			}
    			if (k == 22) {
    				loginMessage1 = "You must validate your account. An email";
    				loginMessage2 = "has already been dispatched for verification.";
    				return;
    			}
    			if (k == 21) {
    				for (int k1 = socketStream.read(); k1 >= 0; k1--) {
    					loginMessage1 = "You have only just left another world";
    					loginMessage2 = "Your profile will be transferred in: "
    							+ k1 + " seconds";
    					drawLoginScreen();
    					try {
    						Thread.sleep(1000L);
    					} catch (Exception _ex) {
    					}
    				}
    
    				login(s, s1, flag);
    				return;
    			}
    			if (k == 23) {
    				loginMessage1 = "You have been blacklisted.";
    				loginMessage2 = "Please appeal on the forums.";
    				return;
    			}
    			if (k == -1) {
    				if (i1 == 0) {
    					if (loginFailures < 2) {
    						try {
    							Thread.sleep(2000L);
    						} catch (Exception _ex) {
    						}
    						loginFailures++;
    						login(s, s1, flag);
    						return;
    					} else {
    						loginMessage1 = "Your client is out of date.";
    						loginMessage2 = "Please update your Client @ www.vengeanceps.com";
    						return;
    					}
    				} else {
    					loginMessage1 = "No response from server.";
    					loginMessage2 = "Please try again in 60 seconds.";
    					return;
    				}
    			} else {
    				System.out.println("response:" + k);
    				loginMessage1 = "Unexpected server response";
    				loginMessage2 = "Please try using a different world.";
    				return;
    			}
    		} catch (IOException _ex) {
    			loginMessage1 = "";
    		} catch (Exception e) {
    			System.out.println("Error while generating uid. Skipping step.");
    			e.printStackTrace();
    		}
    		loginMessage1 = "Error connecting to server.";
    	}


    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2014
    Posts
    253
    Thanks given
    39
    Thanks received
    146
    Rep Power
    248
    How do you suppose the client would know anything about the current players online before it even receives the info from the server? That's right, it doesn't. The server is expected to handle things like this (since it has the global player list)
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2014
    Posts
    42
    Thanks given
    5
    Thanks received
    2
    Rep Power
    15
    Quote Originally Posted by Intrice Joe View Post
    How do you suppose the client would know anything about the current players online before it even receives the info from the server? That's right, it doesn't. The server is expected to handle things like this (since it has the global player list)
    If I may ask, where should I look?

    - - - Updated - - -

    Quote Originally Posted by Intrice Joe View Post
    How do you suppose the client would know anything about the current players online before it even receives the info from the server? That's right, it doesn't. The server is expected to handle things like this (since it has the global player list)


    Ah, Thank you.
    Reply With Quote  
     

  4. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2014, 06:29 PM
  2. Replies: 12
    Last Post: 07-02-2013, 04:04 AM
  3. Replies: 5
    Last Post: 05-20-2013, 01:21 PM
  4. Replies: 27
    Last Post: 02-21-2010, 10:27 PM
  5. Replies: 5
    Last Post: 10-30-2008, 11:22 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •