reyammer / shellnoob

A shellcode writing toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PY2 = sys.version_info.major == 2 ?

pinpuk opened this issue · comments

Python 2.6.5

root@bt:/Desktop/shellnoob-master# ls
COPYRIGHT README.md samples shellnoob.py test.py
root@bt:
/Desktop/shellnoob-master# ./shellnoob.py
Traceback (most recent call last):
File "./shellnoob.py", line 39, in
PY2 = sys.version_info.major == 2
AttributeError: 'tuple' object has no attribute 'major'
root@bt:~/Desktop/shellnoob-master# ./shellnoob.py -h
Traceback (most recent call last):
File "./shellnoob.py", line 39, in
PY2 = sys.version_info.major == 2
AttributeError: 'tuple' object has no attribute 'major'

Can you make it compatible with Python 2.6?

#PY2 = sys.version_info.major == 2
PY2 = sys.version_info[0] == 2

Fixed this way.

Hi @pinpuk, thanks for reporting the issue & finding a workaround. Quick question: did you find python 2.6 being used in some main/big distribution (like Kali linux). If that's the case, then I guess I should support python 2.6 as well!

Hey @reyammer, Kali Linux is root@kali:~# python -V
Python 2.7.3 , I think you should fix it but it is not a priority :)

awesome, thanks for checking :) I'll add that to the (infinite) todo list :) Thanks!