-
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
Open
sourcery-ai
wants to merge
1
commit into
main
Choose a base branch
from
sourcery/main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import socket | ||
| import socket | ||
| import threading | ||
| import os | ||
|
|
||
|
|
@@ -18,9 +18,11 @@ | |
| | INSTAGRAM : @retropacketz | | ||
| ------------------------------------------------""") | ||
| print ("") | ||
| print (red +"WARNING: This scan can take a while depending on your network speed") | ||
| print (red + "so have a cup of coffee and relax until finished 😎") | ||
| print (cyan +"") | ||
| print( | ||
| f"{red}WARNING: This scan can take a while depending on your network speed" | ||
| ) | ||
| print(f"{red}so have a cup of coffee and relax until finished 😎") | ||
| print(f"{cyan}") | ||
|
|
||
|
|
||
| target = input("""Target: """) # scan local host | ||
|
|
@@ -29,7 +31,7 @@ def port_scanner(port): | |
| try: | ||
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
| s.connect((target, port)) | ||
| print(green + f"""[*] Port {port} is open""") | ||
| print(f"""{green}[*] Port {port} is open""") | ||
|
Comment on lines
-32
to
+34
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
| except: | ||
| pass | ||
|
|
||
|
|
@@ -40,41 +42,41 @@ def port_scanner(port): | |
|
|
||
|
|
||
| print ("") | ||
| 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}") | ||
|
Comment on lines
-43
to
+79
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
||
|
|
||
| print ("") | ||
| #print (Y +"") | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-23refactored with the following changes:use-fstring-for-concatenation)