Can someone tell me what is the main step for creating UDP, TCP and IP packets. And how can I generate it using Python?
as suggested by jokeysmurf, you can create packages with scapy
if you want to send / receive regular packets, then you should use a socket or server sockets
to send TCP to port 80 google use
import socket HOST = 'google.com' # The remote host PORT = 80 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) s.send('GET / HTTP/1.1\r\nHost: google.com\r\n\r\n') data = s.recv(1024) s.close() print 'Received', repr(data)
to make it udp change SOCK_STREAM to SOCK_DGRAM
You can do interactive packet processing with scapy .
In this article, you will start by gluing an IP packet.
Building a tcp package is as simple as:
packet = IP(src="10.0.0.10")
Source: https://habr.com/ru/post/901904/More articles:How to create a method in JS as an abstract method in Java? - javascriptJavaScript bar graph? - javascriptPutty ssh commands zip all the files in this folder and then download - commandThe login form does not lose focus correctly - c #In jQuery, should I choose live (), delegate () or on ()? - javascriptHow to exit main in haskell subject to the condition - iohttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/901906/where-does-tomcat-in-eclipse-store-the-expanded-war&usg=ALkJrhjIcss6AEozLvEUpRERwVxRxX63JQReplace youtube url in text with html code - phpHow to replace Youtube urls in text using inline code (in PHP)? - phpHow does github avoid lag / blink on page load? - javascriptAll Articles