----抓取的代码是
<form method="post" name="login" id="loginform" class="s_clear" onsubmit="pwdclear = 1;ajaxpost('loginform', 'returnmessage', 'returnmessage', 'onerror');return false;" action="logging.php?action=login&loginsubmit=yes">
<input type="hidden" name="formhash" value="953dd273" />
<input type="hidden" name="referer" value="" />
<div class="loginform nolabelform">
<div class="float_typeid selectinput" id="account">
<select name="loginfield" id="loginfield">
<option value="username">用户名</option>
<option value="uid">UID</option>
<option value="email">Email</option>
</select>
<input type="text" name="username" autocomplete="off" size="36" class="txt" tabindex="1" value="" />
</div>
<p class="selectinput loginpsw">
<label for="password3">密 码 :</label>
<input type="password" id="password3" name="password" onfocus="clearpwd()" onkeypress="detectCapsLock(event, this)" size="36" class="txt" tabindex="1" />
</p>
<div id="seccodelayer"></div>
<div class="float_typeid selecttype">
<select id="questionid" name="questionid" change="if($('questionid').value > 0) {$('answer').style.display='';} else {$('answer').style.display='none';}">
<option value="0">安全提问</option>
<option value="1">母亲的名字</option>
<option value="2">爷爷的名字</option>
<option value="3">父亲出生的城市</option>
<option value="4">您其中一位老师的名字</option>
<option value="5">您个人计算机的型号</option>
<option value="6">您最喜欢的餐馆名称</option>
<option value="7">驾驶执照的最后四位数字</option>
</select>
</div>
<p><input type="text" name="answer" id="answer" autocomplete="off" size="36" class="txt" tabindex="1" /></p>
</div>
<div class="logininfo multinfo">
<h4>没有帐号?<a href="one.php" onclick="hideWindow('login');showWindow('register', this.href);return false;" title="注册帐号">注册</a></h4>
<p><a href="javascript:;" onclick="display('layer_login');display('layer_lostpw');" title="找回密码">找回密码</a></p>
<p><a href="javascript:;" onclick="ajaxget('member.php?action=clearcookies&formhash=953dd273', 'returnmessage', 'returnmessage');return false;" title="清除痕迹">清除痕迹</a></p>
</div>
<p class="fsubmit s_clear">
<button class="submit" type="submit" name="loginsubmit" value="true" tabindex="1">登录</button>
<input type="checkbox" class="checkbox" name="cookietime" id="cookietime" tabindex="1" value="2592000" /> <label for="cookietime">记住我的登录状态</label>
</p>
</form>
------------
我的 CLASS POST 代码如下,可只能显示代码,无法登入,
public class TestPost {
public static void testPost() throws IOException {
command=login";
String surl = " http://www.tosese.com/bbs/member.php?mod=logging&action=login";
URL url = new URL(surl);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(connection .getOutputStream(), "UTF-8");
//out.write("user_account=admin&user_password=******");
out.write("username=shop&password3=shop");
// remember to clean up
out.flush();
out.close();
如何POST登入,已经能在FRAME显示抓取的HTML代码
答案:1 悬赏:80 手机版
解决时间 2021-08-12 00:31
- 提问者网友:酱爆肉
- 2021-08-11 04:37
最佳答案
- 五星知识达人网友:慢性怪人
- 2021-08-11 05:48
抓包用HTTP协议发送 VC我是这么做的
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯