Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
federicoaaguirre opened this issue Aug 26, 2021 · 7 comments
Open

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

federicoaaguirre opened this issue Aug 26, 2021 · 7 comments

Comments

@federicoaaguirre
Copy link

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):

  • Mac OS 11.5.2
  • Python 3.8
@alessio-ds
Copy link

same error on python3.7

@EvanKilburn
Copy link

EvanKilburn commented Nov 21, 2021

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
Copy link

Same error on W10, Python 3.9/3.10

@nitin-soni7566
Copy link

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
Copy link

image_2023-12-03_181848390

@nitin-soni7566
Copy link

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

when i pass list is working

image

@aditya020402
Copy link

Yes correcting this removes the error. thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants