Skip to content

Commit ab5b840

Browse files
author
patched.codes[bot]
committed
Patched main.py
1 parent 9e553e4 commit ab5b840

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
'http': 'http://test:pass@localhost:8080',
1212
'https': 'http://test:pass@localhost:8090',
1313
}
14-
url = 'http://example.com' # Replace with a valid URL
14+
url = 'https://example.com' # Replace with a valid URL using HTTPS
1515
req = requests.Request('GET', url)
1616
prep = req.prepare()
1717
session.rebuild_proxies(prep, proxies)
1818

1919
# Introduce a command injection vulnerability
2020
user_input = input("Enter a command to execute: ")
21-
command = "ping " + user_input
22-
subprocess.call(command, shell=True)
21+
command = ["ping", user_input]
22+
subprocess.call(command, shell=False)
2323

24-
print("Command executed!")
24+
print("Command executed!")

0 commit comments

Comments
 (0)