Browse Source

更新项目结构

liuyuqi-dellpc 2 years ago
parent
commit
40345f7c5f
5 changed files with 29 additions and 9 deletions
  1. 12 0
      main.py
  2. 12 0
      nessus_creator/__init__.py
  3. 3 9
      nessus_creator/nessus_creator.py
  4. 0 0
      nessus_creator/tempmail.py
  5. 2 0
      requirements.txt

+ 12 - 0
main.py

@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+'''
+@Contact :   liuyuqi.gov@msn.cn
+@Time    :   2023/04/01 23:57:16
+@License :   Copyright © 2017-2022 liuyuqi. All Rights Reserved.
+@Desc    :   enter point
+'''
+from nessus_creator import main
+
+if __name__=='__main__':
+    main()

+ 12 - 0
nessus_creator/__init__.py

@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+'''
+@Contact :   liuyuqi.gov@msn.cn
+@Time    :   2023/04/01 23:57:39
+@License :   Copyright © 2017-2022 liuyuqi. All Rights Reserved.
+@Desc    :   None
+'''
+from .nessus_creator import nessus_activation
+
+def main():
+    nessus_activation()

+ 3 - 9
Nessus_Activation_Code.py → nessus_creator/nessus_creator.py

@@ -15,6 +15,7 @@ def banner():
 
 
 def nessus_activation():
+	banner()
 	tmp = TempMail()
 	email = tmp.get_email_address()  
 	print("Your Temp mail address is successfully created!")
@@ -29,9 +30,8 @@ def nessus_activation():
 	   tkn=link.attrs['value']
 	 else:
 	   print("not found")
-	fname=raw_input("First Name:")
-	lname=raw_input("Last Name:")
-	# nes_email=raw_input("Email:")
+	fname = input("First Name:")
+	lname=input()("Last Name:")
 	params={"first_name":fname,"last_name":lname,"email":email,"country":"IN","Accept":"Agree","robot":"human","type":"homefeed","token":tkn,"submit":"Register"}
 	r = requests.post("https://www.tenable.com/products/nessus-home", data=params)
 	if r.status_code == 200:
@@ -62,9 +62,3 @@ def nessus_activation():
 	else:
 		print("something went wrong with the request")
 		sys.exit()
-
-
-if __name__ == "__main__":
-	banner()
-	nessus_activation()
-

+ 0 - 0
Tempmail/tempmail.py → nessus_creator/tempmail.py


+ 2 - 0
requirements.txt

@@ -0,0 +1,2 @@
+requests==2.8.14
+bs4==0.0.1