pwn0sec / PwnXSS

PwnXSS: Vulnerability (XSS) scanner exploit
MIT License
713 stars 136 forks source link

AttributeError: 'str' object has no attribute 'copy' #26

Open federicoaaguirre opened 2 years ago

federicoaaguirre commented 2 years ago

Describe the bug Error: AttributeError: 'str' object has no attribute 'copy'

To Reproduce Steps to reproduce the behavior:

  1. Go to directory
  2. Run python pwnxss.py -u https://mysite

Screenshots

██████╗ ██╗    ██╗███╗   ██╗██╗  ██╗███████╗███████╗
██╔══██╗██║    ██║████╗  ██║╚██╗██╔╝██╔════╝██╔════╝
██████╔╝██║ █╗ ██║██╔██╗ ██║ ╚███╔╝ ███████╗███████╗ {v0.5 Final}
██╔═══╝ ██║███╗██║██║╚██╗██║ ██╔██╗ ╚════██║╚════██║
██║     ╚███╔███╔╝██║ ╚████║██╔╝ ██╗███████║███████║
╚═╝      ╚══╝╚══╝ ╚═╝  ╚═══╝╚═╝  ╚═╝╚══════╝╚══════╝
<<<<<<< STARTING >>>>>>>

[10:38:31] [INFO] Starting PwnXSS...
***************
[10:38:31] [INFO] Checking connection to: https://webdemo.cloud.invgate.net
[10:38:32] [INFO] Connection estabilished 200
[10:38:32] [WARNING] Target have form with POST method: https://webdemo.cloud.invgate.net/auth/login/type/dummy
[10:38:32] [INFO] Collecting form input key.....
[10:38:32] [INFO] Internal error: 'name'
[10:38:32] [INFO] Form key name: next value: <script>console.log(5000/3000)</script>
[10:38:32] [INFO] Sending payload (POST) method...
[10:38:33] [INFO] Parameter page using (POST) payloads but not 100% yet...
[10:38:33] [WARNING] Target have form with POST method: https://webdemo.cloud.invgate.net/auth/login/type/servicedesk
[10:38:33] [INFO] Collecting form input key.....
[10:38:33] [INFO] Form key name: value value: <script>console.log(5000/3000)</script>
[10:38:33] [INFO] Form key name: password value: <script>console.log(5000/3000)</script>
[10:38:33] [INFO] Internal error: 'name'
[10:38:33] [INFO] Form key name: next value: <script>console.log(5000/3000)</script>
[10:38:33] [INFO] Form key name: CSRFToken value: <script>console.log(5000/3000)</script>
[10:38:33] [INFO] Sending payload (POST) method...
[10:38:33] [INFO] Parameter page using (POST) payloads but not 100% yet...
***************
[10:38:35] [INFO] Checking connection to: https://webdemo.cloud.invgate.net/password-reset/trigger
[10:38:36] [INFO] Connection estabilished 200
[10:38:36] [WARNING] Target have form with POST method: https://webdemo.cloud.invgate.net/password-reset/trigger
[10:38:36] [INFO] Collecting form input key.....
[10:38:36] [INFO] Form key name: email value: <script>prompt(5000/200)</script>
[10:38:36] [INFO] Form key name: submit value: <Submit Confirm>
[10:38:36] [INFO] Form key name: CSRFToken value: <script>prompt(5000/200)</script>
[10:38:36] [INFO] Sending payload (POST) method...
[10:38:36] [INFO] Parameter page using (POST) payloads but not 100% yet...
Traceback (most recent call last):
  File "/Users/faguirre/Desktop/PwnXSS/pwnxss.py", line 73, in <module>
    start()
  File "/Users/faguirre/Desktop/PwnXSS/pwnxss.py", line 54, in start
    crawler.crawl(getopt.u,int(getopt.depth),getopt.proxy,getopt.user_agent,check(getopt),getopt.method,getopt.cookie)
  File "/Users/faguirre/Desktop/PwnXSS/lib/crawler/crawler.py", line 52, in crawl
    self.crawl(url,depth-1,base,proxy,level,method,cookie)
  File "/Users/faguirre/Desktop/PwnXSS/lib/crawler/crawler.py", line 44, in crawl
    urls=self.getLinks(base,proxy,headers,cookie)
  File "/Users/faguirre/Desktop/PwnXSS/lib/crawler/crawler.py", line 19, in getLinks
    text=conn.get(base).text
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 636, in send
    kwargs.setdefault('proxies', self.rebuild_proxies(request, self.proxies))
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 289, in rebuild_proxies
    new_proxies = proxies.copy()
AttributeError: 'str' object has no attribute 'copy'

Desktop (please complete the following information):

alessio-ds commented 2 years ago

same error on python3.7

EvanKilburn commented 2 years ago

I had this issue and fixed it by switching my request version. Try pip install requests==2.24.0. I'm using Python 3.9 and Max OS 11.2.1

adamcockell1 commented 2 years ago

Same error on W10, Python 3.9/3.10

nitin-soni7566 commented 7 months ago

File "D:\sirpi2\Replex\rate_limiter.venv\lib\site-packages\fastapi\routing.py", line 921, in decorator self.add_api_route( File "D:\sirpi2\Replex\rate_limiter.venv\lib\site-packages\fastapi\routing.py", line 848, in add_api_route current_tags = self.tags.copy() AttributeError: 'str' object has no attribute 'copy'

nitin-soni7566 commented 7 months ago

image_2023-12-03_181848390

nitin-soni7566 commented 7 months ago

i'm getting this error because in APIRouter i have pass string

when i pass list is working

image

aditya020402 commented 1 month ago

Yes correcting this removes the error. thx :)