Socket Class from Python

https://docs.python.org/2/library/socket.html

  • Address Family
    • AF_UNIX address family : a single string
    • AF_INET address family : (host, port)
    • AF_INET6 address family : (host, port, flowinfo, scopeid)
    • AF_NETLINK socket       : (pid, groups)
    • AF_TIPC address family : (addr_type, v1, v2, v3 [, scope])
      • non-IP based networked protocol designed for use in clustered computer environments


  • Socket Type
    • socket.SOCK_STREAM :
    • socket.SOCK_DGRAM :
    • socket.SOCK_RAW :
    • socket.SOCK_RDM :
    • socket.SOCK_SEQPACKET :


  • IP header & ICMP message


Scanning Example from 'Black Hat Python'


1. Create socket

2. Bind

3. ioctl


 


pip install netaddr

python scanner.py
Traceback (most recent call last):
  File "scanner.py", line 7, in <module>
    from netaddr import IPNetwork, IPAddress
ImportError: No module named netaddr


 

 

References :

http://www.kalitutorials.net/2014/04/denial-of-service-methods-icmp-syn.html

반응형

'Security&Encryption > Black Hat' 카테고리의 다른 글

Windows Debugger with PyDev  (0) 2016.06.29
CPU registers and dis-assemble of Python  (0) 2016.06.29
Pydev on Eclipse  (0) 2016.06.28
Trojan using Git hub  (0) 2016.03.30

+ Recent posts