Skip to content

Commit 6768c74

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ def func_calls():
1313
'http': 'http://test:pass@localhost:8080',
1414
'https': 'http://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: ")
2323
command = "ping " + user_input
24-
subprocess.call(command, shell=True)
24+
subprocess.call(command, shell=False)
2525

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

0 commit comments

Comments
 (0)