Because the user's contact phone number is an image when the second-hand house information is crawled on the page of 58 city, my horizontal relationship cannot be well identified, so it is easier to capture the android client, previously, it was good. Recently, I found that my mobile phone number was encrypted after I upgraded to 1.3.0.0, So I directly decompiled its android client and found that it uses des encryption, and the Encrypted key is easily obtained, the decryption method is shown below. (Des encryption and decryption is relatively simple)
Java code
Import java. security. SecureRandom;
Import javax. crypto. Cipher;
Import javax. crypto. SecretKey;
Import javax. crypto. SecretKeyFactory;
Import javax. crypto. spec. DESKeySpec;
Public class Decode458 {
Static byte [] key = null; // if necessary, decompile the key to the 58 client.
Public static void main (String [] args) throws Exception {
System. out. println (new String (Decode458.decode (Decode458.convertHexString ("002e674177ae8239982087dcb2e6a99b "))));
System. out. println (Decode458.toHexString (Decode458.encode ("13219863008". getBytes ())));
}
Public static byte [] decode (byte [] paramArrayOfByte ){
Try {
SecureRandom localSecureRandom = new SecureRandom ();
DESKeySpec localDESKeySpec = new DESKeySpec (key );
SecretKey localSecretKey = SecretKeyFactory. getInstance ("DES ")
. GenerateSecret (localreceiveyspec );
Cipher localCipher = Cipher. getInstance ("DES ");
LocalCipher. init (2, localSecretKey, localSecureRandom );
Return localCipher. doFinal (paramArrayOfByte );
} Catch (Exception e ){
E. printStackTrace ();
Return null;
}
}
Public static byte [] encode (byte [] paramArrayOfByte ){
Try {
SecureRandom localSecureRandom = new SecureRandom ();
DESKeySpec localDESKeySpec = new DESKeySpec (key );
SecretKey localSecretKey = SecretKeyFactory. getInstance ("DES ")
. GenerateSecret (localreceiveyspec );
Cipher localCipher = Cipher. getInstance ("DES ");
LocalCipher. init (1, localSecretKey, localSecureRandom );
Return localCipher. doFinal (paramArrayOfByte );
} Catch (Exception e ){
E. printStackTrace ();
Return null;
}
}
Public static byte [] convertHexString (String text ){
Byte digest [] = new byte [text. length ()/2];
For (int I = 0; I <digest. length; I ++ ){
String byteString = text. substring (2 * I, 2 * I + 2 );
Int byteValue = Integer. parseInt (byteString, 16 );
Digest [I] = (byte) byteValue;
}
Return digest;
}
Public static String toHexString (byte B []) {
StringBuffer hexString = new StringBuffer ();
For (int I = 0; I <B. length; I ++ ){
String plainText = Integer. toHexString (0xff & B [I]);
If (plainText. length () <2)
PlainText = "0" + plainText;
HexString. append (plainText );
}
Return hexString. toString ();
}
}
Author "jkvast"