troubleshoot a python script

https://github.com/mazen160/struts-pwn/blob/master/README.md

I refer to the above url & I've got python 2.7 installed successfully on my Win XP.

When I ran the command below, got the error below:  need to help with the line 13 & importError :
 C:\rootc\strut>python struts-pwn.py --check --url 'http://www.google.com'
Traceback (most recent call last):
  File "struts-pwn.py", line 13, in <module>
    import requests
ImportError: No module named requests


Attached is the python script I downloaded ie struts-pwn.py
struts-pwn.py
sunhuxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sarabandeCommented:
When I ran the command below

if the command was issued in a cmd shell window you must not use single quote ' character for string argument but double quotes "

python struts-pwn.py --check --url "http://www.google.com"

Open in new window


if the string doesn't contain spaces you even could omit the double quotes.

i hope this comment helps as i don't know nothing of python.

Sara
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunhuxAuthor Commented:
I just tried without quotes & with double quotes & still getting the same message:

C:\rootc\strut>python struts-pwn.py --check --url http://www.google.com
Traceback (most recent call last):
  File "struts-pwn.py", line 13, in <module>
    import requests
ImportError: No module named requests

C:\rootc\strut>
C:\rootc\strut>python struts-pwn.py --check --url "http://www.google.com"
Traceback (most recent call last):
  File "struts-pwn.py", line 13, in <module>
    import requests
ImportError: No module named requests


Line 13 reads:
import requests
0
sunhuxAuthor Commented:
If I comment out line 13 by prefixing with #   and then rerun, it looks better:

C:\rootc\strut>python struts-pwn.py --check --url "http://www.google.com"

[*] URL: http://www.google.com
EXCEPTION::::--> global name 'requests' is not defined
[*] Status: Not Affected.
[%] Done.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sunhuxAuthor Commented:
Thing is without that line, I'm not sure if the script is working correctly.

So far it reported a few URLs as  "not affected" : if anyone has an affected URL for me to scan to verify, will be good
0
sunhuxAuthor Commented:
I know why:  though I have python Ver 2.7 installed, I'll still need
requests library installed : where can I download this?

A few links lead me to a site that requires me to have Sign-In id?
Anyone has it?
0
tliottaCommented:
Try running:
python -m pip install requests

Open in new window

If you don't have pip, you might want to download/install that first.
0
sunhuxAuthor Commented:
I'm not on Linux but Windows
0
tliottaCommented:
Ah. Sorry, I semi-automatically skipped over that because EE modified "Win XP" in your text to be one of those "ad" text things. Makes it harder to pay attention to those details. But that should work in Windows anyway.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.