Skip to content

Instantly share code, notes, and snippets.

@rootcfg
Created June 18, 2021 17:58
Show Gist options
  • Save rootcfg/76ee5a2b560b1e947706cc5ef4376a4c to your computer and use it in GitHub Desktop.
Save rootcfg/76ee5a2b560b1e947706cc5ef4376a4c to your computer and use it in GitHub Desktop.
nc_in_action
CAB-WSM-0000786:luxodor dolgashov-ds$ nc -c httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
Connection: close
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Fri, 08 Nov 2019 16:22:20 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 234
Connection: Close
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "82.199.98.204, 82.199.98.204",
"url": "https://httpbin.org/anything"
}
CAB-WSM-0000786:luxodor dolgashov-ds$ nc -c httpbin.org 80
GET /anything?name=alex&job_id=123 HTTP/1.1
Host: httpbin.org
Connection: close
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Fri, 08 Nov 2019 16:26:42 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 299
Connection: Close
{
"args": {
"job_id": "123",
"name": "alex"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "82.199.98.204, 82.199.98.204",
"url": "https://httpbin.org/anything?name=alex&job_id=123"
}
CAB-WSM-0000786:luxodor dolgashov-ds$ nc -c httpbin.org 80
POST /anything?name=alex&job_id=123 HTTP/1.1
Host: httpbin.org
Connection: close
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Fri, 08 Nov 2019 16:27:39 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 328
Connection: Close
{
"args": {
"job_id": "123",
"name": "alex"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Content-Length": "0",
"Host": "httpbin.org"
},
"json": null,
"method": "POST",
"origin": "82.199.98.204, 82.199.98.204",
"url": "https://httpbin.org/anything?name=alex&job_id=123"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment