开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 18481|回复: 147
收起左侧

[易源码分享] JD之log值 2022.03.22——开源

[复制链接]
头像被屏蔽
结帖率:86% (25/29)
发表于 2022-3-22 21:03:32 | 显示全部楼层 |阅读模式   辽宁省锦州市
分享源码
界面截图:
是否带模块: 纯源码
备注说明: -
大佬帮找个JS算法
https://bbs.125.la/forum.php?mod=viewthread&tid=14721694
(出处: 精易论坛)

@果心豆腐酱

前几天看到有人求此算法,当时我是真没看到这个包,,,今天突然又看了一眼,嗯,既然看到了就好办了。
理论上来说,所有算法都可以分析、逆向、推理等,能加密亦可解密;

1.jpg


首先我开始打算通过hook,但是由于混淆太严重,导致hook失败;


然后我是通过程序发起定位追踪得到的位子,在进行单步走定位;首先打开谷歌开发者工具,我就不多说了;


先观察程序发起调用的全部js文件(共2个):图1
文件1:vendor.1e2b8531.js
文件2:index.d43de3f0.js
2个文件全部打开,在文件每个里搜索关键词:log
文件1里没有搜到;在搜文件2,好,文件2里搜到了很多;那么我们就定位核心文件为:文件2
data: {"redPacketId":"441595068","followShop":0,"random":"88812911","log":"需要的","sceneid":"JLHBhPageh5"}

2.jpg

接下来,看图2
首先打开跟进程序发起的第1个函数;下上断点之后,点击网页上的“为他助力”,上看看、下看看发现没用看到log这个密文,那么说明我们所定位的位子不准确;
好,那么我们把这个断点取消,在进行打开跟进程序发起的第2个函数,以此类推,一直找到为止,不要说找不到,只是你没看到而已;

3.jpg

接下来,看图3
经过不断找呀找~~~!找到了,在第9个函数mt()50764位子;
然后下断点,在去网页上点击“为他助力”

4.jpg

图4
根据图4所得到的定位我们接下来进行单步跟踪到函数内,按快捷键F11,走11下到图5位子
5.jpg

图5
那么这个log密文必然就是这个函数内所计算加密而成的 => var c = u(t, e, n);
然后我们单步跳过也就是快捷键F10,按1下走到图6位子
6.jpg

图6
smashUtils.get_risk_result(i);
那么这个函数就是核心了,log运算的过程就在此;核心函数范围:38727~39008行
此js并不难,难点却在switch里绕来绕去,在加混淆有点厉害。
如有任何不懂的,可通过聊天私信


7.jpg

图7
图文教到此结束
8.jpg QQ截图20220322204842.jpg


提示下,此本版务必通过 http://127.0.0.1/Index.html 才可以正常运算,不支持脱机工作,免费的凑合用吧,我特么的用了2天时间。。。;

卧槽~又长姿势了!源码在此~!
Index.rar (60.8 KB, 下载次数: 265)

点评

求此算法成品 有的联系   河北省廊坊市  发表于 2022-6-8 23:05

评分

参与人数 9好评 +6 精币 +15 收起 理由
ghost12 + 1 支持开源~!感谢分享
f332nl + 1 + 1 开源精神必须支持~
mufu + 1 + 2 感谢分享,很给力!~
kk4648 + 1 + 2 新技能已get√
1051496412 + 1 + 2 支持开源~!感谢分享
喵帕斯和艾希 + 2 支持开源~!感谢分享
qqmcb + 1 + 2 支持开源~!感谢分享
果心豆腐酱 + 1 + 2 支持开源~!感谢分享
1117for + 1 支持开源~!感谢分享

查看全部评分


头像被屏蔽
结帖率:86% (25/29)
 楼主| 发表于 2022-3-26 15:45:37 | 显示全部楼层   辽宁省锦州市
本帖最后由 机器兔 于 2022-3-26 15:53 编辑

有人说算法最后字符串一样的问题;
确实是一个bug,是因为函数以及变量声明引用重复导致冲突;

0.png

首先找到这个 s 函数位子;
1.png

改为如下
2.png
再将这里的s改为我们刚才改的即可
3.png

4.png

然后在将下面这个a声明变量放入 var e6 函数头部;
[JavaScript] 纯文本查看 复制代码
var a = {"0":0,"1":1996959894,"2":-301047508,"3":-1727442502,"4":124634137,"5":1886057615,"6":-379345611,"7":-1637575261,"8":249268274,"9":2044508324,"10":-522852066,"11":-1747789432,"12":162941995,"13":2125561021,"14":-407360249,"15":-1866523247,"16":498536548,"17":1789927666,"18":-205950648,"19":-2067906082,"20":450548861,"21":1843258603,"22":-187386543,"23":-2083289657,"24":325883990,"25":1684777152,"26":-43845254,"27":-1973040660,"28":335633487,"29":1661365465,"30":-99664541,"31":-1928851979,"32":997073096,"33":1281953886,"34":-715111964,"35":-1570279054,"36":1006888145,"37":1258607687,"38":-770865667,"39":-1526024853,"40":901097722,"41":1119000684,"42":-608450090,"43":-1396901568,"44":853044451,"45":1172266101,"46":-589951537,"47":-1412350631,"48":651767980,"49":1373503546,"50":-925412992,"51":-1076862698,"52":565507253,"53":1454621731,"54":-809855591,"55":-1195530993,"56":671266974,"57":1594198024,"58":-972236366,"59":-1324619484,"60":795835527,"61":1483230225,"62":-1050600021,"63":-1234817731,"64":1994146192,"65":31158534,"66":-1731059524,"67":-271249366,"68":1907459465,"69":112637215,"70":-1614814043,"71":-390540237,"72":2013776290,"73":251722036,"74":-1777751922,"75":-519137256,"76":2137656763,"77":141376813,"78":-1855689577,"79":-429695999,"80":1802195444,"81":476864866,"82":-2056965928,"83":-228458418,"84":1812370925,"85":453092731,"86":-2113342271,"87":-183516073,"88":1706088902,"89":314042704,"90":-1950435094,"91":-54949764,"92":1658658271,"93":366619977,"94":-1932296973,"95":-69972891,"96":1303535960,"97":984961486,"98":-1547960204,"99":-725929758,"100":1256170817,"101":1037604311,"102":-1529756563,"103":-740887301,"104":1131014506,"105":879679996,"106":-1385723834,"107":-631195440,"108":1141124467,"109":855842277,"110":-1442165665,"111":-586318647,"112":1342533948,"113":654459306,"114":-1106571248,"115":-921952122,"116":1466479909,"117":544179635,"118":-1184443383,"119":-832445281,"120":1591671054,"121":702138776,"122":-1328506846,"123":-942167884,"124":1504918807,"125":783551873,"126":-1212326853,"127":-1061524307,"128":-306674912,"129":-1698712650,"130":62317068,"131":1957810842,"132":-355121351,"133":-1647151185,"134":81470997,"135":1943803523,"136":-480048366,"137":-1805370492,"138":225274430,"139":2053790376,"140":-468791541,"141":-1828061283,"142":167816743,"143":2097651377,"144":-267414716,"145":-2029476910,"146":503444072,"147":1762050814,"148":-144550051,"149":-2140837941,"150":426522225,"151":1852507879,"152":-19653770,"153":-1982649376,"154":282753626,"155":1742555852,"156":-105259153,"157":-1900089351,"158":397917763,"159":1622183637,"160":-690576408,"161":-1580100738,"162":953729732,"163":1340076626,"164":-776247311,"165":-1497606297,"166":1068828381,"167":1219638859,"168":-670225446,"169":-1358292148,"170":906185462,"171":1090812512,"172":-547295293,"173":-1469587627,"174":829329135,"175":1181335161,"176":-882789492,"177":-1134132454,"178":628085408,"179":1382605366,"180":-871598187,"181":-1156888829,"182":570562233,"183":1426400815,"184":-977650754,"185":-1296233688,"186":733239954,"187":1555261956,"188":-1026031705,"189":-1244606671,"190":752459403,"191":1541320221,"192":-1687895376,"193":-328994266,"194":1969922972,"195":40735498,"196":-1677130071,"197":-351390145,"198":1913087877,"199":83908371,"200":-1782625662,"201":-491226604,"202":2075208622,"203":213261112,"204":-1831694693,"205":-438977011,"206":2094854071,"207":198958881,"208":-2032938284,"209":-237706686,"210":1759359992,"211":534414190,"212":-2118248755,"213":-155638181,"214":1873836001,"215":414664567,"216":-2012718362,"217":-15766928,"218":1711684554,"219":285281116,"220":-1889165569,"221":-127750551,"222":1634467795,"223":376229701,"224":-1609899400,"225":-686959890,"226":1308918612,"227":956543938,"228":-1486412191,"229":-799009033,"230":1231636301,"231":1047427035,"232":-1362007478,"233":-640263460,"234":1088359270,"235":936918000,"236":-1447252397,"237":-558129467,"238":1202900863,"239":817233897,"240":-1111625188,"241":-893730166,"242":1404277552,"243":615818150,"244":-1160759803,"245":-841546093,"246":1423857449,"247":601450431,"248":-1285129682,"249":-1000256840,"250":1567103746,"251":711928724,"252":-1274298825,"253":-1022587231,"254":1510334235,"255":755167117};


6.png

最后测试运行结果如下:


5.png





回复 支持 反对

使用道具 举报

签到天数: 10 天

发表于 2024-5-18 04:04:06 | 显示全部楼层   广东省江门市
支持开源
回复 支持 反对

使用道具 举报

发表于 2023-6-5 16:07:21 | 显示全部楼层   黑龙江省牡丹江市
支持开源~!感谢分享
回复 支持 反对

使用道具 举报

发表于 2022-9-26 12:53:03 | 显示全部楼层   山东省济宁市
111111111111111111111111
回复 支持 反对

使用道具 举报

发表于 2022-9-8 15:40:02 | 显示全部楼层   江苏省苏州市
楼主,貌似现在失效了,浏览器模拟直接火爆了
回复 支持 反对

使用道具 举报

结帖率:100% (6/6)
发表于 2022-8-26 23:38:59 | 显示全部楼层   辽宁省沈阳市

开源精神值得吾辈学习
回复 支持 反对

使用道具 举报

发表于 2022-6-27 15:10:41 | 显示全部楼层   福建省泉州市
下载学习,不过不知道极速版log加密是不是也是这个算法?
回复 支持 反对

使用道具 举报

发表于 2022-6-24 21:50:53 | 显示全部楼层   北京市北京市
好厉害啊,大佬就是大佬
回复 支持 反对

使用道具 举报

结帖率:0% (0/1)
发表于 2022-6-9 21:38:34 | 显示全部楼层   山东省菏泽市
开源精神值得吾辈学习
回复 支持 反对

使用道具 举报

结帖率:100% (5/5)
发表于 2022-6-8 23:06:20 | 显示全部楼层   河北省廊坊市
求成品,有的联系
回复 支持 反对

使用道具 举报

签到天数: 1 天

发表于 2022-5-30 09:36:12 | 显示全部楼层   北京市北京市
牛啊大佬 来学习一下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表