|
挂QQ的网页源代码[ASP/PHP/JS]
; T0 J5 i, Y3 y6 z2 i/ t( {) W0 _ x
~- A0 d6 H& V$ g, V3 P, }
# u% u& Y8 t: H# \3 m7 b" J, D" l7 h4 J' g& z& L: s3 I' d9 {
R9 {( L, p, j8 m9 a( [+ a说明:此代码适合你做网站用,普通朋友可以不用理这个东西! 6 E* k" F' \+ L( ^# A: Q( n
4 y: x/ k, Q2 i4 |
ASP: 1 k2 M3 w: _; C( Q* @
8 h9 V& M& U- P" X7 o; I+ a' J9 d7 C: r/ ?3 `, G( ^, W/ {7 k: ?+ v
# i q3 M; H) Y1 V' v, e+ C- p
CODE: [Copy to clipboard]
+ t1 k* ~, I1 J# ]% K1 `+ [<% 8 o9 U$ C+ B/ V3 _
dim objXMLHTTP, qq, pwd [+ P/ p" O U. m
3 k& ^+ w! S* Y$ f5 t$ A$ Y/ u
qq = "10000" ( ^ W! I! ~% Z; R
pwd = "123456" ( r9 G) z1 K# B8 [( W
. Y" ~1 k }! @7 D: A5 F% Eset objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP.5.0") 7 j, t0 S. s) u. E
objXMLHTTP.open "POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false
; e; h# w, Y6 k0 [4 I9 PobjXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" - W- F; T4 d: e2 T3 q
objXMLHTTP.setRequestHeader "Connection", "Keep-Alive" + y, L! C/ t- l4 z/ p0 I
objXMLHTTP.send("qq="&qq&"&pwd="&pwd&"&FromWhere=register") 6 x4 E8 q- q) b+ C' Z; Y4 g
. t) L# J% o: p. }9 \
if InStr(objXMLHTTP.responseText, "验证失败") then - S$ X% z# H O0 V, L
response.write "登录失败" - m9 U* P B1 u
else
/ X8 w7 H9 S/ C$ {, Tresponse.write "登录成功"
6 p |5 N* m9 K! r! f" h" |end if
: z e+ L/ I9 ]3 ]6 d: [* l- p- X" @' h
set objXMLHTTP = nothing ' n$ d( e$ V. ~
%>
% D8 H: z& R6 ]. Z3 ^ c8 t* y8 g! N# L. F
+ g. a7 b5 r4 {1 p5 V- Z
# O5 P5 _- A: R7 d* p p( h* B" NPHP: . p, V6 u, c- r* J+ t, K: Z7 u
, Y' L, l) p, W' Q: x: d# d
! [4 |# ^5 w1 V3 x
& t/ Z, c: Z1 C. ZCODE: [Copy to clipboard]
: g. N% h( M; F! F<php
6 g6 Y: ~ v. b" k1 {$qq = "100000"; //qq号码
; B" M% m2 D0 Q; U' ^5 E# T$pwd = "123456"; //密码
, j# l5 R7 F" O$ L' s
. L4 o: f2 s: [# D" v$ch = curl_init(); t- z! V* M/ A
) ~ D( A$ |7 K0 v% Z0 A* [
curl_setopt($ch, CURLOPT_URL, "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");
5 W9 d6 Y% p4 Q3 y' @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //这行是设定curl是否跟随header发送的location, 重要
9 U2 Q) X. p8 n/ zcurl_setopt($ch, CURLOPT_POST, 1); 2 L4 t$ L( X2 y
//curl_setopt($ch, "Connection", "Keep-Alive"); ( O. |: N! a2 t* |
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $ p. f3 f& n- D Q3 ^
curl_setopt($ch, CURLOPT_POSTFIELDS, "qq=".$qq."&pwd=".$pwd."&FromWhere=register");
& ]6 v# s+ k& K+ |
% @" [% ^2 y$ x- E& }8 }) ?$return = curl_exec($ch); # ?: k+ h" [6 K
2 G) a% j& J! W L& f" d
curl_close($ch);
% z0 p% j, D0 b6 L/ r8 q( ?9 r" t+ F: _9 J
echo strstr($return, "postfield") ? "登录失败" : "登录成功"; - {. J% p- A1 C7 x, j( {$ k
?>
, y z M! `) u8 A1 ~2 e& u9 |5 \& R* O6 T$ L4 W* B/ i
& s5 f X% |% ~ X: r. S8 Q7 B& n
: f9 g: ~ W, cjs:
8 P$ y5 J* T3 i
; |& c' I+ V ?5 v' m8 z- ` K" Q4 H" R( F( `8 u( s
9 I- U/ g* S. R! ?( G. F+ u+ D( _
CODE: [Copy to clipboard]
3 t( f# D& q) h$ W$ c& d. \<script type="text/javascript"> 1 C/ s% Z! Z* Y% P+ {
var qq = "100000"; //qq号码 ) m$ V q; }( T! y- O% n1 j$ [
var pwd = "123456"; //密码 # |- P+ X. o/ D. ~* d8 O
5 S0 |2 R2 Q1 I4 ?- |
if (window.XMLHttpRequest) { y5 c( M/ u6 w4 f
var x = new XMLHttpRequest();
) ]3 P& a7 y: L6 R. L! t6 M} else { " j0 r6 G$ C4 e1 |+ z
var MSXML = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP');
4 H4 Y9 v$ t" B& X# N, W3 Nfor(var n = 0; n < MSXML.length; n ++) {
; d% y2 Z. w [/ ^* ktry {
2 p& P( y8 o! n7 U$ s5 ]% [var objXMLHTTP = new ActiveXObject(MSXML[n]); 9 V6 ]$ i) o8 d
break; , k# ^( {/ Q6 F# O2 i
} catch(e) {
# x. Y5 Y4 {: D) C}
: I9 r0 j0 }/ ^% a% E% u5 M W}
+ E8 u. |% g; k* c} ' q4 P* V O- i
# J% a, G* @) p
objXMLHTTP.open("POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false);
7 L; h" ^7 L8 T( e' KobjXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); : @, N+ W) @. q" [* [
objXMLHTTP.setRequestHeader("Connection", "Keep-Alive");
' c8 F# ~, e: j# Q5 s. ]! wobjXMLHTTP.send("qq=" + qq + "&pwd=" + pwd + "&FromWhere=register"); 7 O- }8 t; {# U0 g
0 Y8 ]* d( ~! W) I J9 yif (objXMLHTTP.responseText.indexOf("验证失败") > 0) {
G# d+ x& u$ Z1 H0 Y% C4 h* _1 Valert("登录失败"); 7 W) ?( c! [0 G; E4 T0 ^7 o
} else { & Z: N1 C) p4 r+ m k
alert("等录成功"); 3 e" F/ s$ h0 S w+ ^2 @# K
} . ~- Y0 [2 q4 ]
</script>/ i6 e7 w% a* ?
|
|