使用CURL& POST发布到网络表单BASH

时间:2014-09-27 14:07:16

标签: bash post curl

我正在尝试使用cURL将数据发布到此网址上的表单,但没有成功:

https://nic.ar/buscarDominio.xhtml

如何正确地将请求发送到服务器?

我用chrome(右键单击,检查元素,网络选项卡)分析了帖子数据,复制为CURL:

curl 'https://nic.ar/buscarDominio.xhtml' -H 'Cookie: JSESSIONID=!hh6JmwccX43y6ULiN5rkqiT19gIki8NN0dqDBgaDtQ+kRKM3qulJksgmqjFkb1N+dmFkEA5UteMiyTaLuahx481KkIte4g==; NIC=1007948204.20480.0000; TS2785e3=62b722def584484a84a892fda4181cd30f4798093eac408f542740be60ac0ec5d6bd720d4045274b4076e350; TS2785e3_77=5412_a812844049fdca3a_rsb_0_rs_https%3A%2F%2Fnic.ar%2FbuscarDominio.xhtml_rs_0_rs_0' -H 'Origin: https://nic.ar' -H 'Accept-Encoding: gzip,deflate' -H 'Accept-Language: es-419,es;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: https://nic.ar/buscarDominio.xhtml' -H 'Connection: keep-alive' --data 'busquedaDominioForm2=busquedaDominioForm2&javax.faces.ViewState=3588315592207743676%3A-7314103686046665250&busquedaDominioForm2%3Adominio=example&busquedaDominioForm2%3Aj_idt56=2&busquedaDominioForm2%3AbtnBuscar=Consultar' --compressed

但是当我运行时,从服务器获取空响应

非常感谢

0 个答案:

没有答案