如何浏览器下载插件时,跳过某些网站的登录

作为一个UC浏览器(电脑版)的忠实用户,想去下载插件,却得知 插件地址已经打不开了; http://extensions.uc.cn/newindex.htm

作为一个UC浏览器(电脑版)的忠实用户,想去下载插件,却得知 插件地址已经打不开了;

http://extensions.uc.cn/newindex.htm#!hot/recommendation

所以没有办法,只能转战Google Chrome。然后
百度了UC插件。

在这里插入图片描述
第一个是手机UC插件。pc不能用。第二个是某个插件网站,这就是今天的主要内容;
打开第二个网站;

在这里插入图片描述
点进去然后下载;

在这里插入图片描述

注意:该网站的地址是:

在这里插入图片描述

https://huajiakeji.com/communication/2015-01/340.html

然后点击下载:

在这里插入图片描述

然后再点击本地下载页面:

在这里插入图片描述
发现要wx关注gzh才行,因为太懒,按F12,然后去看看他的js代码;

在这里插入图片描述
发现点击开始下载时的input代码为:

<input type="button" value="开始下载" onclick="checkcode()" style="width:80px; font-size:16px;border:0;background:#333;color:white;height:42px;">

很显然调用了 checkcode();
然后查询 ctrl+F 继续看 checkcode();这个方法做了啥;

在这里插入图片描述


function checkcode() {var code = $('#txtcode').val();var id = document.location.hash.replace('#', '');if (id.indexOf('_') > 0) {id = id.split('_')[0];}if (code.length != 6) {$('#tip').html('请输入6位数字验证码!').css('color', 'red');return;} else {$.get('https://huajiakeji.com/Home/DownCheck?aid=' + id + '&code=' + code, function(r) {if (r == '') {$('#tip').html('验证失败,请重试!').css('color', 'red');return;} else {var result = JSON.parse(r);if (result != '') {var status = result.status;var file = result.file;if (status == 0) {$('#tip').html('验证码已失效,请在公众号重新获取,五分钟有效!').css('color', 'red');return;} else {$('#tip').html('验证通过,下载马上开始,正在提取下载地址!').css('color', 'green');setTimeout("down()", 1000);}}}});}
}function getlink(link, key) {var code = '';if(key != ''){code = '提取码:'+ key;}return '本站使用百度云分流,请点击链接前往百度云下载: + link + '">' + link + ' '+ code +'';
}function down() {var id = document.location.hash.replace('#', '');if (id.indexOf('_') > 0) {id = id.split('_')[0];}var html = document.getElementById('downdesc');window.location = 'https://huajiakeji.com/Handler/Download/' + id;
}

上面代码显示 checkcode() 成功调用后,然后验证成功 再调用 setTimeout(“down()”, 1000);
继续看 这个方法 down() 做了啥;

function down() {var id = document.location.hash.replace('#', '');if (id.indexOf('_') > 0) {id = id.split('_')[0];}var html = document.getElementById('downdesc');window.location = 'https://huajiakeji.com/Handler/Download/' + id;
}

最后一行其实 就是下载地址加一个id,猜一猜,基本上id就是 页面id;
我们看一下之前我说的网站是多少;

https://huajiakeji.com/communication/2015-01/340/download.html

**2015-01:基本代表时间戳,分类用的,不用管。然后那个 340 绝对就是主键id;
然后拼一下地址果然就是

https://huajiakeji.com/Handler/Download/340

直接复制到网址上就可以下载了

在这里插入图片描述

内容也是一致的:
在这里插入图片描述

**

另一款插件网也是同一种套路:

**

首先百度 插件 ,选第一个,

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述在这里插入图片描述
在这里插入图片描述在这里插入图片描述

function checkcode(){var code = $('#txtcode').val();if(code.length != 6){$('#tip').html('请输入6位数字验证码!').css('color','red');return;}else{$.get('/down/handle.ashx?aid=67941&fn=文件下载失败&code='+ code,function(r){if(r == ''){$('#tip').html('验证失败,请重试!').css('color','red');return;}else{var result = JSON.parse(r);if(result != ''){var status = result.status;var file = result.file;if(status == 0){$('#tip').html('验证码已失效,请在公众号重新获取,五分钟有效!').css('color','red');return;}else{$('#tip').html('验证通过,下载马上开始!').css('color','green');setTimeout("window.location='http://down.cnplugins.com/down/down.aspx?fn="+ file +"'", 2000);}}}});}}

下载地址为:

http://down.cnplugins.com/down/down.aspx?fn=

然后fn= file,这个file 我一开始 以为和上个网站一样,也是id,然后试了试不行;
但是其实你看看上面的 某一行代码,其实答案已经告诉你了;

 $.get('/down/handle.ashx?aid=67941&fn=文件下载失败&code='+ code,function(r){

其实这是一个翻车案例。感觉这个插件应该是被删除了所以 后面fn=文件下载失败,
然后我们换个其他资源试试;

在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述

function checkcode(){var code = $('#txtcode').val();if(code.length != 6){$('#tip').html('请输入6位数字验证码!').css('color','red');return;}else{$.get('/down/handle.ashx?aid=219724&fn=1902/apn-sidebar-3.crx &code='+ code,function(r){if(r == ''){$('#tip').html('验证失败,请重试!').css('color','red');return;}else{var result = JSON.parse(r);if(result != ''){var status = result.status;var file = result.file;if(status == 0){$('#tip').html('验证码已失效,请在公众号重新获取,五分钟有效!').css('color','red');return;}else{$('#tip').html('验证通过,下载马上开始!').css('color','green');setTimeout("window.location='http://down.cnplugins.com/down/down.aspx?fn="+ file +"'", 2000);}}}});}}

可以看到后面 $.get(’/down/handle.ashx?aid=219724&fn=1902/apn-sidebar-3.crx &code=’+ code,function®;

fn后面有值,所以判定其下载地址为

http://down.cnplugins.com/down/down.aspx?fn=1902/apn-sidebar-3.crx

也可以顺利下载

在这里插入图片描述