Defender's Notes
  • Welcome!
  • Methodology
  • Ethical Hacking
  • Resources/Blogs/Conferences/Labs
  • Writing Vulnerability Reports
  • Linux Tips
  • Certifications
  • Bug Bounty
    • Hints
  • Python
  • PenTesting
    • Recon
    • Network Scanning
    • Reverse Shell Payloads
    • API Security Testing
    • 53 - DNS
    • 21 - ftp
    • 139,445 - SMB
    • 111,2049 - rcpbind
    • Authentication
    • Scripting
    • OSINT
    • Cloud Security
    • Reverse Engineering
    • Password
    • Proxy Chain
    • Steganography
    • Buffer Overflow
  • Windows
    • Recon
    • Golden/Silver Ticket
    • PowerShell for Beginners
    • Windows Priv Escalate
      • Icecast (RPC)
    • Kerberos Attack
  • Web Pentesting
    • 80,443,8080 - Recon
    • Resources
      • Burp Suite
    • Web Vulnerabilities
      • WordPress
      • CSP Bypass
      • JSON Web Tokens
      • Insecure Desensitization
      • Open Redirect
      • Command Injection
      • Path Traversals
      • SSRF
      • SQL Injection
      • IDOR
      • Shellshock
      • Heartbleed
      • Session Attacks/Bypass
      • XSS
      • XXE
      • CSRF
      • File Inclusion (Local/Remote)
      • Drupal
    • OWASP Top 10 2017
      • Top 1: Injection
      • Top 2: Broken Authentication
      • Top 3: Sensitive Data Exposure
      • Top 4: XML External Entities (XXE)
      • Top 5: Broken Access Control
      • Top 6: Security Misconfiguration
      • Top 7: Cross-Site Scripting (XSS)
      • Top 8: Insecure Deserialization
      • Top 9: Using Components with Known Vulnerabilities
      • Top 10: Insufficient Logging & Monitoring
    • OOB
    • Java
    • Python Web Security
  • Linux
    • Upgrading shell
    • Linux Priv Escalate
      • Path Variable Manipulation
      • Systemctl
  • Binary Security
    • AOT
  • Hardware Security
    • Wi-fi
    • Radio
  • Mobile Security
    • Android
    • SMS
  • Videos
    • IppSec Videos
    • The Cyber Mentor
Powered by GitBook
On this page
  • Commonly used data types
  • Commonly used Syntax
  • Commonly used Function
  • General Web Libraries
  • Learn Python Basics
  • References

Was this helpful?

Python

Commonly used data types

  • Strings: item="towel"

  • Boolean: b=True

  • Integer: answer=42

  • Float: ration=3.14678

Commonly used Syntax

  • if

  • elif

  • else

Commonly used Function

  • input() - interactive keyboard input from a user

General Web Libraries

  • urillib

  • uribil2

  • urllib3

  • httplib

  • httplib2

  • Requests (Best)

    • Supports Authentication (Basic,Digest,Kerberos,NTLM,AWS,OAuth1)

    • Handles SSL

    • Export specific header

      • r.headers['server'], r.headers['user-agent']

Learn Python Basics

References

PreviousHintsNextRecon

Last updated 4 years ago

Was this helpful?

Violent Python code converted to Python3: kojibhy's Python Scripts: | PeterMosmans's Python Security Scripts:

https://github.com/EONRaider/violent-python3
https://github.com/kojibhy/Python-scripts
https://github.com/PeterMosmans/security-scripts
| CodecademyCodecademy
Google's Python Class  |  Python Education  |  Google DevelopersGoogle Developers
The Python Tutorial — Python 3.10.2 documentation
Learn Python - Free Interactive Python Tutorial
20 Best Free Tutorials to Learn Python: PDFs, eBooks, OnlineDiscover Programming Tools and Resources
The 50 Best Websites to Learn Python - Code ConquestCode Conquest
Logo
Logo
Logo
Logo
Logo
Logo