Yes, it was, but i cant figure out what on earth this is doing:
Code:
public boolean processLogin(int cs)
{
int ss=tcp.connectToHost(remoteLoginIP,remoteLoginPort);
if(ss==-1) return false;
logFS1=0;
logFS2=0;
logFC1=0;
logFC2=0;
logTS1=0;
logTS2=0;
logTC1=0;
logTC2=0;
byte[] b;
b=getLoginPacketFromClient(cs);
if(b==null) return false;
sendLoginPacketToServer(ss,b);
b=getLoginPacketFromServer(ss);
if(b==null) return false;
String ip="";
String proxip=new String(lip);
if(tcp.getIPAddress(cs).equals("127.0.0.1"))
proxip="127.0.0.1\0\0\0\0\0\0\0";
try
{
if(b[2]==0x1f && b[3]==0x04)
{
for(int i=12; i<28; i++)
{
if(b[i]>0)
ip+=(char)b[i];
b[i]=proxip.getBytes()[i-12];
}
}
}
catch(Exception ee) { return false; }
remoteMapIP=ip;
try
{
p1=(b[4]&0xFF)|((b[5]&0xFF)<<8)|((b[6]&0xFF)<<16)|((b[7]&0xFF)<<24);
p2=(b[8]&0xFF)|((b[9]&0xFF)<<8)|((b[10]&0xFF)<<16)|((b[11]&0xFF)<<24);
remoteMapPort=(b[28]&0xFF)|((b[29]&0xFF)<<8)|((b[30]&0xFF)<<16)|((b[31]&0xFF)<<24);
b[28]=(byte)(localMapPort&0xFF);
b[29]=(byte)((localMapPort&0xFF00)>>8);
b[30]=(byte)((localMapPort&0xFF0000)>>16);
b[31]=(byte)((localMapPort&0xFF000000)>>24);
}
catch(Exception ee) { return false; }
sendLoginPacketToClient(cs,b);
b=getLoginPacketFromClient(cs);
if(b==null) return false;
sendLoginPacketToServer(ss,b);
return true;
}
all i want is a simple login teh char decrypt, encrypt routine, or atlease some help in creating one.