Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

اسلاید اول جلسه دوم کلاس پایتون برای هکرهای قانونی

496 views

Published on

در این اسلاید به بررسی زبان پایتون و ویژگی های آن توجه شده است

Published in: Education, Technology
  • Be the first to like this

اسلاید اول جلسه دوم کلاس پایتون برای هکرهای قانونی

  1. 1. Python for Ethical Hackers Mohammad reza Kamalifard
  2. 2. Python Language Essentials Part 1 : Introduction to Python and Setting up an Environment © Mohammad reza Kamalifard
  3. 3. Python a short History Created in 1989 by Huido Van Rossum (now he works for Google in App Engine) Python 2.x in 2000 Python 3.x in 2008 Python 3 is not backward compatible 2.x is the status quo 3.x future © Mohammad reza Kamalifard
  4. 4. Why Python ? Open Source Cross-platform Rich set of libraries Large Number of open source tools Rapid prototyping © Mohammad reza Kamalifard
  5. 5. Multiple OS Support Unix/ Linux Mac OS X Windows Mobile Platforms – Android, IOS Embedded Systems © Mohammad reza Kamalifard
  6. 6. Major Implementations Cpython – reference implementation “Python” PyPy Jython – Python implementation in Java IronPython – Python implementation in C# © Mohammad reza Kamalifard
  7. 7. Why Python in Infosec? Rapid prototyping – POC Extensive library support Tons of tools already written If you want to write POC very fast actually you need language which is High level allows you to concentrate more on business of the application rather than having to worry about integrity details. © Mohammad reza Kamalifard
  8. 8. Python On different OS Linux : Pre-Loaded Windows: Download python 2.7.5 from http://python.org/getit Or Download and install Activestate Python http://www.activestate.com/activepython Mac OS : Pre-Loaded © Mohammad reza Kamalifard
  9. 9. Workflow... I Use ubuntu |oǒ'boǒntoō| Linux In this Course. Server(or Desktop) 12.04 Get Ubuntu form : http://www.ubuntu.com/download/server or buy cd from : http://shop.sito.ir/index.php If you have Problem installing Ubuntu go to http://ubuntu.ir or a Lug...like TehranLug : http://tehlug.org/ list of other lugs http://tehlug.org/index.php?page=sisters © Mohammad reza Kamalifard
  10. 10. Python 2.7 or 3.X ? Python 3 is not backward compatible Most tools / Libraries still do not Support 3.x We use python 2.7 here in this course. © Mohammad reza Kamalifard
  11. 11. And... © Mohammad reza Kamalifard
  12. 12. Python $python Python 2.7.3 (default, Apr 10 2013, 05:46:21) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> © Mohammad reza Kamalifard
  13. 13. Hello, World! >>> print 'Hello, World!' Hello, World! >>> © Mohammad reza Kamalifard
  14. 14. Or any other String >>> print 'Welcome to PYSEC101 Course' Welcome to PYSEC101 Course >>> © Mohammad reza Kamalifard
  15. 15. Using TextEditor $nano Hello.py print 'Hello, World!' Ctrl+x and Y and Enter to save. $python Hello.py Hello, World! © Mohammad reza Kamalifard
  16. 16. $nano Hello.py #!/usr/bin/python print 'Hello, World!' Ctrl+x and Y and Enter to save. $chmod a+x Hello.py $./Hello.py Hello, World! © Mohammad reza Kamalifard
  17. 17. $nano Hello.py #!/usr/bin/pythons print 'Hello, World!' Ctrl+x and Y and Enter to save. $./Hello.py -bash: ./Hello.py: /usr/bin/pythons: bad interpreter: No such file or directory © Mohammad reza Kamalifard
  18. 18. Comment in Python # this is a comment print 'Hello reza!' #This line of code print Hello reza © Mohammad reza Kamalifard

×