DevMaster


SUBMITTED BY: Ibnu77

DATE: Dec. 28, 2023, 1:47 p.m.

UPDATED: June 14, 2024, 7:44 p.m.

FORMAT: Text only

SIZE: 4.1 kB

HITS: 609

  1. import os
  2. import xxtea
  3. import base64
  4. import json
  5. from datetime import datetime
  6. import requests
  7. # raw_url = input("Input LINK URL: ")
  8. # referer_url = input("Input Referral URL: ")
  9. # headers = {
  10. # 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
  11. # 'Referer': referer_url,
  12. # }
  13. raw_url = input("Input LINK URL: ")
  14. headers = {
  15. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
  16. }
  17. def base64_decode_and_xxtea_decrypt(encrypted_data, key):
  18. decrypted_data = base64.b64decode(encrypted_data)
  19. decrypted_data = xxtea.decrypt(decrypted_data, key)
  20. return decrypted_data.decode('utf-8') # Decode the decrypted bytes to utf-8 format
  21. def fetch_and_decode_raw_content(raw_link, headers):
  22. try:
  23. response = requests.get(raw_link, headers=headers)
  24. response.raise_for_status() # Raise an HTTPError for bad responses
  25. return response.text
  26. except requests.RequestException as e:
  27. print(f"Error fetching raw content: {e}")
  28. return None
  29. def add_info_to_data(data):
  30. kmkz = "IHsKICAgICAgICAiWzwvPl0gW1NuaWZmZXJCeV0iOiAiRW56b1p4eCIsCiAgICAgICAgIls8Lz5dIFtUZWxlZ3JhbV0iOiAiaHR0cHM6Ly90Lm1lL1hEZWNyeXRvcklkIiwKICAgICAgICAiWzwvPl0gW1Rvb2xzXSI6ICJQeXRob24gRGVjcnlwdCB4IEtlZXAgSnNvbiAxLjAuMyDCqSIKICAgIH0="
  31. decoded_data = base64.b64decode(kmkz).decode('utf-8')
  32. try:
  33. data["Info"] = json.loads(decoded_data)
  34. except json.JSONDecodeError as e:
  35. print(f"Error decoding JSON: {e}")
  36. def main():
  37. enzo_password = "Zm95c29sQDEyMw=="
  38. key = base64.b64decode(enzo_password).decode('utf-8')
  39. try:
  40. # Fetch and decode raw content
  41. decrypted_text = fetch_and_decode_raw_content(raw_url, headers)
  42. # Check if decryption is successful before proceeding
  43. if decrypted_text:
  44. encrypted_data = json.loads(base64_decode_and_xxtea_decrypt(decrypted_text, key))
  45. decrypted_data = []
  46. for network in encrypted_data.get("Networks", []):
  47. if "SNIHost" in network:
  48. network["SNIHost"] = base64_decode_and_xxtea_decrypt(network.get("SNIHost", ""), key)
  49. if "Payload" in network:
  50. network["Payload"] = base64_decode_and_xxtea_decrypt(network.get("Payload", ""), key)
  51. if "ProxySettings" in network and "Squid" in network["ProxySettings"]:
  52. network["ProxySettings"]["Squid"] = base64_decode_and_xxtea_decrypt(network["ProxySettings"].get("Squid", ""), key)
  53. decrypted_data.append(encrypted_data)
  54. folder_name = "/sdcard/EnzoSniffer/"
  55. os.makedirs(folder_name, exist_ok=True)
  56. # Define output file path
  57. file_path = os.path.join(folder_name, "[Devmaster-DATA]SnifferBY_ENzoZxx.txt")
  58. add_info_to_data(encrypted_data)
  59. output_data = {"Info": encrypted_data.pop("Info"), **encrypted_data}
  60. # Write decrypted data to the output file
  61. with open(file_path, "w") as output_file:
  62. json.dump(output_data, output_file, indent=4, ensure_ascii=False)
  63. timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  64. number_of_entries = sum(len(encrypted_data[key]) for key in ["Servers", "Networks", "SSLNetworks"])
  65. success_message = (
  66. f"* Decryption Successful for {number_of_entries} entries! Data\n"
  67. f"* Timestamp: {timestamp}\n"
  68. f"* SnifferBy: EnzoZxx\n"
  69. f"* =========================================="
  70. )
  71. print(success_message)
  72. else:
  73. print("Error: Decryption failed or no content retrieved.")
  74. except json.JSONDecodeError as e:
  75. print(f"Error decoding JSON: {e}")
  76. except Exception as e:
  77. print(f"Error: {e}")
  78. if __name__ == "__main__":
  79. main()

comments powered by Disqus