php - Sending a binary data from file in POST request with netcat -
well, learned netcat bit. have php script on server. use nc -v xx.xxx.xxx.xx 9292 , get http://xx.xxx.xxx.xx/myscript.php.i see output of page. need send binary data have tcpdump in file. said here: should use this:
cat request | nc host port but when try
cat "/var/www/9292/123bytes" |nc xx.xxx.xxx.xx 9292 or
cat "/var/www/9292/123bytes" |nc -v xx.xxx.xxx.xx 9292 i receive following mistake:
http/1.1 400 bad request date: wed, 29 apr 2015 05:12:20 gmt server: apache/2.4.10 (debian) content-length: 385 connection: close content-type: text/html; charset=iso-8859-1 <!doctype html public "-//ietf//dtd html 2.0//en"> <html><head> <title>400 bad request</title> </head><body> <h1>bad request</h1> <p>your browser sent request server not understand.<br /> request header field missing ':' separator.<br /> <pre> </pre> </p> <hr> <address>apache/2.4.10 (debian) server @ ... port 9292</address> </body></html> here output of cat "/var/www/9292/123bytes"
post /maketemplate123.php http/1.1 user-agent: cctv-search/1.0 content-type: image/jpeg cache-control: no-cache pragma: no-cache host: localhost:8050 accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 connection: keep-alive content-length: 2095 ......jfif.....`.`.....c...... ......(.....1#%.(:3=<9387@h\n@dwe78pmqw_bghg>mqypdx\egc...c......./../cb8bcccccccccccccccccccccccccccccccccccccccccccccccccc........p.."......................................6......................!..1.a."qa2q...b....#4ccr......................................bytes ----1429512044467boundary-- as far see there : in headers. had advice here check apache version. can see it's older 2.2.15. suggestions?
Comments
Post a Comment