Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = pg_connect("host=172.17.17.10 port=5432 dbname=pincushion user=pincushion password=nhy654rfv0wqa1");
- pg_set_client_encoding($conn, "UNICODE");
- if(isset($_POST['connect_user']) && isset($_POST['connect_pass']))
- {
- if($_POST['connect_user'] == "pincushion" && $_POST['connect_pass'] == "nekaTamos1fra")
- {
- if(isset($_POST['_cypher']) && isset($_POST['_version']))
- {
- $cyp = $_POST['_cypher'];
- $ver = $_POST['_version'];
- $key = "11ab7SasdFj55AF12ASDgmkldsvb";
- $un_id = xor_string(base64_decode($cyp),$key);
- $sql = "INSERT INTO users_data (unique_id, cypher, version) VALUES ('".$un_id."','".$cyp."', '".$ver."')";
- $query = pg_query($conn, $sql);
- if($query)
- {
- echo "SUCCESS!!!";
- }
- else
- {
- echo "No Connection!!! (android_data)";
- }
- }
- else
- {
- echo "No Data!!! (android_data) {$_POST['connect_user']} {$_POST['connect_pass']}";
- }
- }
- }
- else
- {
- echo "No dice, amigo! (android_data) {$_POST['connect_user']}";
- }
- function xor_string($string, $key){
- for($i=0;$i<strlen($string);$i++)
- $string[i]=($string[i]^$key[$i%strlen($key)]);
- return $string;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement