S
S
SHentai2018-06-17 21:14:21
UDP
SHentai, 2018-06-17 21:14:21

Do you know a good program to send TCP/UDP packets with their content and view the response?

Hello.
OC: WIndows 10.
We need a program with the ability to send TCP / UDP packets to a specific IP: PORT with its content and view the response.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-06-17
@NeiroNx

I wrote in python. Sometimes it's faster to write what you need than to look for what someone else has written.
For TCP

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os,sys,struct,json
from socket import *
from datetime import *

print " ".join(sys.argv[1:])
#client = socket(AF_INET, SOCK_STREAM)
#client.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
#client.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
if len(sys.argv) > 1:
  port = sys.argv[1]
else:
  print "Usage: %s [Port]"%os.path.basename(sys.argv[0])
  port = raw_input("Port(default 34569): ")
if port=="":
  port="34569"
server = socket(AF_INET, SOCK_STREAM)
server.bind(('192.168.10.201',int(port)))
#server.settimeout(0.5)
server.listen(1)

while True:
  try:
    conn, addr = server.accept()
    data = server.recv(1024)
    print datetime.now().strftime("[%Y-%m-%d %H:%M:%S]>>>")
    print data
    print "<<<"
  except:
    e = 1
sys.exit(1)

for UDP:
SOCK_STREAM changes to SOCK_DGRAM
right there in python, you can parse data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question