Skip to content

Commit

Permalink
sdk finished!!
Browse files Browse the repository at this point in the history
  • Loading branch information
sml2h3 committed Jan 20, 2019
1 parent b1edadd commit ae42ce5
Show file tree
Hide file tree
Showing 5 changed files with 1,915 additions and 966 deletions.
Binary file removed QQ20190117-0.png
Binary file not shown.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
由于本次项目需求的朋友来自使用各个开发语言,本次sdk将会js的方式提供,各开发者可以根据自己开发语言考虑采用v8引擎执行或语言自带的执行js的函数或者是第三方包。

## 更新tip

### 2019.1.20
在连续5天的奋战下,我们sdk最终版终于完成!本项目以jssdk为核心,本次发布python调用实例,敬请参考。
将在未来1-2天内发布java,go,c#的实例版本,欢迎大家star和加入我们这个有爱的数据矿工群体。
本次开发全程直播,将由"时光机"朋友将视频剪辑后发布,具体视频地址敬请期待。
虎牙直播间:17593443欢迎订阅

[一个97少年的战斗史,找对象,找工作]

### 2019.1.17
这个版本加密里面工程师下的毒太多了,现在上传的是已经确定加密过程,但由于部分加密参数获取的生成方式依旧不是很全面,所以暂时无法通过瑞数的审核,带生成的参数访问页面会400错误。
不过现在可以肯定的是目前这个版本是整个MmEwMd的主要生成方式,待我整理思路把不确定的参数生成方式全部弄清楚,会给大家继续献上完整SDK。下次更新时间预计为2019.1.19之前。
Expand All @@ -19,5 +28,6 @@

!!切记暂时不要尝试用在生产环境,暂时无法通过瑞数的识别


## 快乐的爬虫群
**QQ119794042**
2,632 changes: 1,671 additions & 961 deletions encrypt.js

Large diffs are not rendered by default.

49 changes: 44 additions & 5 deletions encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,50 @@
"""

import execjs
import requests
from lxml import etree

headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Cookie": "ccpassport=1ff98c661b8f424096c234ce889da9b0;_gscu_2116842793=47626758817stt18; _gscs_2116842793=47659453ttzz3o20|pv:14; _gscbrs_2116842793=1; wzwsconfirm=0e561c10c60c2f0d44410644eb3c2403; wzwstemplate=NQ==; wzwschallenge=-1;wzwsvtime=1547659451;",
"Host": "wenshu.court.gov.cn",
"Origin": "http://wenshu.court.gov.cn",
"Referer": "http://wenshu.court.gov.cn/List/List?sorttype=1&conditions=searchWord+2+AJLX++%E6%A1%88%E4%BB%B6%E7%B1%BB%E5%9E%8B:%E6%B0%91%E4%BA%8B%E6%A1%88%E4%BB%B6",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
}
url = "http://wenshu.court.gov.cn/List/List?sorttype=1&conditions=searchWord+2+AJLX++%E6%A1%88%E4%BB%B6%E7%B1%BB%E5%9E%8B:%E6%B0%91%E4%BA%8B%E6%A1%88%E4%BB%B6"

rsp = requests.get(url, headers=headers)
f80s = rsp.cookies['FSSBBIl1UgzbN7N80S']
f80t = rsp.cookies['FSSBBIl1UgzbN7N80T']
with open('encrypt.js', 'r') as f:
js = f.read()
js1 = f.read()
ctx1 = execjs.compile(js1)
with open('ywtu.js', 'r') as f:
js2 = f.read()
ctx2 = execjs.compile(js2)
html = etree.HTML(rsp.text)
meta = html.xpath('//*[@id="9DhefwqGPrzGxEp9hPaoag"]/@content')[0]
ywtu = ctx2.call("getc", meta)
f80t_n = ctx1.call("getCookies", meta, f80t, ywtu)
headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Cookie": "FSSBBIl1UgzbN7N80S={}; FSSBBIl1UgzbN7N80T={}; ccpassport=1ff98c661b8f424096c234ce889da9b0;_gscu_2116842793=47626758817stt18; _gscs_2116842793=47659453ttzz3o20|pv:14; _gscbrs_2116842793=1; wzwsconfirm=0e561c10c60c2f0d44410644eb3c2403; wzwstemplate=NQ==; wzwschallenge=-1;wzwsvtime=1547659451;".format(f80s, f80t_n),
"Host": "wenshu.court.gov.cn",
"Origin": "http://wenshu.court.gov.cn",
"Referer": "http://wenshu.court.gov.cn/List/List?sorttype=1&conditions=searchWord+2+AJLX++%E6%A1%88%E4%BB%B6%E7%B1%BB%E5%9E%8B:%E6%B0%91%E4%BA%8B%E6%A1%88%E4%BB%B6",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
}
url = "http://wenshu.court.gov.cn/List/List?sorttype=1&conditions=searchWord+2+AJLX++%E6%A1%88%E4%BB%B6%E7%B1%BB%E5%9E%8B:%E6%B0%91%E4%BA%8B%E6%A1%88%E4%BB%B6"

cookies = "" # 传入FSSBBIl1UgzbN7N80T
ctx = execjs.compile(js)
r = ctx.call("makemmwded", cookies, '/List/ListContent')
print(r)
rsp = requests.get(url, headers=headers)
print(rsp.status_code)
print(rsp.cookies)
190 changes: 190 additions & 0 deletions ywtu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
function _$go(_$EO) {
function _$az() {
var _$BF = _$h7[_$EO.charCodeAt(_$fq++)];
if (_$BF < 0) {
return _$h7[_$EO.charCodeAt(_$fq++)] * 7396 + _$h7[_$EO.charCodeAt(_$fq++)] * 86 + _$h7[_$EO.charCodeAt(_$fq++)];
} else if (_$BF < 64) {
return _$BF;
} else if (_$BF <= 86) {
return _$BF * 86 + _$h7[_$EO.charCodeAt(_$fq++)] - 5440;
}
}

var _$pM = _$EO.length, _$fq = 0, _$EA, _$Cz = 0, _$h7 = _$z0()[5];
var _$Ea = _$az();
_$kI = _$Hi(_$kI);
_$FM = _$Hi(_$FM);
var _$zG = new Array(_$Ea);
while (_$fq < _$pM) {
_$EA = _$az();
_$zG[_$Cz++] = _$EO.substr(_$fq, _$EA);
_$fq += _$EA;
}
_$Hc = function (_$BF) {
var _$Cl = _$BF % 64;
var _$Cs = _$BF - _$Cl;
_$Cl = _$nM(_$Cl);
_$Cl ^= _$kI;
_$Cs += _$Cl;
return _$zG[_$Cs];
};
}
function _$nM(_$Cz) {
var _$h7 = [0, 1, 3, 7, 0xf, 0x1f];
return (_$Cz >> _$FM) | ((_$Cz & _$h7[_$FM]) << (6 - _$FM));
}
function _$Hi(_$Cz, _$h7) {
_$Cz = parseInt(_$Cz);
if (!isNaN(_$Cz)) return _$Cz;
if (arguments.length > 1) return _$h7;
return NaN;
}

function _$pZ(){
return ""
}

function _$xR() {
return "qrcklmDoExthWJiHAp1sVYKU3RFMQw8IGfPO92bvLNj.7zXBaSnu0TC6gy_4Ze5d{}|~ !#$%()*+,-:=?@[]^".split(_$pZ());
}

function _$zh(_$h7, _$Cz, _$fq, _$Ea) {
for (; _$Cz < _$fq; _$Cz++) {
_$h7[_$Cz] = _$Ea;
}
}

function _$wV() {
var _$fq = _$xR();
var _$Cz = [];
for (var _$az = 0; _$az < 6; _$az++) {
_$Cz[_$az] = [];
}
_$z0 = function () {
return _$Cz;
};
var _$pM = _$Cz[0], _$Ea = _$Cz[1], _$EA = _$Cz[2], _$EO = _$Cz[3], _$ht = _$Cz[4], _$h7 = _$Cz[5];
_$zh(_$h7, 0, 255, -1);
for (_$az = 0; _$az < _$fq.length; _$az++) {
var _$zG = _$fq[_$az].charCodeAt(0);
_$pM[_$zG] = _$az << 2;
_$Ea[_$zG] = _$az >> 4;
_$EA[_$zG] = (_$az & 15) << 4;
_$EO[_$zG] = _$az >> 2;
_$ht[_$zG] = (_$az & 3) << 6;
_$h7[_$zG] = _$az;
}
}

function _$Em() {
return _$BI._$b0();
}
function _$vz() {
return _$BI._$ap();
}
function _$qy(meta) {
function _$Ea() {
var _$zG = _$Cz.charCodeAt(_$pM);
if (_$zG >= 40) {
_$pM++;
return _$zG - 40;
}
var _$EA = 39 - _$zG;
_$zG = 0;
for (var _$az = 0; _$az < _$EA; _$az++) {
_$zG *= 87;
_$zG += _$Cz.charCodeAt(_$pM + 1 + _$az) - 40;
}
_$pM += _$EA + 1;
return _$zG + 87;
}

function _$EO() {
var _$EA = _$Ea();
var _$az = _$Cz.substr(_$pM, _$EA);
_$pM += _$EA;
return _$az;
}

function _$h7() {
return _$Cz.substr(_$pM);
}

var _$Cz = meta, _$pM = 0, _$fq = {};
_$fq._$b0 = _$EO;
_$fq._$ap = _$h7;
return _$fq;
}
var _$Hc = undefined;
// _$go(meta);
var _$BI = undefined;
var _$z0 = undefined;
function _$kw(){
return "`"
}
function _$uV() {
var _$h7 = _$DY(_$Em()).split(_$kw());
for (var _$Cz = 0; _$Cz < _$h7.length; _$Cz++) _$h7[_$Cz] = _$Hi(_$h7[_$Cz]);
return _$h7;
}

_$yS = _$Aw("qzs|u`v");

function _$fU(_$h7) {
return _$h7[_$yS];
}

function _$Aw(_$fq) {
var _$h7, _$EO = _$fq.length, _$EA = new Array(_$EO - 1);
var _$Cz = _$fq.charCodeAt(0) - 93;
for (var _$pM = 0, _$Ea = 1; _$Ea < _$EO; ++_$Ea) {
_$h7 = _$fq.charCodeAt(_$Ea);
if (_$h7 >= 40 && _$h7 < 92) {
_$h7 += _$Cz;
if (_$h7 >= 92) _$h7 = _$h7 - 52;
} else if (_$h7 >= 93 && _$h7 < 127) {
_$h7 += _$Cz;
if (_$h7 >= 127) _$h7 = _$h7 - 34;
}
_$EA[_$pM++] = _$h7;
}
return String.fromCharCode.apply(null, _$EA);
}

function _$DY(_$fq) {
var _$h7, _$EO = _$fU(_$fq), _$EA = new Array(_$EO - 1);
var _$Cz = _$fq.charCodeAt(0) - 40;
for (var _$pM = 0, _$Ea = 1; _$Ea < _$EO; ++_$Ea) {
_$h7 = _$fq.charCodeAt(_$Ea);
if (_$h7 >= 40 && _$h7 < 127) {
_$h7 += _$Cz;
if (_$h7 >= 127) _$h7 = _$h7 - 87;
}
_$EA[_$pM++] = _$h7;
}
return String.fromCharCode.apply(null, _$EA);
}

function getc(meta){
_$BI = _$qy(meta);
for(var i = 0; i < 11; i++){
var _$Ea = _$uV();
}
_$kI = _$Ea[1];
_$D1 = _$Ea[0];
_$FM = _$Ea[2];
_$Em();
var r = _$vz();
_$wV();
_$go(r);
return _$Hc(26)
}

/**
*
* developer: sml2h3
* time: 2019.1.20
* GitHub:https://github.com/sml2h3
* QQ group:119794042
*/

0 comments on commit ae42ce5

Please sign in to comment.