我正在尝试使用 curl 将数据发布到表单并将其保存在文件中,这是我要发布数据的表单,可以在此处访问网页form_webpage
<label for='Fldname'>Name</label></td><td>:</td><td><input type='text' name='name' id='Fldname'/>
<label for='Fldemail'>Email</label></td><td>:</td><td><input type='text' name='email' id='Fldemail'/>
<input type='password' name='x' id='Fldpwd'/>
<input type='password' name='cpwd' id='Fldcpwd'/>
<input type='radio' value='m' name='gender' id='Fldgendm'/>
<label for='Fldgendm'>Male</label> <input type='radio' value='f' name='gender' id='Fldgendf' />
<label for='Fldgendf'>Female</label>
<input type='checkbox' value='e' name='lang[]' id='Fldlange'/> Eng <input type='checkbox' value='t' name='lang[]' id='Fldlangt'/> Tel <input type='checkbox' value='h' name='lang[]' id='Fldlangh' disabled />
<select name='coun' multiple >
<option value=''>Choose Country</option>
<option value='91'>INDIA</option>
<option value='001'>USA</option>
<option value='002'>United Kingdom</option>
</select>
我做了很多研究,每次我想发布到表单时,它都会返回我使用的相同页面
curl --data 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91' "www.cs.odu.edu/~stirumer/index.html" -o "3.html"
curl -Gd 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gen
der=m&lang[]=e&coun=91' "www.cs.odu.edu/~stirumer/index.html" -o "3.html"
curl -X POST -F 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91' www.cs.odu.edu/~stirumer/index.html -o "2.html"
curl -F 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gend
er=m&lang[]=e&coun=91' www.cs.odu.edu/~stirumer/index.html -o "1.html"
curl -X POST --data "name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91" www.cs.odu.edu/~stirumer/index.html
他们都返回相同的页面..!!
预期产出
需要帮助的家伙!