我想直接用curl指令post登陆网页从而实现上网,但是我在虚拟机里尝试过这段代码还是登陆不到外网。
#!/bin/bash
curl -H "Content-Type:application/x-www-form-urlencoded" -d "(这里面是我抓包得到的信息有账号和密码) " (这是要post进去的地址)
if [ "$?" -eq "0" ]; then
exit -1
fi
exit 0
#!/bin/bash
curl -H "Content-Type:application/x-www-form-urlencoded" -d "(这里面是我抓包得到的信息有账号和密码) " (这是要post进去的地址)
if [ "$?" -eq "0" ]; then
exit -1
fi
exit 0