Author Topic: TuxCut 3.0-beta version  (Read 564 times)

lio_013

  • Just Joined
  • *
  • Posts: 35
  • No-Pain-No-Gain
    • View Profile
    • Email
TuxCut 3.0-beta version
« on: August 21, 2009, 02:28:39 AM »
Hello every body
that is my first application in python/Qt after finishhh the lessons
it is a netcut like program for linux
i programmed it befor in gambas but now PyQt
so i need test and advise










you will need to install (nmap , dsniff , arptables )
for fedora :
http://www.4shared.com/file/126484395/6506e90b/TuxCut-30-fedoratar.html

other distro:
http://www.4shared.com/file/126484400/c1e1b048/TuxCut-30tar.html
Logged

lio_013

  • Just Joined
  • *
  • Posts: 35
  • No-Pain-No-Gain
    • View Profile
    • Email
Re: TuxCut 3.0-beta version
« Reply #1 on: August 21, 2009, 02:31:35 AM »
احمد فيه ناس جربو البرنامج وكل واحد بيطلع له ايرور مختلف عن التاني مش عارف ليه
رغم انه عندي شغال زي الفل

ده واحد
Code: [Select]
QGtkStyle cannot be used together with the GTK_Qt engine.
Qt: Session management error: None of the authentication protocols specified are supported
Traceback (most recent call last):
  File "./TuxCut.py", line 194, in <module>
    Scan()
  File "./TuxCut.py", line 172, in Scan
    result= sp.Popen(['nmap','--host-timeout','2000','-sP',gwip+'-255'], stdout=sp.PIPE).communicate()[0]
  File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1106, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory 

وده ايرور تاني

Code: [Select]
hay@islam-laptop:~/Desktop/TuxCut-3.0$ gksudo python TuxCut.py
  File "TuxCut.py", line 155, in <module>
    icard=Get_parameter('ip route list | grep "default" | cut -d " " -s -f 5')
  File "TuxCut.py", line 152, in Get_parameter
    parameter=x.readline()
IOError: [Errno 4] Interrupted system call
SSSSSSSSSSSSSSSSShay@islam-laptop:~/Desktop/TuxCut-3.0$
Logged

Ahmed Youssef

  • Helping Freak
  • Administrator
  • Active Member
  • *****
  • Posts: 242
    • View Profile
    • WWW
    • Email
Re: TuxCut 3.0-beta version
« Reply #2 on: August 21, 2009, 03:52:59 AM »
Hi
الأول مبروك انهائك ليه و welcome to Python

كبداية مجهود حلو ولكن فى شوية حاجات
1- انت بتستخدم اساليب كتير زى os.system, os.popen, subprocess
استبدل كل دا ب subprocess

2- مش عجبنى دمج الواجهة فى اللوجيك.. بس it's ok كبداية وبعد كدا اكيد هتتحسن
3- استخدم اختبار هل المستخدم root او لأ فى بداية التطبيق دايما

4- اسامى الدوال  محتاجة شوية تعديلات
اسامى المتغيرات مريبة زى main_widg مثلا
عشان كدا انصحك تراجع دى
http://www.python.org/dev/peps/pep-0008/

5- بخصوص الإيرور الأول فجرب الحل الموجود هنا
http://www.virtualbox.de/ticket/2702

6- الإيرور التانى شكله مش فى nmap اساسا ؟

اعمل اكونت على bitbucket او github او gitorious
هيساعدك اكتر فى عملية التطوير والبعد عن المواقع المملة زى 4shared
بس كدا وgood luck ياباشا
Logged

Life is just a chance to grow a soul. - A. Powell
Weblog: http://ahmedyoussef.wordpress.com/

lio_013

  • Just Joined
  • *
  • Posts: 35
  • No-Pain-No-Gain
    • View Profile
    • Email
Re: TuxCut 3.0-beta version
« Reply #3 on: August 21, 2009, 07:43:29 AM »
الاول الله يبارك فيك ومش هانسي ان انت اول واحد نصحني اني اخش عالم بايثون
  • will subprocess give me all the functions i need ....... i will check that
  • u mean to make the GUI in seperate module and import it in the code?
  • about the root ok
  • for the errors i dont have any but the testers have and i dont know what to tell them :)
  • and thanks for the advise about hosting my codes

Finally     did it works on ur machine ?
Logged

Ahmed Youssef

  • Helping Freak
  • Administrator
  • Active Member
  • *****
  • Posts: 242
    • View Profile
    • WWW
    • Email
Re: TuxCut 3.0-beta version
« Reply #4 on: August 21, 2009, 08:26:06 AM »
You are welcome
اها subprocess بتقدملك كل دا
http://programming-fr34ks.net/smf/articles-12/talking-to-others/

بخصوص الgui فايوه لازم تفصل الكود اللى بيقوم بالشغل عن الواجهة وتقدم طبقة تجريد عشان تسهل التعامل مع التطبيق وامكانية التعديل بأى وقت.. على سبيل المثال قررت تضيف واجهة ب pygtk هيكون ايه الحال؟

زى ماقلتلك اعتقد سببها عدم وجود nmap اساسا على جهاز المستخدم
المفروض تعمل تشيك على وجود  الملفات التنفيذية اللى بتستخدمها فى الأوامر بتاعتك اذا مش كانت بتيجى مع ال core/file-utils package

yup اشتغلت عندى

Logged

Life is just a chance to grow a soul. - A. Powell
Weblog: http://ahmedyoussef.wordpress.com/

lio_013

  • Just Joined
  • *
  • Posts: 35
  • No-Pain-No-Gain
    • View Profile
    • Email
Re: TuxCut 3.0-beta version
« Reply #5 on: August 21, 2009, 01:17:59 PM »
يا باشا تسلم
Logged