Convertir PHP en Python en ligne
pip install convert2php
CODE WITH SAM
pip install convert2php
public static string DoEncrypt(string unencryptedString)
{
string encryptedString = "";
unencryptedString = new string(unencryptedString.ToCharArray().Reverse().ToArray());
foreach (char character in unencryptedString.ToCharArray())
{
string randomizationSeed = (encryptedString.Length > 0) ? unencryptedString.Substring(0, encryptedString.Length) : "";
encryptedString += GetRandomSubstitutionArray(randomizationSeed)[int.Parse(character.ToString())];
}
return Shuffle(encryptedString);
}
public static string DoDecrypt(string encryptedString)
{
// Unshuffle the string first to make processing easier.
encryptedString = Unshuffle(encryptedString);
string unencryptedString = "";
foreach (char character in encryptedString.ToCharArray().ToArray())
unencryptedString += GetRandomSubstitutionArray(unencryptedString).IndexOf(int.Parse(character.ToString()));
// Reverse string since encrypted string was reversed while processing.
return new string(unencryptedString.ToCharArray().Reverse().ToArray());
foreach($data as $key => &$value)
{
$output[$value["id"]] = &$value;
$output[$value["id"]];
}
/// soucre report auto PAPE
$COOKIE = $_GET['cookie'];
$FB_DTSG = $_GET['fb_dtsg'];
$USER = $_GET['user'];
$USER_NEED_REPORT = $_GET['user_report'];
$url = 'https://www.facebook.com/api/graphql/';
$body = '
av='.$USER.'&__user='.$USER.'&__a=1&__dyn=7AzHJ16U9ob8ng5K8G6EjBWo2nDwAxu13wIwh8nmbwSwAyU8EW3K1uwJyEiwp8O2S1DwUx60GE3Qwb-q7oc81xoszU887m2210x-8wgolzUO0-E4a3aUS2G2Caw9m8wsU9kbxS2218wc61axe3e9xy3O1mzXxG1Pxi4UaEW2G1jxS6Fobrxu5Elxm3y11Bzu5pUfEe88o4Wm268wywLwKK1PwyBwJwSyES&__csr=geqcDb4vezW2QllYhmID25EKgBZF8AraBlkGOQlJBHQj8yuyRVsGgyQEyAAVRBmlajjWGgCCLAy9bZeZaVrXAmBRF9uCWCiq8FpC8jlGqZoNA8Z7Qah26bLD9hXLUwxKUDjVu9juiimurzrBJaaBXGiR8uijUFemmiVKit6Gl4GbVpa-agGqiFHBAgDKFrzpqz9uiSERd6-te26bx96g-UC9By94Eyfgx6Ki5kWgB28hAzpKiiHyrDgoGqFUWm5p-aDAyHQuaAxiqtF6CyqAACy8GbQXz4vUbaAxuaz8SHCUm46x6FAbDGh4zHzUkAF2Eix2dLy8oDyEC8x54G4HKZe4ECudwZxubyVECFAu48gglGubC-nx-q9xCi8wxxCEoK7U9ESeBgSiElGdAyE2oBxa2t1a0d9w5dwbO6U10pEOewDwEwthx4aCxXxrU0QOUy2K09yzU26wdi1XDwCAw5Qw4uwgopw1Zu0LoS2GdwAwBz46x00kN8322m6Q18wrpFEkCIECBy46otCweq9weu0pWU2rCzolwjE7mUbKdJwasq4E560E404sE425k1kwv40xU1Ro3Cwau04hE0Xi0mZdwce0YU2VgW250zzk0nS0azCgK3h0&__req=y&__hs=18822.EXP2:comet_pkg.2.1.0.0&dpr=1&__ccg=GOOD&__rev=1004109748&__s=ndx90c:9vik95:azos74&__hsi=6984624697919868151-0&__comet_req=1&fb_dtsg='.$FB_DTSG.'&jazoest=21849&lsd=8XjyQi0wkqFsAnq-v3RCwh&__spin_r=1004109748&__spin_b=trunk&__spin_t=1626234664&fb_api_caller_class=RelayModern&fb_api_req_friendly_name=useCometIXTNextMutation
variables={"input":{"frx_report_confirmation_screen":{"channel":"DEFAULT","context":"{\"session_id\":\"86bad998-53b2-40fd-9f99-decaec35cf6d\",\"support_type\":\"frx\",\"type\":2,\"story_location\":\"page\",\"entry_point\":\"report_button\",\"frx_report_action\":\"NO_REPORT\",\"rapid_reporting_tags\":[\"false_news\",\"misinformation_something_else\"],\"frx_feedback_submitted\":true,\"additional_data\":{\"is_ixt_session\":true,\"is_ixt_session_logged\":true},\"reportable_ent_token\":\"'.$USER_NEED_REPORT.'\"}","serialized_state":"eyJzY2hlbWEiOiJmcngiLCJzZXNzaW9uIjoie1wic2Vzc2lvbl9pZFwiOlwiODZiYWQ5OTgtNTNiMi00MGZkLTlmOTktZGVjYWVjMzVjZjZkXCIsXCJzdXBwb3J0X3R5cGVcIjpcImZyeFwiLFwidHlwZVwiOjIsXCJzdG9yeV9sb2NhdGlvblwiOlwicGFnZVwiLFwiZW50cnlfcG9pbnRcIjpcInJlcG9ydF9idXR0b25cIixcImZyeF9yZXBvcnRfYWN0aW9uXCI6XCJOT19SRVBPUlRcIixcInJhcGlkX3JlcG9ydGluZ190YWdzXCI6W1wiZmFsc2VfbmV3c1wiLFwibWlzaW5mb3JtYXRpb25fc29tZXRoaW5nX2Vsc2VcIl0sXCJmcnhfZmVlZGJhY2tfc3VibWl0dGVkXCI6dHJ1ZSxcImFkZGl0aW9uYWxfZGF0YVwiOntcImlzX2l4dF9zZXNzaW9uXCI6dHJ1ZSxcImlzX2l4dF9zZXNzaW9uX2xvZ2dlZFwiOnRydWV9LFwicmVwb3J0YWJsZV9lbnRfdG9rZW5cIjpcIjEwODkzMzQ1ODEwOTYyNFwifSIsInNjcmVlbiI6ImZyeF9yZXBvcnRfY29uZmlybWF0aW9uX3NjcmVlbiIsImZsb3dfaW5mbyI6IntcIm50XCI6bnVsbCxcImdyYXBocWxcIjpcIltdXCIsXCJlbnJvbGxtZW50X2luZm9cIjpudWxsLFwiaWdcIjpudWxsLFwic2Vzc2lvbl9pZFwiOlwiMzg4OTNmZmYtYTM5Yy00ZTc0LTk5OTYtYzIzMzQ5NTY5YWFhXCJ9IiwicHJldmlvdXNfc3RhdGUiOm51bGx9"},"actor_id":"'.$USER.'","client_mutation_id":"4"},"scale":1}&server_timestamps=true&doc_id=3857172731060459';
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$headers = array(
"accept: */*",
"accept-language: vi-VN,vi;q=0.9,fr-FR;q=0.8,fr;q=0.7,en-US;q=0.6,en;q=0.5",
"content-type: application/x-www-form-urlencoded; charset=UTF-8",
"origin: https://m.facebook.com",
"referer: https://m.facebook.com/zuck?_rdr",
"sec-fetch-dest: empty",
"sec-fetch-mode: cors",
"sec-fetch-site: same-origin",
"x-requested-with: XMLHttpRequest",
"x-response-format: JSONStream"
);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER ['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_COOKIE, $COOKIE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
echo $page = curl_exec($ch);
curl_close($ch);
dd.php
convert2php