====== Python Networking ====== * https://realpython.com/python-sockets/ * https://www.pythonsheets.com/notes/python-socket.html * https://steelkiwi.com/blog/working-tcp-sockets/ ==== UDP Sockets ==== * https://wiki.python.org/moin/UdpCommunication * https://pymotw.com/2/socket/udp.html * http://www.binarytides.com/programming-udp-sockets-in-python/ ==== Python Requests ==== * http://docs.python-requests.org/en/master/ ==== Interacting with HTTP Services As a Client ==== * http://chimera.labs.oreilly.com/books/1230000000393/ch11.html ==== TCP Sockets ==== * https://wiki.python.org/moin/TcpCommunication * [[http://code.activestate.com/recipes/408859-socketrecv-three-ways-to-turn-it-into-recvall/|SOCKET.RECV -- Three ways to turn it into RECVALL]] ==== Packet Capture & Generation ==== * https://www.darknet.org.uk/2007/12/pcapy-python-interface-to-libpcap/ * https://www.coresecurity.com/corelabs-research/open-source-tools/impacket * https://stackoverflow.com/questions/4948043/how-to-parse-packets-in-a-python-library?noredirect=1&lq=1 ==== Packet Dissection ==== * https://pythonistac.wordpress.com/2017/03/09/python-network-packet-dissection-frameworks-shootout-scapy-vs-construct-vs-hachoir-vs-kaitai-struct/ * [[ne:scapy|Scapy Einführung hier im Wiki]] ==== Routing ==== * https://github.com/pfa/python-ripv2/blob/master/ripserv.py * https://github.com/puetsua/pyRIP/blob/master/pyrip.py * https://github.com/svinota/pyroute2 ==== Event-driven networking ==== * https://stackoverflow.com/questions/3632210/udp-client-and-server-with-twisted-python * https://twistedmatrix.com/documents/10.2.0/core/howto/udp.html * http://krondo.com/in-which-we-begin-at-the-beginning/ * https://steelkiwi.com/blog/working-tcp-sockets/ -- **using select** ==== Send Email ==== # connect to your Email-Server and send Hello Message (ehlo) smtpObj = smtplib.SMTP('smtp.example.com', 587) smtpObj.ehlo() # start TLS encryption for security smtpObj.starttls() # login to the Email-Server with your own username/password smtpObj.login('bob@example.com', 'PASSWORD') # send Email from Bob to Alice. Email-Headers are text-fields on separate lines. # the Email-Body is separated by an empty line from the header. smtpObj.sendmail('bob@example.com', 'alice@example.com', 'Subject:Just a Test\nDate:20171208\nFrom:bob@example.com\n\nThis is a test-mail. Ignore!') # disconnect from Mailserver smtpObj.quit() === Paramiko === * http://www.admin-magazin.de/Das-Heft/2012/06/Paramiko-oeffnet-SSH-Verbindungen