praetorian-inc / pyshell

PyShell makes interacting with web-based command injection less painful, emulating the feel of an interactive shell as much as possible.
253 stars 50 forks source link

Error #2

Open mehranexpert opened 7 years ago

mehranexpert commented 7 years ago

i got this Error

python3 pyshell.py http://www.myurl/sat.php
/ $ Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "pyshell.py", line 83, in tabCompleterThread
    populateTabComplete(path)
  File "pyshell.py", line 87, in populateTabComplete
    entries = makeRequest(20, 'bash', '-c "cd {} && ls -p"'.format(path)).split("\n")[:-1]
  File "pyshell.py", line 153, in makeRequest
    result = urllib.request.urlopen(url, data=requestData).read()
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

Traceback (most recent call last):
  File "pyshell.py", line 158, in <module>
    run()
  File "pyshell.py", line 143, in run
    result = makeRequest(timeout, cmd, opts)
  File "pyshell.py", line 153, in makeRequest
    result = urllib.request.urlopen(url, data=requestData).read()
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
ojensen5115 commented 7 years ago

Hi mehranexpert,

As you can see from the bottom of the tracebacks you submitted, your error is: urllib.error.HTTPError: HTTP Error 403: Forbidden

You are getting a 403 Forbidden error when you are trying to access your PHP script. Most likely this means that the permissions are not set correctly on your "sat.php" file. If you are having trouble debugging your PHP script, I would suggest that you first get it working using a browser, and then switch over to PyShell once your script is working.

mehranexpert commented 7 years ago

When i browse my php file its blanked page. I think it not have permission issue.