Skip to content

Commit 6f28d22

Browse files
author
patched.codes[bot]
committed
Patched /Users/codelion/Documents/GitHub/example-python/main.py
1 parent e24fb58 commit 6f28d22

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ def func_calls():
1010
if __name__ == '__main__':
1111
session = requests.Session()
1212
proxies = {
13-
'http': 'http://test:pass@localhost:8080',
14-
'https': 'http://test:pass@localhost:8090',
13+
'http': 'https://test:pass@localhost:8080',
14+
'https': 'https://test:pass@localhost:8090',
1515
}
16-
url = 'http://example.com' # Replace with a valid URL
16+
url = 'https://example.com' # Replace with a valid URL
1717
req = requests.Request('GET', url)
1818
prep = req.prepare()
1919
session.rebuild_proxies(prep, proxies)
2020

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

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

0 commit comments

Comments
 (0)