Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ def func_calls():
if __name__ == '__main__':
session = requests.Session()
proxies = {
'http': 'http://test:pass@localhost:8080',
'https': 'http://test:pass@localhost:8090',
'http': 'https://test:pass@localhost:8080',
'https': 'https://test:pass@localhost:8090',
}
url = 'http://example.com' # Replace with a valid URL
url = 'https://example.com' # Replace with a valid URL
req = requests.Request('GET', url)
prep = req.prepare()
session.rebuild_proxies(prep, proxies)

# Introduce a command injection vulnerability
user_input = input("Enter a command to execute: ")
command = "ping " + user_input
subprocess.call(command, shell=True)
command = ["ping", user_input]
subprocess.call(command)

print("Command executed!")
print("Command executed!")