File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8
8
sessions .SessionRedirectMixin .resolve_redirects ()
9
9
session = requests .Session ()
10
10
proxies = {
11
- 'http' : 'http ://test:pass@localhost:8080' ,
12
- 'https' : 'http ://test:pass@localhost:8090' ,
11
+ 'http' : 'https ://test:pass@localhost:8080' ,
12
+ 'https' : 'https ://test:pass@localhost:8090' ,
13
13
}
14
- url = 'http ://example.com' # Replace with a valid URL
14
+ url = 'https ://example.com' # Replace with a valid URL
15
15
req = requests .Request ('GET' , url )
16
16
prep = req .prepare ()
17
17
session .rebuild_proxies (prep , proxies )
18
18
19
19
# Introduce a command injection vulnerability
20
20
user_input = input ("Enter a command to execute: " )
21
- command = "ping " + user_input
22
- subprocess .call (command , shell = True )
21
+ command = [ "ping" , user ( seed )]
22
+ subprocess .call (command , shell = False )
23
23
24
- print ("Command executed!" )
24
+ print ("Command executed!" )
You can’t perform that action at this time.
0 commit comments