Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. <?php
  2. $conn = pg_connect("host=172.17.17.10 port=5432 dbname=pincushion user=pincushion password=nhy654rfv0wqa1");
  3. pg_set_client_encoding($conn, "UNICODE");
  4.  
  5.  
  6. if(isset($_POST['connect_user']) && isset($_POST['connect_pass']))
  7. {
  8. if($_POST['connect_user'] == "pincushion" && $_POST['connect_pass'] == "nekaTamos1fra")
  9. {
  10. if(isset($_POST['_cypher']) && isset($_POST['_version']))
  11. {
  12. $cyp = $_POST['_cypher'];
  13. $ver = $_POST['_version'];
  14. $key = "11ab7SasdFj55AF12ASDgmkldsvb";
  15. $un_id = xor_string(base64_decode($cyp),$key);
  16.  
  17. $sql = "INSERT INTO users_data (unique_id, cypher, version) VALUES ('".$un_id."','".$cyp."', '".$ver."')";
  18. $query = pg_query($conn, $sql);
  19.  
  20. if($query)
  21. {
  22. echo "SUCCESS!!!";
  23. }
  24. else
  25. {
  26. echo "No Connection!!! (android_data)";
  27. }
  28. }
  29. else
  30. {
  31. echo "No Data!!! (android_data) {$_POST['connect_user']} {$_POST['connect_pass']}";
  32. }
  33. }
  34. }
  35. else
  36. {
  37. echo "No dice, amigo! (android_data) {$_POST['connect_user']}";
  38. }
  39.  
  40. function xor_string($string, $key){
  41. for($i=0;$i<strlen($string);$i++)
  42. $string[i]=($string[i]^$key[$i%strlen($key)]);
  43. return $string;
  44. }
  45.  
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement