1,594
社区成员




procedure TFrmMain.btnLoginClick(Sender: TObject);
var
resParams: TStringStream;
postParams: TStringList;
begin
btnLogin.Enabled := False;
resParams := TStringStream.Create('');
postParams := TStringList.Create;
try
mmLog.Lines.Clear;
IdHTTP.Request.CacheControl :='no-cache';
IdHTTP.Request.Connection :='Keep-Alive';
IdHTTP.Request.Accept :='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
IdHTTP.Request.ContentType :='application/x-www-form-urlencoded';
IdHTTP.Request.AcceptCharSet := 'UTF-8';
IdHTTP.Request.AcceptEncoding := 'UTF-8';
IdHTTP.Request.AcceptLanguage := 'UTF-8';
IdHTTP.HandleRedirects :=True; //允许重定向,因为这个站点会发生重定向
IdHTTP.AllowCookies :=True;
IdHTTP.HTTPOptions :=[hoForceEncodeParams];
postParams.Clear;
postParams.Add('account=znhj');
postParams.Add('password=012250');
//postParams.Add('url=/console/remote/');
resParams.WriteString('');
IdHTTP.Request.Referer :='https://sunlogin.oray.com/passport/login?lang=zh_CN'; //设置来路,此网站要求
IdHTTP.Post('https://sunlogin.oray.com/passport/login',postParams,resParams);
mmLog.Lines.Add(Utf8ToAnsi(resParams.DataString));
finally
resParams.Free;
postParams.Free;
btnLogin.Enabled := True;
end;
end;
storeUtil.init()
s_cookie("lastLogin","2012-09-06%2011%3A29%3A55",604800,"/","2345.com");
s_cookie("integral","",604800,"/","2345.com");
s_cookie({store:"cookie"},"name_ie","%115%121%115%116%101%109%49",604800,"/","2345.com");
s_cookie({store:"cookie"},"user_info","ZmM1Zk1kbWI0amlrTXJkWElrWjIyQUN3a2NFUlNwelIrLzNBSCtFVGwxVkNZdWFva2ZpdXJPL1lnN0NqQ3c=",604800,"/","2345.com");
s_cookie("user_info","ZmM1Zk1kbWI0amlrTXJkWElrWjIyQUN3a2NFUlNwelIrLzNBSCtFVGwxVkNZdWFva2ZpdXJPL1lnN0NqQ3c=",604800,"/","2345.com");
s_cookie("validatenum","a4ed074907dc9bc3c86cc52904d763e3",604800,"/","2345.com");
s_cookie({store:"cookie"},"passid","3459582",604800,"/","2345.com");
s_cookie({store:"cookie"},"validatenum","a4ed074907dc9bc3c86cc52904d763e3",604800,"/","2345.com");
s_cookie({store:"cookie"},"uid","4024627",604800,"/","2345.com");
s_cookie({store:"cookie"},"u_sec","3b1e0242582a1b75f5a4629b123ad014|7e099c513c89b404d6866ddf00f0471e",604800,"/","2345.com");
s_cookie({store:"cookie"},"name","system1",604800,"/","2345.com");
s_cookie({store:"cookie"},"email","localhhost@localhost.localhost",604800,"/","2345.com");
s_cookie({store:"cookie"},"iden","3659a530c228b3a0ac4e24f31df533d8",604800,"/","2345.com");
s_cookie("skin","0",604800,"/","2345.com");
s_cookie("skinz","0",604800,"/","2345.com");
s_cookie("bgid","0",604800,"/","2345.com");
s_cookie({store:"cookie"},"ggbd","0",604800,"/","2345.com");
s_cookie("code_str","",604800,"/","2345.com");
s_cookie({store:"cookie"},"code_str","",604800,"/","2345.com");
s_cookie("bgurl","",604800,"/","2345.com");
s_cookie({store:"cookie"},"localNav","null",604800,"/","2345.com");
s_cookie("localNav","null",604800,"/","2345.com");
s_cookie({store:"cookie"},"mystyle_display","",604800,"/","2345.com");
s_cookie("mystyle_display","",604800,"/","2345.com");
s_cookie("fl","0",604800,"/","2345.com");
s_cookie({store:"cookie"},"theme","0",604800,"/","2345.com");
s_cookie("theme","0",604800,"/","2345.com");
s_cookie({store:"cookie"},"theme_logo","0",604800,"/","2345.com");
s_cookie("theme_logo","0",604800,"/","2345.com");
s_cookie({store:"cookie"},"lc","54511",604800,"/","2345.com");
s_cookie("lc","54511",604800,"/","2345.com");
s_cookie({store:"cookie"},"wc","54511",604800,"/","2345.com");
s_cookie("wc","54511",604800,"/","2345.com");
s_cookie({store:"cookie"},"wc_n","%u5317%u4EAC",604800,"/","2345.com");
s_cookie("wc_n","%u5317%u4EAC",604800,"/","2345.com");
s_cookie({store:"cookie"},"wc_sf","",604800,"/","2345.com");
s_cookie("wc_sf","",604800,"/","2345.com");s_cookie("site_str","http://www.iqiyi.com/^^%u7231%u5947%u827A%u9AD8%u6E05^^1^^1347104840890^^1,",604800,"/","2345.com");
s_cookie({store:"cookie"},"site_str","http://www.iqiyi.com/^^%u7231%u5947%u827A%u9AD8%u6E05^^1^^1347104840890^^1,",604800,"/","2345.com");window.location.href="http://bbs.2345.com/api/passport.php?action=login&cookieTime=604800&auth=&forward=http%3A%2F%2Fmy.2345.com&verify="
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script type="text/javascript" src="js/common.js"></script>
<input type="hidden" name="_ieStore" id="_ieStore" style="BEHAVIOR:url(#default#userData)" />
<div id="header"></div>
<script language="JavaScript" type="text/javascript">
var main,search_,xhr = null,ready_ = false,isIE =/*@cc_on!@*/! 1;
main = domain();
document.domain = main.replace("login.", "");
var em = $,cElement = $c,eName = $t;
function $(a) {
return document.getElementById(a)
}
function $c(a) {
return document.createElement(a)
}
function $t(a) {
var b = arguments[1] || document;
return b.getElementsByTagName(a)
}
function $cls(a) {
var b = arguments[1] || document,
rs = [],
o = b.getElementsByTagName("*");
for (var i = 0,
t, len = o.length; i < len; i++) {
t = o[i];
if (t.className == a) {
rs.push(t)
}
}
return rs
}
function domain() {
search_ = location.search;
var a = location.host,
_pos = a.indexOf(":");
return (_pos == -1) ? a: a.substring(0, _pos)
}
function g_cookie(a) {
var b = storeUtil.get(a, arguments[1]);
if (b || b == "") {
return b
} else {
return cookieStore.get(a)
}
}
function subs(a, b) {
var c = 0,
_out = "";
for (var d = 0; d < a.length; d++) { (a.charCodeAt(d) > 128) ? c += 2 : c++;
_out += a.charAt(d);
if (c >= b) return _out
}
return _out
}
function s_cookie() {
var a = [],
_para = {};
for (var b = 0,
_len = arguments.length; b < _len; b++) {
a[b] = arguments[b]
}
if (String.prototype.toLowerCase.apply(typeof(a[0])) != "string") {
switch (a[0].store) {
case "ie":
_para.store = ieStore.init();
break;
case "ff":
_para.store = mozillaStore.init();
break;
case "cookie":
default:
_para.store = cookieStore.init()
}
a.splice(0, 1)
}
_para.exps = typeof(a[2]) != "undefined" ? Math.ceil(a[2] / (3600 * 24)) : undefined;
_para.name = a[0];
_para.val = a[1];
_para.path = a[3];
_para.domain = a[4];
_para.secure = a[5];
storeUtil.set(_para);
return false
};
function _body() {
return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement: document.body
}
function initXhr() {
if (window.XMLHttpRequest) {
try {
xhr = new XMLHttpRequest()
} catch(e) {
xhr = false
}
} else if (window.ActiveXObject) {
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP")
} catch(e) {
try {
xhr = new ActiveXObject("Microsoft.XMLHTTP")
} catch(e) {
xhr = false
}
}
}
}
String.prototype.trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, "")
};
var storeUtil = {
_init: false,
init: function() {
var a = arguments[0],
_store;
if (!a) {
if (isIE) {
_store = ieStore
} else if (window.globalStorage) {
_store = mozillaStore
} else {
_store = cookieStore
}
} else {
switch (a) {
case "ie":
_store = ieStore;
break;
case "ff":
_store = mozillaStore;
break;
case "cookie":
default:
_store = cookieStore
}
}
this.store = _store.init();
this._init = this.store.isInit() ? true: false;
return this.isInit()
},
get: function(a) {
if (this.store == null) {
this.init();
}
var b = arguments[1] || this.store;
return b.get(a)
},
set: function(a) {
var b = a.store || this.store;
b.set(a)
},
del: function(a) {
var b = arguments[1] || this.store;
b.del(a)
},
isInit: function() {
return this._init
}
},
ieStore = {
exps: 180,
_init: false,
init: function() {
if (!this.isInit() && !$("_ieStore")) {
this.store = $c("INPUT"),
this.store.type = "hidden",
this.store.id = "_ieStore",
this.store.addBehavior("#default#userData");
$("header").appendChild(this.store);
this._init = true
} else if ($("_ieStore")) {
this.store = $("_ieStore");
this._init = true
}
return this
},
get: function(a) {
try {
this.store.load(a)
} catch(e) {
return null
}
return this.store.getAttribute("__store__") || null
},
set: function(a) {
var b = a.name,
_val = a.val,
_exps = typeof(a.exps) != "undefined" ? a.exps: this.exps;
var c = new Date();
c.setDate(c.getDate() + _exps);
this.store.load(b);
this.store.expires = c.toUTCString();
this.store.setAttribute("__store__", _val);
this.store.save(b)
},
del: function(a) {
this.set({
name: a
},
false, -1)
},
isInit: function() {
return this._init
}
},
mozillaStore = {
_init: false,
init: function() {
this._domain = main.replace("login.", "");
this._init = true;
return this
},
get: function(a) {
var b = window.globalStorage[this._domain].getItem(a);
return b ? b.value || 0 : null
},
set: function(a) {
window.globalStorage[this._domain].setItem(a.name, a.val)
},
del: function() {
window.globalStorage[this._domain].removeItem(_name)
},
isInit: function() {
return this._init
}
},
cookieStore = {
_init: false,
_exps: 180,
_secure: "",
init: function() {
if (!this.isInit()) {
this._domain = main.replace("login.", "");
this._init = true
};
return this
},
get: function(a) {
var b = document.cookie.split("; "),
a = a + "=";
for (var c = 0,
_len = b.length; c < _len; c++) {
if (b[c].indexOf(a) != "-1") {
try {
return decodeURIComponent(b[c].replace(a, ""))
} catch(e) {
return unescape(b[c].replace(a, ""))
}
}
}
return null
},
set: function(a) {
var b = new Date();
var c = a.name,
_val = a.val,
_exps = typeof(a.exps) != "undefined" ? a.exps: this._exps,
_domain = a.domain || this._domain,
_path = a.path || "/",
_secure = a.secure || this._secure;
b.setDate(b.getDate() + _exps);
var d = c + "=" + escape(_val) + (_exps ? ";expires=" + b.toUTCString() : "") + (_path ? ";path=" + _path: "") + (_domain ? ";domain=" + _domain: "") + (_secure ? ";secure=": "");
document.cookie = d
},
del: function(a) {
if (String.prototype.toLowerCase.apply(typeof(a)) == "string") {
_name = a;
a = {
name: _name,
val: ""
}
}
a.exps = -1;
a.secure = "";
this.set(a)
},
isInit: function() {
return this._init
}
};