Skip to content

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jun 9, 2023

Branch main refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from RetroPackets June 9, 2023 22:02
@@ -1,4 +1,4 @@
import socket
import socket
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 1-23 refactored with the following changes:

Comment on lines -32 to +34
print(green + f"""[*] Port {port} is open""")
print(f"""{green}[*] Port {port} is open""")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function port_scanner refactored with the following changes:

Comment on lines -43 to +79
print (Y + "[*] Confirming Results For " + target, "With Nmap...")
print (green + "")
os.system("sudo nmap --top-ports 50 " + target)
print(f"{Y}[*] Confirming Results For {target}", "With Nmap...")
print(f"{green}")
os.system(f"sudo nmap --top-ports 50 {target}")

print ("")
print (Y + "[*] Scanning Using TCP Protocols For: " + target)
print (green + "")
os.system("sudo nmap -sT " + target)
print(f"{Y}[*] Scanning Using TCP Protocols For: {target}")
print(f"{green}")
os.system(f"sudo nmap -sT {target}")



print ("")
print (Y + "[*] Scanning Using UDP Protocols For: " + target)
print(green + "")
os.system("sudo nmap -sU " + target)
print(f"{Y}[*] Scanning Using UDP Protocols For: {target}")
print(f"{green}")
os.system(f"sudo nmap -sU {target}")

print ("")
print (Y + "[*] Performing OS/Service Detection On: " + target)
print (green + "")
os.system("sudo nmap -A -T4 " + target)
print(f"{Y}[*] Performing OS/Service Detection On: {target}")
print(f"{green}")
os.system(f"sudo nmap -A -T4 {target}")

print ("")
print (Y + "[*] Detecting Service/Daemon Versions For: " + target)
print (green + "")
os.system("sudo nmap -sV " + target)
print(f"{Y}[*] Detecting Service/Daemon Versions For: {target}")
print(f"{green}")
os.system(f"sudo nmap -sV {target}")

print ("")
print (Y + "[*] Performing CVE Detection For: " + target)
print (green + "")
os.system("sudo nmap -Pn --script vuln " + target)
print(f"{Y}[*] Performing CVE Detection For: {target}")
print(f"{green}")
os.system(f"sudo nmap -Pn --script vuln {target}")

print ("")
print (Y + "[*] Detecting Malware Infections On Remote Hosts For: " + target)
print (green + "")
os.system("sudo nmap -sV --script=http-malware-host " + target)
print(f"{Y}[*] Detecting Malware Infections On Remote Hosts For: {target}")
print(f"{green}")
os.system(f"sudo nmap -sV --script=http-malware-host {target}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 43-77 refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants