Skip to content

Commit 2c37e3a

Browse files
author
patched.codes[bot]
committed
Patched /private/var/folders/19/08z9_xys69v3f1xfqtyn9jyw0000gn/T/tmpkqovv07r/main.py
1 parent e24fb58 commit 2c37e3a

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
@@ -20,7 +20,7 @@ def func_calls():
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, shell=False)
2525

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

0 commit comments

Comments
 (0)