当前位置: 首页 > news >正文

网站ftpwordpress 机制

网站ftp,wordpress 机制,淘宝怎么做引流和推广,wordpress 修改登录页面前言 本文内容仅供学习参考#xff0c;禁止商业用途 QQ登录分为两种#xff0c;一种是当在一天前登录过#xff0c;那么登录环境会被认为是安全的#xff0c;但是偶尔还会判定#xff0c;此时的登录方式是无验证。当某QQ号是在这个环境中第一次登录#xff0c;那么就会…前言 本文内容仅供学习参考禁止商业用途 QQ登录分为两种一种是当在一天前登录过那么登录环境会被认为是安全的但是偶尔还会判定此时的登录方式是无验证。当某QQ号是在这个环境中第一次登录那么就会被判定为风险环境。本文以登录https://lol.qq.com为例 如何判定是否为风险环境 在浏览器中输入一下url http://check.ptlogin2.qq.com/check?regmasterpt_tea2pt_vcode1uin123456789appid21000501js_ver21010623js_type1r0.7541288831736455u1https://lol.qq.com/space/index.shtmlpt_uistyle40上述中uin为QQ号码需要更改为自己的其他参数都可以不动 如下图 可以看到返回的参数中第一个参数为1代表有验证码如果是0那么代表无验证码方式。返回的其他参数会在下面具体阐述。 ptui_checkVC(0,!THZ,\x00\x00\x4c\x31,6cd8994e55c4f3ee0f67bbf711c9f2cd9d080f30bb5edef603fa4c9481c48d81b4557e1f6e9e50e4d8711daa3b0869cbb6fd37acb34dfd87,2,2YVUo9hXmeAxYGxYmltQ9ZXKLN9e-0IXMMMPeWq7dRKI5sMk5p6-IX0X5dFQBseO,2464081704931812219)过程分析 无验证方式 我们先来分析下如何去登录如何在浏览器中对登录流程抓包 首先访问登录页 https://lol.qq.com/act/a20210108lplspring/index.shtml?e_code507042 会弹出登录框 输入qq号 接着输入一个qq号这个QQ号为曾经在这台电脑上登录过的。在fiddler里就会找到这个check 输入密码 随便输入密码就会直接登录 有验证方式 同样的方式 随便输入一个账号 输入密码 但是登录后就和无验证不一样了 会多出三个http请求来获取滑动验证吗 鼠标拖动滑块过验证码 可以看到已经向后台请求登录。 本文只描述无验证码的方式 无验证码登录本人目前找到了两种方式本文先讲述一种比较笨拙的方法下篇文章中讲述自动化登录方式。 无验证的登录比较简单。 check 首先分析下从check里得到的参数 ptui_checkVC(0,!THZ,\x00\x00\x4c\x31,6cd8994e55c4f3ee0f67bbf711c9f2cd9d080f30bb5edef603fa4c9481c48d81b4557e1f6e9e50e4d8711daa3b0869cbb6fd37acb34dfd87,2,2YVUo9hXmeAxYGxYmltQ9ZXKLN9e-0IXMMMPeWq7dRKI5sMk5p6-IX0X5dFQBseO,2464081704931812219)第一个参数是验证方式叫ptVcodeV1 第二个参数是验证码verifyCode 第三个参数是uin其实就是输入的QQ号的十六进制编码 第四个参数是ptVerifysessionV1也是用来验证的 第五个参数是密码加密的盐ptRandSalt 第六个参数是ptdrvs 第七个参数是sid 这几个参数在后面登录过程中都要用到。 获取check的返回值只需要改uin如果是登录https://lol.qq.com的话其他都不需要改动但是登录其他腾讯网站的话需要把appid和ul改成自己的获取方式可以使用第二段中在浏览器中直接打开登录网址在流量包中会有。 login 上面check结束接下来就需要登录登录的参数较多我们来分析下。 完整的http request如下 GET https://ssl.ptlogin2.qq.com/login?u6841verifycode!YUOpt_vcode_v10pt_verifysession_v128ac9b4561ab5d55bb78a483a0e46cabea7dc0cb49588ccd849e2971250613a541cb7af6da2b334fc13eafd99212644fd65d9ca01ed14c09ppgTEmrkXfCRTU4iby7FTrggdP0xXe24V8uSz-Wczk6Y4eBq2B77YTwjnK-dixyxw9zZRhW9625AGiHJSvU2hKeNXorux5-RKGpe89oZvW9-tJBLHnBse7dwK9pHuhwKGRQa5hiaic1tc*3yaO*dpEh6cU1qndGaCTHlzadj7V2x6TN2GWsi8Gpa0uXoH5*QzKXHShmf3QhMfMaaPcOdAID0vFLx2tontAthY4md7fzf0IvKkLu*7iRfu5tcuxHJv9z9A38K3vAH4sSRHmk5XJl0AdijEbJrPfrm6f-Kh4Gr8d5s7Icy8qyNJitFoObRVAUiY4q9qMZdJEvRVpn5bJQ__pt_randsalt2u1https%3A%2F%2Flol.qq.com%2Fact%2Fa20210108lplspring%2Findex.shtml%3Fe_code%3D507042ptredirect1h1t1g1from_ui1ptlang2052action16-76-1610607654069js_ver21010623js_type1login_sigTMWrAHkwl31J1N8tqZymtZ0yZQit7fzZdc*RQ6fOBZ7vfaT17OMgeuYAhn5b1Hrppt_uistyle40aid21000501daid8ptdrvsqeGf69KWo5Mnu1tkjloHWSAQxXmT6WSdHDax-G86Ut*B3UT2-bocrRdiQtNdYPlDsid9206717267688025401 HTTP/1.1 Host: ssl.ptlogin2.qq.com Connection: keep-alive sec-ch-ua: Google Chrome;v87, Not;A Brand;v99, Chromium;v87 sec-ch-ua-mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Accept: */* Sec-Fetch-Site: same-site Sec-Fetch-Mode: no-cors Sec-Fetch-Dest: script Referer: https://xui.ptlogin2.qq.com/ Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q0.9 Cookie: confirmuin0; eas_sid61b6A140H69025c7E0a6v997g5; pgv_infossids3482602812; pgv_pvid6799123180; lolqqcomrouteLineindex-tool_index-page; tokenParams%3Fe_code%3D507042; pt_login_sigTMWrAHkwl31J1N8tqZymtZ0yZQit7fzZdc*RQ6fOBZ7vfaT17OMgeuYAhn5b1Hrp; pt_clientipb1cc75590dec974c; pt_serverip77bc099540b88bdd; pt_local_token-1994774815; uikeye8a6e13a9d2349bd781574ba9f671aeeae2087d7cf00dc3fbfe754fda2477e19; pt_guid_sig52ac31053e4abcf2ca53f3085077f6125c55277e1872bb7bc8ed401e6a9060ef; _qpsvr_localtk0.32492866650343877; qrsigwSb7Kmn2-DWcgd0afBUq9rPP-CwqJxhHfRjb4oItB0RkgQZOtz5-jJVT4tIgIWhB; ETK-l1m98VqNfkPH1DisTIqoGfKJmPIDBQ1Ggn8QoG1RWMIRZggHtHifOwFJAxlCDlN3k6abuF2TcBCzUnwjn8fQw__; ptdrvsqeGf69KWo5Mnu1tkjloHWSAQxXmT6WSdHDax-G86Ut*B3UT2-bocrRdiQtNdYPlD; ptvfsession28ac9b4561ab5d55bb78a483a0e46cabea7dc0cb49588ccd849e2971250613a541cb7af6da2b334fc13eafd99212644fd65d9ca01ed14c09; ptui_loginuin6841是一个GET请求只讲有用的参数。 u: 登陆的QQ号和前面check的uin一致 verifycode: 前面check返回的参数 pt_verifysession_v1: 前面check返回的参数 pt_randsalt: 前面返回的参数 ptdrvs: 前面返回的参数 sid前面返回的参数 login_sig 一个加密后的数据统一环境是固定的可以不需要 action 拼接的字符串16-76是固定的后面是事件戳 p: 加密后的密码 可以看到这些参数里除了加密的密码其他都是check返回的所以想要模仿登录只需要得到加密后的密码即可。 测试了几次加密算法中也是用check返回的某些参数来加密所以只要用check的数据那么得到的密码就是一样的但实际上并不是这样猜测里面加了时间参数或者随机数。 加密后的密码是通过一个js文件生成的这个加密算法经常会变有可能今天能用明天就不能用了tx最新的加密算法更新是在1月上旬以前的都不能用了。 js文件地址 https://qq-web.cdn-go.cn/any.ptlogin2.qq.com/4c3a7c36/ptlogin/js/c_login_2.js 可能格式化方式不同代码位置会不同但应该在附近。也可以直接搜索函数名。 在3440行有submit函数通过分析是监听在登录按钮上的事件接着在3460行有个getSubmitUrl的调用我们找到这个函数 在3400行获得o.p即加密后的登录密码 好了找到加密函数了我们在浏览器中打断点调试下 在点击登录按钮后js代码停止在断点处来看下这个函数传入的参数值 e 输入的密码 S.salt 是个乱码 恢复之后是%L1 o.verifyCode 前面check返回的数据!开头的那个。 S.armSafeEdit.isSafe传入的是个undefined 至此完整的加密步骤就已经得知了所以只需要把这个加密函数搞出来即可完成加密。 奈何js水平不是特别高这段加密js代码转换搞了好几个晚上现分享给大家。 加密函数如下 function h1(){return Math.round(4294967295*Math.random())}function g1(t,e,i){(!i||4i)(i4);for(var n0,oe;oei;o){n8,n|t[o]}return(4294967295n)0}function _1(t,e,i){t[e3]i0255,t[e2]i8255,t[e1]i16255,t[e0]i24255}function m1(t){if(!t){return}for(var e,i0;it.length;i){var nNumber(t[i]).toString(16);1n.length(n0n),en}return e}function y1(t){onew Array(8),lnew Array(8),sc0,p!0,r0;var et.length,i0;0!(r(e10)%8)(r8-r),dnew Array(er10),o[0]255(248h1()|r);for(var n1;nr;n){o[n]255h1()}r;for(n0;n8;n){l[n]0}for(i1;i2;){r8(o[r]255h1(),i),8rv1()}for(n0;0e;){r8(o[r]t[n],e--),8rv1()}for(i1;i7;){r8(o[r]0,i),8rv1()}return d}function v1(){for(var t0;t8;t){o[t]^p?l[t]:d[ct]}for(var efunction(t){var e16,ig1(t,0,4),ng1(t,4,4),og1(u,0,4),ag1(u,4,4),rg1(u,8,4),lg1(u,12,4),s0;for(;0e--;){n(4294967295(n((i(4294967295(i(n4)o^n(s(4294967295(s2654435769))0)^(n5)a))0)4)r^is^(i5)l))0}tnew Array(8);return _1(t,0,i),_1(t,4,n),t}(o),t0;t8;t){d[st]e[t]^l[t],l[t]o[t]}cs,s8,r0,p!1}function w1(t){for(var e16,ig1(t,0,4),ng1(t,4,4),og1(u,0,4),ag1(u,4,4),rg1(u,8,4),lg1(u,12,4),s3816266640;0e--;){i(4294967295(i-((n(4294967295(n-(i4)r^is^(i5)l))0)4)o^ns^(n5)a))0,s(4294967295(s-2654435769))0}tnew Array(8);return _1(t,0,i),_(t,4,n),t}function b1(){f.length;for(var t0;t8;t){l[t]^f[st]}return lw1(l),s8,r0,1}function k1(t,e){var i[];if(e){for(var n0;nt.length;n){i[n]255t.charCodeAt(n)}}else{for(var o0,n0;nt.length;n2){i[o]parseInt(t.substr(n,2),16)}}return i}var q{encrypt:function(t,e){return m1(y1(k1(t,e)))},enAsBase64:function(t,e){for(var iy1(k1(t,e)),n,o0;oi.length;o){nString.fromCharCode(i[o])}return a[default].encode(n)},decrypt:function(t){return m1(function(t){var e0,inew Array(8),nt.length;if(ft,n%8!0||n16){return null}if(lw1(t),(en-(r7l[0])-10)0){return null}for(var o0;oi.length;o){i[o]0}dnew Array(e),c0,s8,r;for(var a1;a2;){if(r8(r,a),8r(it,!b1())){return null}}for(o0;0!e;){if(r8(d[o]255(i[cr]^l[r]),o,e--,r),8r(it,cs-8,!b1())){return null}}for(a1;a8;a){if(r8){if(0!(i[cr]^l[r])){return null}r}if(8r(it,cs,!b1())){return null}}return d}(k1(t,!1)))},initkey:function(t,e){uk1(t,e)},bytesToStr:function(t){for(var e,i0;it.length;i2){eString.fromCharCode(parseInt(t.substr(i,2),16))}return e},strToBytes:function(t,e){if(!t){return}e(tfunction(t){var e,i,n[],ot.length;for(e0;eo;e){0(it.charCodeAt(e))i127?n.push(t.charAt(e)):128ii2047?n.push(String.fromCharCode(192|i631),String.fromCharCode(128|63i)):2048ii65535n.push(String.fromCharCode(224|i1215),String.fromCharCode(128|i663),String.fromCharCode(128|63i))}return n.join()}(t));for(var i[],n0;nt.length;n){i[n]t.charCodeAt(n)}return m1(i)},bytesInStr:m1,dataFromStr:k1};var n_entryfunction(){function o(){this.nnull,this.e0,this.dnull,this.pnull,this.qnull,this.dmp1null,this.dmq1null,this.coeffnull}o.prototype.doPublicfunction(t){return t.modPowInt(this.e,this.n)},o.prototype.setPublicfunction(t,e){null!tnull!e0t.length0e.length?(this.nnew m(t,16),this.eparseInt(e,16)):uv_alert(Invalid RSA public key)},o.prototype.encryptfunction(t){return null(tfunction(t,e){if(et.length11){return uv_alert(Message too long for RSA),null}for(var inew Array,nt.length-1;0n0e;){var ot.charCodeAt(n--);i[--e]o}i[--e]0;for(var anew w,rnew Array;2e;){for(r[0]0;0r[0];){a.nextBytes(r)}i[--e]r[0]}return i[--e]2,i[--e]0,new m(i)}(t,this.n.bitLength()73))||null(tthis.doPublic(t))?null:0(1(tt.toString(16)).length)?t:0t};function m(t,e,i){null!t(numbertypeof t?this.fromNumber(t,e,i):nullestring!typeof t?this.fromString(t,256):this.fromString(t,e))}function y(){return new m(null)}t(m.prototype.amfunction(t,e,i,n,o,a){for(var r16383e,le14;0--a;){var s16383this[t],uthis[t]14,cl*su*r;o((sr*s((16383c)14)i[n]o)28)(c14)l*u,i[n]268435455s}return o},28),m.prototype.DBt,m.prototype.DM(1t)-1,m.prototype.DV1t;m.prototype.FVMath.pow(2,52),m.prototype.F152-t,m.prototype.F22*t-52;for(var e,i0123456789abcdefghijklmnopqrstuvwxyz,lnew Array,n0.charCodeAt(0),a0;a9;a){l[n]a}for(na.charCodeAt(0),a10;a36;a){l[n]a}for(nA.charCodeAt(0),a10;a36;a){l[n]a}function s(t){return i.charAt(t)}function r(t){var ey();return e.fromInt(t),e}function v(t){var e,i1;return 0!(et16)(te,i16),0!(et8)(te,i8),0!(et4)(te,i4),0!(et2)(te,i2),0!(et1)(te,i1),i}function u(t){this.mt}function c(t){this.mt,this.mpt.invDigit(),this.mpl32767this.mp,this.mphthis.mp15,this.um(1t.DB-15)-1,this.mt22*t.t}function d(){var t;t(new Date).getTime(),f[p]^255t,f[p]^t8255,f[p]^t16255,f[p]^t24255,kp(p-k) }if(u.prototype.convertfunction(t){return t.s0||0t.compareTo(this.m)?t.mod(this.m):t},u.prototype.revertfunction(t){return t},u.prototype.reducefunction(t){t.divRemTo(this.m,null,t)},u.prototype.mulTofunction(t,e,i){t.multiplyTo(e,i),this.reduce(i)},u.prototype.sqrTofunction(t,e){t.squareTo(e),this.reduce(e)},c.prototype.convertfunction(t){var ey();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s00e.compareTo(m.ZERO)this.m.subTo(e,e),e},c.prototype.revertfunction(t){var ey();return t.copyTo(e),this.reduce(e),e},c.prototype.reducefunction(t){for(;t.tthis.mt2;){t[t.t]0}for(var e0;ethis.m.t;e){var i32767t[e],ni*this.mpl((i*this.mph(t[e]15)*this.mplthis.um)15)t.DM;for(t[iethis.m.t]this.m.am(0,n,t,e,0,this.m.t);t[i]t.DV;){t[i]-t.DV,t[i]}}t.clamp(),t.drShiftTo(this.m.t,t),0t.compareTo(this.m)t.subTo(this.m,t)},c.prototype.mulTofunction(t,e,i){t.multiplyTo(e,i),this.reduce(i)},c.prototype.sqrTofunction(t,e){t.squareTo(e),this.reduce(e)},m.prototype.copyTofunction(t){for(var ethis.t-1;0e;--e){t[e]this[e]}t.tthis.t,t.sthis.s},m.prototype.fromIntfunction(t){this.t1,this.st0?-1:0,0t?this[0]t:t-1?this[0]tDV:this.t0},m.prototype.fromStringfunction(t,e){var i;if(16e){i4}else{if(8e){i3}else{if(256e){i8}else{if(2e){i1}else{if(32e){i5}else{if(4!e){return void this.fromRadix(t,e)}i2}}}}}this.t0,this.s0;for(var nt.length,o!1,a0;0--n;){var r8i?255t[n]:(rn,null(rl[t.charCodeAt(r)])?-1:r);r0?-t.charAt(n)(o!0):(o!1,0a?this[this.t]r:aithis.DB?(this[this.t-1]|(r(1this.DB-a)-1)a,this[this.t]rthis.DB-a):this[this.t-1]|ra,(ai)this.DB(a-this.DB))}8i0!(128t[0])(this.s-1,0a(this[this.t-1]|(1this.DB-a)-1a)),this.clamp(),om.ZERO.subTo(this,this)},m.prototype.clampfunction(){for(var tthis.sthis.DM;0this.tthis[this.t-1]t;){--this.t}},m.prototype.dlShiftTofunction(t,e){for(var ithis.t-1;0i;--i){e[it]this[i]}for(it-1;0i;--i){e[i]0}e.tthis.tt,e.sthis.s},m.prototype.drShiftTofunction(t,e){for(var it;ithis.t;i){e[i-t]this[i]}e.tMath.max(this.t-t,0),e.sthis.s},m.prototype.lShiftTofunction(t,e){for(var it%this.DB,nthis.DB-i,o(1n)-1,aMath.floor(t/this.DB),rthis.sithis.DM,lthis.t-1;0l;--l){e[la1]this[l]n|r,r(this[l]o)i}for(la-1;0l;--l){e[l]0}e[a]r,e.tthis.ta1,e.sthis.s,e.clamp()},m.prototype.rShiftTofunction(t,e){e.sthis.s;var iMath.floor(t/this.DB);if(ithis.t){e.t0}else{var nt%this.DB,othis.DB-n,a(1n)-1;e[0]this[i]n;for(var ri1;rthis.t;r){e[r-i-1]|(this[r]a)o,e[r-i]this[r]n}0n(e[this.t-i-1]|(this.sa)o),e.tthis.t-i,e.clamp()}},m.prototype.subTofunction(t,e){for(var i0,n0,oMath.min(t.t,this.t);io;){nthis[i]-t[i],e[i]nthis.DM,nthis.DB}if(t.tthis.t){for(n-t.s;ithis.t;){nthis[i],e[i]nthis.DM,nthis.DB}nthis.s}else{for(nthis.s;it.t;){n-t[i],e[i]nthis.DM,nthis.DB}n-t.s}e.sn0?-1:0,n-1?e[i]this.DVn:0n(e[i]n),e.ti,e.clamp()},m.prototype.multiplyTofunction(t,e){var ithis.abs(),nt.abs(),oi.t;for(e.ton.t;0--o;){e[o]0}for(o0;on.t;o){e[oi.t]i.am(0,n[o],e,o,0,i.t)}e.s0,e.clamp(),this.s!t.sm.ZERO.subTo(e,e)},m.prototype.squareTofunction(t){for(var ethis.abs(),it.t2*e.t;0--i;){t[i]0}for(i0;ie.t-1;i){var ne.am(i,e[i],t,2*i,0,1);(t[ie.t]e.am(i1,2*e[i],t,2*i1,n,e.t-i-1))e.DV(t[ie.t]-e.DV,t[ie.t1]1)}0t.t(t[t.t-1]e.am(i,e[i],t,2*i,0,1)),t.s0,t.clamp()},m.prototype.divRemTofunction(t,e,i){var nt.abs();if(!(n.t0)){var othis.abs();if(o.tn.t){return null!ee.fromInt(0),void (null!ithis.copyTo(i))}nulli(iy());var ay(),rthis.s,lt.s,tthis.DB-v(n[n.t-1]);0t?(n.lShiftTo(t,a),o.lShiftTo(t,i)):(n.copyTo(a),o.copyTo(i));var sa.t,ua[s-1];if(0!u){var ou*(1this.F1)(1s?a[s-2]this.F2:0),cthis.FV/o,d(1this.F1)/o,f1this.F2,pi.t,hp-s,gnulle?y():e;for(a.dlShiftTo(h,g),0i.compareTo(g)(i[i.t]1,i.subTo(g,i)),m.ONE.dlShiftTo(s,g),g.subTo(a,a);a.ts;){a[a.t]0}for(;0--h;){var _i[--p]u?this.DM:Math.floor(i[p]*c(i[p-1]f)*d);if((i[p]a.am(0,_,i,h,0,s))_){for(a.dlShiftTo(h,g),i.subTo(g,i);i[p]--_;){i.subTo(g,i)}}}null!e(i.drShiftTo(s,e),r!lm.ZERO.subTo(e,e)),i.ts,i.clamp(),0ti.rShiftTo(t,i),r0m.ZERO.subTo(i,i)}}},m.prototype.invDigitfunction(){if(this.t1){return 0}var tthis[0];if(0(1t)){return 0}var e3t;return 0(e(e(e(ee*(2-(15t)*e)15)*(2-(255t)*e)255)*(2-((65535t)*e65535))65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},m.prototype.isEvenfunction(){return 0(0this.t?1this[0]:this.s)},m.prototype.expfunction(t,e){if(4294967295t||t1){return m.ONE}var i,ny(),oy(),ae.convert(this),rv(t)-1;for(a.copyTo(n);0--r;){e.sqrTo(n,o),0(t1r)?e.mulTo(o,a,n):(in,no,oi)}return e.revert(n)},m.prototype.toStringfunction(t){if(this.s0){return-this.negate().toString(t)}var e;if(16t){e4}else{if(8t){e3}else{if(2t){e1}else{if(32t){e5 }else{if(4!t){return this.toRadix(t)}e2}}}}var i,n(1e)-1,o!1,a,rthis.t,lthis.DB-r*this.DB%e;if(0r--){for(lthis.DB0(ithis[r]l)(o!0,as(i));0r;){le?(i(this[r](1l)-1)e-l,i|this[--r](lthis.DB-e)):(ithis[r](l-e)n,l0(lthis.DB,--r)),0i(o!0),o(as(i))}}return o?a:0},m.prototype.negatefunction(){var ty();return m.ZERO.subTo(this,t),t},m.prototype.absfunction(){return this.s0?this.negate():this},m.prototype.compareTofunction(t){var ethis.s-t.s;if(0!e){return e}var ithis.t;if(0!(ei-t.t)){return e}for(;0--i;){if(0!(ethis[i]-t[i])){return e}}return 0},m.prototype.bitLengthfunction(){return this.t0?0:this.DB*(this.t-1)v(this[this.t-1]^this.sthis.DM)},m.prototype.modfunction(t){var ey();return this.abs().divRemTo(t,null,e),this.s00e.compareTo(m.ZERO)t.subTo(e,e),e},m.prototype.modPowIntfunction(t,e){return enew (t256||e.isEven()?u:c)(e),this.exp(t,e)},m.ZEROr(0),m.ONEr(1),nullf){var fnew Array,p0;for(;pk;){gMath.floor(65536*Math.random()),f[p]g8,f[p]255g}p0,d()}function _(){if(nulle){for(d(),(enew b).init(f),p0;pf.length;p){f[p]0}p0}return e.next()}function w(){}function b(){this.i0,this.j0,this.Snew Array}w.prototype.nextBytesfunction(t){for(var e0;et.length;e){t[e]_()}},b.prototype.initfunction(t){for(var e,i,n0;n256;n){this.S[n]n}for(ne0;n256;n){eethis.S[n]t[n%t.length]255,ithis.S[n],this.S[n]this.S[e],this.S[e]i}this.i0,this.j0},b.prototype.nextfunction(){var t;return this.ithis.i1255,this.jthis.jthis.S[this.i]255,tthis.S[this.i],this.S[this.i]this.S[this.j],this.S[this.j]t,this.S[tthis.S[this.i]255]};var k256;return{rsa_encrypt:function(t,e,i){var nnew o;return n.setPublic(e9a815ab9d6e86abbf33a4ac64e9196d5be44a09bd0ed6ae052914e1a865ac8331fed863de8ea697e9a7f63329e5e23cda09c72570f46775b7e39ea9670086f847d3c9c51963b131409b1e04265d9747419c635404ca651bbcbc87f99b8008f7f5824653e3658be4ba73e4480156b390bb73bc1f8b33578e7a4e12440e9396f2552c1aff1c92e797ebacdc37c109ab7bce2367a19c56a033ee04534723cc2558cb27368f5b9d32c04d12dbd86bbd68b1d99b7c349a8453ea75d1b2e94491ab30acf6c46a36a75b721b312bedf4e7aad21e54e9bcbcf8144c79b6e3c05eb4a1547750d224c0085d80e6da3907c3d945051c13c7c1dcefd6520ee8379c4f5231ed,10001),n.encrypt(t)}}}();function a_encode(t,e){et.charCodeAt(e);if(255e){throwINVALID_CHARACTER_ERR: DOM Exception 5}return e}var s_encode{PADCHAR:,ALPHA:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/,getbyte:function(t,e){et.charCodeAt(e);if(255e){throwINVALID_CHARACTER_ERR: DOM Exception 5}return e},encode:function(t){if(1!arguments.length){throwSyntaxError: Not enough arguments}var e,i,ns_encode.PADCHAR,os_encode.ALPHA,as_encode.getbyte,r[],l(tt).length-t.length%3;if(0t.length){return t}for(e0;el;e3){ia_encode(t,e)16|a_encode(t,e1)8|a_encode(t,e2),r.push(o.charAt(i18)),r.push(o.charAt(i1263)),r.push(o.charAt(i663)),r.push(o.charAt(63i))}switch(t.length-l){case 1:ia_encode(t,e)16,r.push(o.charAt(i18)o.charAt(i1263)nn);break;case 2:ia_encode(t,e)16|a_encode(t,e1)8,r.push(o.charAt(i18)o.charAt(i1263)o.charAt(i663)n)}return r.join()}};var o,a,d,i(o1,a8,d32,{getEncryption:function(t,e,i,n){ii||,tt||;for(var nn?t:u(t),tu(w(n)e),iq.strToBytes(i.toUpperCase(),!0),oNumber(i.length/2).toString(16);o.length4;){o0o}q.initkey(t),iq.encrypt(nq.strToBytes(e)oi),q.initkey();for(var aNumber(i.length/2).toString(16);a.length4;){a0a}return in_entry.rsa_encrypt(w(ai)),setTimeout(function(){!function(t,e){if(!(Math.random()(e||1))){try{var ilocation.protocol//ui.ptlogin2.qq.com/cgi-bin/report?idt;document.createElement(img).srci}catch(n){}}}(488358,1)},0),s_encode.encode(w(i)).replace(/[\/\]/g,function(t){return{/:-,:*,:_}[t]})},getRSAEncryption:function(t,e,i){return e(i?t:u(t))e.toUpperCase(),n_entry.rsa_encrypt(e)},md5:u});function u(t){return v(c(y(tt),t.length*a))}function c(t,e){t[e5]|128e%32,t[14(e6494)]e;for(var i1732584193,n-271733879,o-1732584194,a271733878,r0;rt.length;r16){var li,sn,uo,ca,ip(i,n,o,a,t[r0],7,-680876936),ap(a,i,n,o,t[r1],12,-389564586),op(o,a,i,n,t[r2],17,606105819),np(n,o,a,i,t[r3],22,-1044525330);ip(i,n,o,a,t[r4],7,-176418897),ap(a,i,n,o,t[r5],12,1200080426),op(o,a,i,n,t[r6],17,-1473231341),np(n,o,a,i,t[r7],22,-45705983),ip(i,n,o,a,t[r8],7,1770035416),ap(a,i,n,o,t[r9],12,-1958414417),op(o,a,i,n,t[r10],17,-42063),np(n,o,a,i,t[r11],22,-1990404162),ip(i,n,o,a,t[r12],7,1804603682),ap(a,i,n,o,t[r13],12,-40341101),op(o,a,i,n,t[r14],17,-1502002290),ih(i,np(n,o,a,i,t[r15],22,1236535329),o,a,t[r1],5,-165796510),ah(a,i,n,o,t[r6],9,-1069501632),oh(o,a,i,n,t[r11],14,643717713),nh(n,o,a,i,t[r0],20,-373897302),ih(i,n,o,a,t[r5],5,-701558691),ah(a,i,n,o,t[r10],9,38016083),oh(o,a,i,n,t[r15],14,-660478335),nh(n,o,a,i,t[r4],20,-405537848),ih(i,n,o,a,t[r9],5,568446438),ah(a,i,n,o,t[r14],9,-1019803690),oh(o,a,i,n,t[r3],14,-187363961),nh(n,o,a,i,t[r8],20,1163531501),ih(i,n,o,a,t[r13],5,-1444681467),ah(a,i,n,o,t[r2],9,-51403784),oh(o,a,i,n,t[r7],14,1735328473),ig(i,nh(n,o,a,i,t[r12],20,-1926607734),o,a,t[r5],4,-378558),ag(a,i,n,o,t[r8],11,-2022574463),og(o,a,i,n,t[r11],16,1839030562),ng(n,o,a,i,t[r14],23,-35309556),ig(i,n,o,a,t[r1],4,-1530992060),ag(a,i,n,o,t[r4],11,1272893353),og(o,a,i,n,t[r7],16,-155497632),ng(n,o,a,i,t[r10],23,-1094730640),ig(i,n,o,a,t[r13],4,681279174),ag(a,i,n,o,t[r0],11,-358537222),og(o,a,i,n,t[r3],16,-722521979),ng(n,o,a,i,t[r6],23,76029189),ig(i,n,o,a,t[r9],4,-640364487),ag(a,i,n,o,t[r12],11,-421815835),og(o,a,i,n,t[r15],16,530742520),i_(i,ng(n,o,a,i,t[r2],23,-995338651),o,a,t[r0],6,-198630844),a_(a,i,n,o,t[r7],10,1126891415),o_(o,a,i,n,t[r14],15,-1416354905),n_(n,o,a,i,t[r5],21,-57434055),i_(i,n,o,a,t[r12],6,1700485571),a_(a,i,n,o,t[r3],10,-1894986606),o_(o,a,i,n,t[r10],15,-1051523),n_(n,o,a,i,t[r1],21,-2054922799),i_(i,n,o,a,t[r8],6,1873313359),a_(a,i,n,o,t[r15],10,-30611744),o_(o,a,i,n,t[r6],15,-1560198380),n_(n,o,a,i,t[r13],21,1309151649),i_(i,n,o,a,t[r4],6,-145523070),a_(a,i,n,o,t[r11],10,-1120210379),o_(o,a,i,n,t[r2],15,718787259),n_(n,o,a,i,t[r9],21,-343485551),im(i,l),nm(n,s),om(o,u),am(a,c) }return 16d?Array(n,o):Array(i,n,o,a)}function f(t,e,i,n,o,a){return m((am(m(e,t),m(n,a)))(oo)|a32-o,i)}function p(t,e,i,n,o,a,r){return f(ei|~en,t,e,o,a,r)}function h(t,e,i,n,o,a,r){return f(en|i~n,t,e,o,a,r)}function g(t,e,i,n,o,a,r){return f(e^i^n,t,e,o,a,r)}function _(t,e,i,n,o,a,r){return f(i^(e|~n),t,e,o,a,r)}function m(t,e){var i(65535t)(65535e);return(t16)(e16)(i16)16|65535i}function y(t){for(var eArray(),i(1a)-1,n0;nt.length*a;na){e[n5]|(t.charCodeAt(n/a)i)n%32}return e}function v(t){for(var eo?0123456789ABCDEF:0123456789abcdef,i,n0;n4*t.length;n){ie.charAt(t[n2]n%4*8415)e.charAt(t[n2]n%4*815)}return i}function w(t){for(var e[],i0;it.length;i2){e.push(String.fromCharCode(parseInt(t.substr(i,2),16)))}return e.join()}; return i.getEncryption(arguments[0], arguments[1], arguments[2], undefined) 这段js代码是无法直接执行的因为这个是为了在selenium中执行的只要把最后一行的return去掉然后调用i.getEncryption(, “”, “”, undefined);即可 至此无验证码的登录已经完成。 要是提示密码不正确可能加密算法又改动了需要去重新把c_login_2.js文件拿下来做改动。 完整登录的java代码如下 import com.alibaba.fastjson.JSONObject; import org.apache.commons.io.FileUtils; import org.apache.http.Header; import org.apache.http.HeaderElement; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils;import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.net.URL; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List;/*** auther jixiang.ma* date 2021/1/12**/ public class QqLogin {private static String ptVcodeV1;private static String verifyCode;private static String sid ;private static String ptdrvs;private static String ptRandSalt;private static String capCd;private static String ptUin;private static String ptVerifysessionV1;private static HttpClient httpClient HttpClientBuilder.create().build();public static void main(String[] args) throws Exception {check();login(JsTest.getP(your password, %L1, verifyCode));}public static void check() throws IOException {String checkUrl http://check.ptlogin2.qq.com/check ?regmaster pt_tea2 pt_vcode1 uinyour qq number appid21000501 js_ver21010623 js_type1 r0.7541288831736455 u1https://lol.qq.com/space/index.shtml pt_uistyle40;HttpGet httpGet new HttpGet(checkUrl);httpGet.setHeader(User-Agent, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36);HttpResponse response httpClient.execute(httpGet);HttpEntity httpEntity response.getEntity();String responseBody EntityUtils.toString(httpEntity, Charset.forName(UTF-8));String[] data responseBody.substring(12).split(,);ptVcodeV1 data[0].substring(2,3);if(0.equals(ptVcodeV1)) {verifyCode data[1].substring(1,5);ptUin data[2].substring(1, data[2].length() - 1);ptVerifysessionV1 data[3].replace(, );ptRandSalt data[4].replace(, );ptdrvs data[5].replace(, );String tmpSid data[6].replace(, );sid tmpSid.substring(0, tmpSid.length() - 1);}System.out.println(ptVcodeV1);System.out.println(verifyCode);System.out.println(ptUin);System.out.println(ptVerifysessionV1);System.out.println(ptRandSalt);System.out.println(ptdrvs);System.out.println(sid);System.out.println(responseBody);}public static void login(String p) throws IOException {String loginUrl https://ssl.ptlogin2.qq.com/login?uyour qq number verifycode verifyCode pt_vcode_v10 pt_verifysession_v1 ptVerifysessionV1 p p pt_randsalt ptRandSalt u1https%3A%2F%2Flol.qq.com%2Fact%2Fa20210108lplspring%2Findex.shtml%3Fe_code%3D507042 ptredirect1h1t1g1from_ui1ptlang2052action2-26- System.currentTimeMillis() js_ver21010623js_type1 pt_uistyle40aid21000501daid8 ptdrvs ptdrvs sid sid ;HttpGet httpGet new HttpGet(loginUrl);httpGet.setHeader(Accept-Language, zh-CN,zh;q0.9);httpGet.setHeader(User-Agent, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36);HttpResponse response httpClient.execute(httpGet);for (Header header : response.getAllHeaders()) {System.out.println(header.getName() \t header.getValue());}String str EntityUtils.toString(response.getEntity());String a new String(str.getBytes(StandardCharsets.ISO_8859_1), Charset.forName(UTF-8));System.out.println(a);System.out.println(-------------);} } getP()是调用了selenium执行了js代码,使用方法见https://blog.csdn.net/majixiang1996/article/details/112484449 public static String getP(String password, String uin, String verifyCode) throws Exception {System.setProperty(webdriver.chrome.driver, C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe);ChromeOptions chromeOptions new ChromeOptions();chromeOptions.setHeadless(true);WebDriver driver new ChromeDriver(chromeOptions);JavascriptExecutor executor (JavascriptExecutor) driver;String result executor.executeScript(readJsFile(), password, uin, verifyCode).toString();driver.quit();System.out.println(result);return result;}private static String readJsFile() throws Exception {StringBuffer script new StringBuffer();File file new File(D:\\qq_login.js);FileReader filereader new FileReader(file);BufferedReader bufferedReader new BufferedReader(filereader);String tempString null;while ((tempString bufferedReader.readLine()) ! null) {script.append(tempString).append(\n);}bufferedReader.close();filereader.close();return script.toString();}如果登录正常的话response body里是没有返回的可以在response header的Set-Cookie中找到一个叫pskey的参数代表登录成功。
文章转载自:
http://www.morning.mqbdb.cn.gov.cn.mqbdb.cn
http://www.morning.jftl.cn.gov.cn.jftl.cn
http://www.morning.lrmts.cn.gov.cn.lrmts.cn
http://www.morning.kflzy.cn.gov.cn.kflzy.cn
http://www.morning.hwcln.cn.gov.cn.hwcln.cn
http://www.morning.ssmhn.cn.gov.cn.ssmhn.cn
http://www.morning.xqcbz.cn.gov.cn.xqcbz.cn
http://www.morning.jqlx.cn.gov.cn.jqlx.cn
http://www.morning.lstmg.cn.gov.cn.lstmg.cn
http://www.morning.rdlxh.cn.gov.cn.rdlxh.cn
http://www.morning.txzmy.cn.gov.cn.txzmy.cn
http://www.morning.bttph.cn.gov.cn.bttph.cn
http://www.morning.fwzjs.cn.gov.cn.fwzjs.cn
http://www.morning.prkdl.cn.gov.cn.prkdl.cn
http://www.morning.mzydm.cn.gov.cn.mzydm.cn
http://www.morning.bojkosvit.com.gov.cn.bojkosvit.com
http://www.morning.nqbcj.cn.gov.cn.nqbcj.cn
http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn
http://www.morning.rrwgh.cn.gov.cn.rrwgh.cn
http://www.morning.thrcj.cn.gov.cn.thrcj.cn
http://www.morning.gtdf.cn.gov.cn.gtdf.cn
http://www.morning.mwpcp.cn.gov.cn.mwpcp.cn
http://www.morning.hmpxn.cn.gov.cn.hmpxn.cn
http://www.morning.spkw.cn.gov.cn.spkw.cn
http://www.morning.kdxzy.cn.gov.cn.kdxzy.cn
http://www.morning.xblrq.cn.gov.cn.xblrq.cn
http://www.morning.wrtw.cn.gov.cn.wrtw.cn
http://www.morning.lflsq.cn.gov.cn.lflsq.cn
http://www.morning.yrjfb.cn.gov.cn.yrjfb.cn
http://www.morning.gkgr.cn.gov.cn.gkgr.cn
http://www.morning.kkdbz.cn.gov.cn.kkdbz.cn
http://www.morning.xqzrg.cn.gov.cn.xqzrg.cn
http://www.morning.fy974.cn.gov.cn.fy974.cn
http://www.morning.wbfly.cn.gov.cn.wbfly.cn
http://www.morning.zgztn.cn.gov.cn.zgztn.cn
http://www.morning.lqlc.cn.gov.cn.lqlc.cn
http://www.morning.jzkqg.cn.gov.cn.jzkqg.cn
http://www.morning.srjgz.cn.gov.cn.srjgz.cn
http://www.morning.fkyqt.cn.gov.cn.fkyqt.cn
http://www.morning.fdrch.cn.gov.cn.fdrch.cn
http://www.morning.hsrpr.cn.gov.cn.hsrpr.cn
http://www.morning.qpqb.cn.gov.cn.qpqb.cn
http://www.morning.ktlfb.cn.gov.cn.ktlfb.cn
http://www.morning.ltspm.cn.gov.cn.ltspm.cn
http://www.morning.gmwdl.cn.gov.cn.gmwdl.cn
http://www.morning.tsmxh.cn.gov.cn.tsmxh.cn
http://www.morning.npmpn.cn.gov.cn.npmpn.cn
http://www.morning.hmjasw.com.gov.cn.hmjasw.com
http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn
http://www.morning.zwndt.cn.gov.cn.zwndt.cn
http://www.morning.hmktd.cn.gov.cn.hmktd.cn
http://www.morning.kpypy.cn.gov.cn.kpypy.cn
http://www.morning.xzrbd.cn.gov.cn.xzrbd.cn
http://www.morning.xkjrs.cn.gov.cn.xkjrs.cn
http://www.morning.mhnd.cn.gov.cn.mhnd.cn
http://www.morning.rtmqy.cn.gov.cn.rtmqy.cn
http://www.morning.drbwh.cn.gov.cn.drbwh.cn
http://www.morning.czzpm.cn.gov.cn.czzpm.cn
http://www.morning.lnbcx.cn.gov.cn.lnbcx.cn
http://www.morning.pzbqm.cn.gov.cn.pzbqm.cn
http://www.morning.srbl.cn.gov.cn.srbl.cn
http://www.morning.ltdrz.cn.gov.cn.ltdrz.cn
http://www.morning.brqjs.cn.gov.cn.brqjs.cn
http://www.morning.khclr.cn.gov.cn.khclr.cn
http://www.morning.wkwds.cn.gov.cn.wkwds.cn
http://www.morning.zttjs.cn.gov.cn.zttjs.cn
http://www.morning.btlmb.cn.gov.cn.btlmb.cn
http://www.morning.ggtkk.cn.gov.cn.ggtkk.cn
http://www.morning.cyhlq.cn.gov.cn.cyhlq.cn
http://www.morning.tqdlk.cn.gov.cn.tqdlk.cn
http://www.morning.dzgmj.cn.gov.cn.dzgmj.cn
http://www.morning.smpmn.cn.gov.cn.smpmn.cn
http://www.morning.wgzzj.cn.gov.cn.wgzzj.cn
http://www.morning.xmttd.cn.gov.cn.xmttd.cn
http://www.morning.tpbhf.cn.gov.cn.tpbhf.cn
http://www.morning.sryyt.cn.gov.cn.sryyt.cn
http://www.morning.sjbty.cn.gov.cn.sjbty.cn
http://www.morning.nxwk.cn.gov.cn.nxwk.cn
http://www.morning.rdzlh.cn.gov.cn.rdzlh.cn
http://www.morning.mnyzz.cn.gov.cn.mnyzz.cn
http://www.tj-hxxt.cn/news/276947.html

相关文章:

  • 创新优典网站建设成全视频在线看
  • 深圳还有网站泊头哪有哪家做网站做的号
  • 企业建站系统 哪个好怎样进行网站建设步骤
  • 沈阳公司网站设计制作wordpress获取热门文章
  • 怎做视频网站专业网页制作流程
  • 网站制作分工做视频网站注意什么软件
  • 网站建设进度计划排版模板素材
  • 1688货源网官方网站湖北企业模板建站开发
  • 鞍山网站设计o2o网站运维建设方案
  • 无锡seo公司找哪家好网站优化标题怎么做
  • 做的网站访问不了二级建造师报名的官网
  • 网站备案 和 icp做旅游网站课程设计报告
  • 昆明网站制作免费下载的app
  • 做美食网站有哪些有赞微商城商家登录
  • 英文网站常用字体网站主持人制作方法
  • 重庆最好的网站建设wordpress直播插件
  • 国内网站建设公司排名大庆网站建设公司
  • wordpress网站数据库备份济南网站建设选聚搜网络认可
  • 世界网站排名网易企业邮箱和163邮箱区别
  • 取名网站怎么做wordpress安装第二步500错误
  • 五金外贸网站模板湖南电商网站建设
  • 互联网网站有哪些网站建设品牌公司
  • 四川省建设厅网站为什么打不开网站建设规划方书模板
  • 网站 栏目做下拉贵阳装饰装修公司网站
  • 校园网站建设建议昆明seo推广公司
  • 山西山西省建设厅网站首页搜狗站长工具平台
  • 文昌市规划建设管理局网站手机怎样翻墙上外国网
  • 网站不能粘贴怎么做开发网站网络公司怎么样
  • 网站开发服务公司外汇平台+网站开发
  • php网站培训班前程无忧网站开发待遇怎么样