NessusReg.py 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/python3
  2. print("==================================================================")
  3. print(" Welcome ! to ! Nessus Home activation code Generation ! Service ! ")
  4. print(" Don't misuse this script other then for pentesting purpose ")
  5. print(" This script written on Python 3 modules ")
  6. print(" Author:anonmech ")
  7. print("==================================================================")
  8. from urllib.request import urlopen
  9. from bs4 import BeautifulSoup
  10. import requests
  11. ht=urlopen("https://www.tenable.com/products/nessus-home")
  12. bs=BeautifulSoup(ht,'html.parser')
  13. for link in bs.findAll("input",{"name":"token"}):
  14. if 'name' in link.attrs:
  15. tkn=link.attrs['value']
  16. else:
  17. print("not found")
  18. fname=input("First Name:")
  19. lname=input("Last Name:")
  20. email=input("Email:")
  21. params={"first_name":fname,"last_name":lname,"email":email,"country":"IN","Accept":"Agree","robot":"human","type":"homefeed","token":tkn,"submit":"Register"}
  22. r = requests.post("https://www.tenable.com/products/nessus-home", data=params)
  23. bs=BeautifulSoup(r.text,'html.parser')
  24. for link in bs.findAll("meta",{"content":"Thank you for registering for Nessus Home. An email containing your activation code has been sent to you at the email address you provided."}):
  25. if 'content' in link.attrs:
  26. print(link.attrs['content'])
  27. else:
  28. print("something went wrong")