Compare commits
1 Commits
master
...
revert-145
Author | SHA1 | Date |
---|---|---|
Long Le | efd28a6dba |
|
@ -21,7 +21,7 @@ import sys
|
|||
import config
|
||||
from utils import msg, error_msg
|
||||
|
||||
if sys.version_info.major == 3:
|
||||
if sys.version_info.major is 3:
|
||||
from urllib.request import urlopen
|
||||
from urllib.parse import urlencode
|
||||
pyversion = 3
|
||||
|
@ -376,7 +376,7 @@ class Shellcode():
|
|||
'job': job,
|
||||
'encode': encode})
|
||||
shellcode = urlopen("http://api.z3r0d4y.com/index.py?%s\n"%(str(params))).read()
|
||||
if pyversion == 3:
|
||||
if pyversion is 3:
|
||||
shellcode = str(shellcode,encoding='ascii')
|
||||
return '\n"'+shellcode.replace('\n','')+'"\n'
|
||||
except:
|
||||
|
|
14
peda.py
14
peda.py
|
@ -42,7 +42,7 @@ from utils import *
|
|||
import config
|
||||
from nasm import *
|
||||
|
||||
if sys.version_info.major == 3:
|
||||
if sys.version_info.major is 3:
|
||||
from urllib.request import urlopen
|
||||
from urllib.parse import urlencode
|
||||
pyversion = 3
|
||||
|
@ -5789,9 +5789,9 @@ class PEDACmd(object):
|
|||
while True:
|
||||
for os in oslist:
|
||||
msg('%s %s'%(yellow('[+]'),green(os)))
|
||||
if pyversion == 2:
|
||||
if pyversion is 2:
|
||||
os = input('%s'%blue('os:'))
|
||||
if pyversion == 3:
|
||||
if pyversion is 3:
|
||||
os = input('%s'%blue('os:'))
|
||||
if os in oslist: #check if os exist
|
||||
break
|
||||
|
@ -5800,9 +5800,9 @@ class PEDACmd(object):
|
|||
while True:
|
||||
for job in joblist:
|
||||
msg('%s %s'%(yellow('[+]'),green(job)))
|
||||
if pyversion == 2:
|
||||
if pyversion is 2:
|
||||
job = raw_input('%s'%blue('job:'))
|
||||
if pyversion == 3:
|
||||
if pyversion is 3:
|
||||
job = input('%s'%blue('job:'))
|
||||
if job != '':
|
||||
break
|
||||
|
@ -5811,9 +5811,9 @@ class PEDACmd(object):
|
|||
while True:
|
||||
for encode in encodelist:
|
||||
msg('%s %s'%(yellow('[+]'),green(encode)))
|
||||
if pyversion == 2:
|
||||
if pyversion is 2:
|
||||
encode = raw_input('%s'%blue('encode:'))
|
||||
if pyversion == 3:
|
||||
if pyversion is 3:
|
||||
encode = input('%s'%blue('encode:'))
|
||||
if encode != '':
|
||||
break
|
||||
|
|
|
@ -34,7 +34,7 @@ isinstance(x, six.integer_types)
|
|||
## Strings
|
||||
|
||||
In Python 2, `bytes` is an alias for `str`. In Python 3, `str` is a unicode
|
||||
type and `bytes` is used for a sequence of arbitrary bytes. Use a leading 'b' to
|
||||
type and `bytes` is used for a sequece of arbitrary bytes. Use a leading 'b' to
|
||||
signify that a string is a `bytes` object.
|
||||
|
||||
```python
|
||||
|
|
Loading…
Reference in New Issue