alice_killer

suid script

Apr 24th, 2026
55
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1. import json
  2. import urllib.request
  3. import sys
  4. import os
  5.  
  6. def main():
  7.     if len(sys.argv) < 2:
  8.         print(f"Usage: python3 {sys.argv[0]} <suid_list.txt>")
  9.         sys.exit(1)
  10.  
  11.     # 1. Fetch GTFOBins API
  12.     try:
  13.         url = "https://gtfobins.github.io/api.json"
  14.         req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
  15.         with urllib.request.urlopen(req) as response:
  16.             data = json.loads(response.read()).get('executables', {})
  17.     except Exception as e:
  18.         print(f"[-] API Error: {e}")
  19.         sys.exit(1)
  20.  
  21.     # 2. Read the list
  22.     try:
  23.         with open(sys.argv[1], "r") as f:
  24.             binaries = [line.strip() for line in f if line.strip()]
  25.     except:
  26.         sys.exit(1)
  27.  
  28.     print(f"{'BINARY':<15} | {'METHOD'}")
  29.     print("-" * 40)
  30.  
  31.     # 3. Output matches only
  32.     for path in binaries:
  33.         name = os.path.basename(path).lower()
  34.        
  35.         if name in data:
  36.             funcs = data[name].get('functions', {})
  37.             # Join all available methods (suid, shell, file-read, etc.)
  38.             methods = ", ".join(funcs.keys())
  39.             print(f"{name:<15} | {methods}")
  40.  
  41. if __name__ == "__main__":
  42.     main()
  43.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment