-
Notifications
You must be signed in to change notification settings - Fork 2
Sourcery refactored main branch #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -1,4 +1,4 @@ | |||
import socket | |||
import socket |
There was a problem hiding this comment.
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:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation
)
print(green + f"""[*] Port {port} is open""") | ||
print(f"""{green}[*] Port {port} is open""") |
There was a problem hiding this comment.
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:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation
)
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}") |
There was a problem hiding this comment.
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:
- Use f-string instead of string concatenation [×28] (
use-fstring-for-concatenation
)
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:Help us improve this pull request!