How to View HTTP Headers Live From Command-Line in Raw Tcpdump Command

 

CONTENTS

You need to troubleshoot raw and plain HTTP connections to your Mule app. You would like a way to visualize the HTTP information in the command-line without using Wireshark.

STEPS TO FOLLOW

Please note that the following only works for unencrypted HTTP traffic.

1) Run the following command (change 8091 to the port that is receiving the unencrypted HTTP traffic):
tcpdump -A -s 10240 'tcp port 8091 and (((ip[2:
2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^
........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |
HTTP\/|POST |HEAD )/\n\1/g'

2) Then make the request. You should output such as this for the header of your HTTP request:
GET /api/files/file/name/History%20EX-Guide.docx/properties?aewgaweg.com&siteName=asgsd.com&folderName=1231212 HTTP/1.1
Host: mydlb.lb.anypointdns.net
X-Real-IP: 1.1.1.1
X-Forwarded-For: 1.1.1.1
User-Agent: curl/7.64.1
Accept: */*
Authorization: bearer 23423

Criando partição com parted

  parted  /dev/sdb (parted) select /dev/sdb (parted) print   CRIANDO UMA PARTIÇÃO NO DISCO SELECIONADO (/dev/sdb) Passo 1: Primeiramente...

Mais vistos