ANONYM.TO匿名外链服务代码

2016年5月30日 | 分类: 【源码】

早先在http://yagbu.net/上获得的匿名外链服务源码,现在回顾,发现这套代码不支持https链接,同时在本身使用SSL证书情况下,功能失效。

项目任务:
1. 解决支持https链接。【完成】
2. 参考Anonymiz.com优化外链桥页延时特效。【完成】

原始代码:YAGBU UP – ANONYM.TO CLONE v1.0

来源:http://findscripts.org/item/show-197300
来源:http://zerodollarthemes.com/anonym-to-clone-script-anonymous-vbulletin-module-nulled-free-download/
下载:http://www.filesuploader.com/j8z68sdh630h/Yagbu.UP-Anonym.to-Clone.rar

YAGBU UP – ANONYM.TO CLONE v1.0
======================

1. Upload all files within the folder “upload”
2. Open inc/config.inc.php and set the variables

Demo -> Downloadlink.nl

Notes – Modded to Work Correctly by NulledScriptz.com:

1. Repaired the english template “en” enclosed so that URL’s would Properly Form and Generate.

2. In the Link Anonymiser Folder there is a product file there “product-mh_anolink.xml” goto line 124 and change the default value to your new anonym.to clone website url like: yoursite.com/en

3. This Script is a little touchy regarding malformed and/or unparseble url’s. An Example of an Unparseble URL: http://----escape_sem_autolink_uri:cbc6d85c268cff236db85d279e768b04----:[email protected]

4. You Need Mod Rewrite Enabled

Languages:
English
Spanish
German
Russian
Dutch

Demo: http://anonym.to/en

同源异流1:增加对https链接的支持

网站:https://www.anonymiz.com/

演示:http://bestblackhatforum.com/Thread-Sell-worldbusinesszone-com

关键代码:

https://www.anonymiz.com/js/anonymizeTool.js

function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+');}
function go()
{x=document.theform.nick.value;if(x.length<11)
{return 0;}
var displayURL=x.replace("http://","");var encodeURL=urlencode(x);y=document.location.search.substring(1,11);y="";document.theform.thelink1.value="https://www.anonymiz.com/?"+ encodeURL+""+ y;document.theform.thelink2.value="<a href=\"https://www.anonymiz.com/?"+ encodeURL+""+ y+"\">"+ displayURL+"</a>";document.theform.thelink3.value="[url=https://www.anonymiz.com/?"+ encodeURL+""+ y+"]"+ displayURL+"[/url]";return false;}
function generateCode(formName,displayIn)
{var script_path="https://www.anonymiz.com/js/anonymize.js";var keywords=document.forms[formName].elements["keywords"].value;keywords=keywords.replace(" ","");var keywords_array=new Array();var the_code="";keyword_array=keywords.split(",");the_code+="<script src=\""+ script_path+"\" type=\"text/javascript\"></script>\n\n";the_code+="<script type=\"text/javascript\"><!--\n";the_code+="protected_links = \""+ keyword_array.join(", ")+"\";\n\n";the_code+="auto_anonymize();\n";the_code+="//--></script>\n";displayCode(displayIn,the_code);}
function displayCode(displayIn,the_code)
{var the_element=document.getElementById(displayIn);the_element.value="";the_element.value=the_code;}

https://www.anonymiz.com/js/anonymize.js

function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+');}
var protected_links="";var a_to_va=0;var a_to_vb=0;var a_to_vc="";function auto_anonymize(){auto_anonyminize();}
function auto_anonyminize(){var a_to_vd=window.location.hostname;if(protected_links!=""&&!protected_links.match(a_to_vd)){protected_links+=", "+ a_to_vd;}else if(protected_links=="")
{protected_links=a_to_vd;}
var a_to_ve="";var a_to_vf=new Array();var a_to_vg=0;a_to_ve=document.getElementsByTagName("a");a_to_va=a_to_ve.length;a_to_vf=a_to_fa();a_to_vg=a_to_vf.length;var a_to_vh=false;var j=0;var a_to_vi="";var a_to_vi_new="";for(var i=0;i<a_to_va;i++)
{a_to_vh=false;j=0;while(a_to_vh==false&&j<a_to_vg)
{a_to_vi=a_to_ve[i].href;if(a_to_vi.match("http://")||a_to_vi.match("https://"))
{a_to_vi_new=true;}
if(a_to_vi.match(a_to_vf[j])||!a_to_vi||!a_to_vi_new)
{a_to_vh=true;}
j++;}
if(a_to_vh==false)
{a_to_vi=urlencode(a_to_vi);a_to_ve[i].href="https://www.anonymiz.com/?"+ a_to_vi;a_to_vb++;a_to_vc+=i+":::"+ a_to_ve[i].href+"\n";}}
var a_to_vj=document.getElementById("anonyminized");var a_to_vk=document.getElementById("found_links");if(a_to_vj)
{a_to_vj.innerHTML+=a_to_vb;}
if(a_to_vk)
{a_to_vk.innerHTML+=a_to_va;}}
function a_to_fa()
{var a_to_vf=new Array();protected_links=protected_links.replace(" ","");a_to_vf=protected_links.split(",");return a_to_vf;}

同源异流2:被其他网友获得修改外链匿名网址程序源码 php版 v1.0

这一版并不值得研究。

http://www.jb51.net/codes/65654#download

介绍:有很多网站不想把来源地址透露给目标网址,比如网赚任务、私密分享社区、破解论坛之类,不用把网址解析关闭,直接使用匿名网址跳转即可,目标网址也将无法统计到来源网站的信息。本程序可以单独设置一个网址,也可以在批量替换页面里的网址,可以设置包含域名/关键字的URL不用匿名,绿色小巧,简单配置。

同源异流3:NoReferPLZ

https://sourceforge.net/projects/noreferplz/

改造

尝试简单地在Anonym.co的相关JS代码以Anonymiz.com的替代:

js/anonymizeTool.js => js/anonyminizerTool.php

js/anonymize.js => js/anonymize.php

实测结果如下:

1. 外链网址能够生成
2. 跳转页链接因为被urlencode导致错误。

解决办法:尝试在跳转页的代码中加入urldecode:

将模板文件 tpl/redirect.tpl 中的:

<?=$url;?>

替换为:

<?php echo urldecode($url); ?>

实测成功!

现在 Anonym.co 也能支持https链接了。

原本:Anonym.to研究

虽然既定目标都已实现,考虑看看正主目前是怎么处理的。

网站:https://www.anonym.co

关键代码:

http://anonym.to/anonym/anonyminizerTool.js

function go()
{
	x = document.theform.nick.value;

	if(x.length < 11)
	{
	  return 0;
	}

	var displayURL = x.replace("http://", "");

	y = document.location.search.substring(1,11);
	y = "";

	document.theform.thelink1.value = "http://anonym.to/?" + x + "" + y;
	document.theform.thelink2.value = "<a href=\"http://anonym.to/?" + x + "" + y + "\">Anonym zu " + displayURL + "</a>";
	document.theform.thelink3.value = "[url=http://anonym.to/?" + x  + "" + y + "]Anonym zu " + displayURL + "[/url]";

	return false;
}
function generateCode(formName, displayIn)
{
	var script_path = "http://js.anonym.to/anonym/anonymize.js";
	var keywords = document.forms[formName].elements["keywords"].value;
	keywords = keywords.replace(" ", "");
	var keywords_array = new Array();

	var the_code = "";

	keyword_array = keywords.split(",");

	// check -> do some checks here, if wanted
	// ...

	// build the code
	the_code += "<script src=\"" +  script_path + "\" type=\"text/javascript\"></script>\n\n";

	// debug only
	//the_code += "&lt;!-- display stats (if you don't want stats the_code, just kick this and the next line) --&gt;\n";
	//the_code += "&lt;div&gt;anonyminized by anonym.to: &lt;span id=\"found_links\"&gt;&lt;/span&gt; links found; &lt;span id=\"anonyminized\"&gt;&lt;/span&gt; anonyminized&lt;/div&gt;\n\n";

	the_code += "<script type=\"text/javascript\"><!--\n";
	the_code += "protected_links = \"" + keyword_array.join(", ") + "\";\n\n";
	the_code += "auto_anonymize();\n";
	the_code += "//--></script>\n";

	// spit it out
	displayCode(displayIn, the_code);
}
function displayCode(displayIn, the_code)
{
	var the_element = document.getElementById(displayIn);

	the_element.value = "";
	the_element.value = the_code;
}

http://js.anonym.to/anonym/anonymize.js

发现它的JS代码进行了unescape加密

找到在线解密工具解密之:http://escape.supfree.net/

var protected_links = "";
var a_to_va = 0;
var a_to_vb = 0;
var a_to_vc = "";
function auto_anonymize()
{
	auto_anonyminize();
}
function auto_anonyminize()
{
	var a_to_vd = window.location.hostname;
	if(protected_links != "" && !protected_links.match(a_to_vd))
	{
		protected_links += ", " + a_to_vd;
	}
	else if(protected_links == "")
	{
		protected_links = a_to_vd;
	}
	var a_to_ve = "";
	var a_to_vf = new Array();
	var a_to_vg = 0;
	a_to_ve = document.getElementsByTagName("a");
	a_to_va = a_to_ve.length;
	a_to_vf = a_to_fa();
	a_to_vg = a_to_vf.length;
	var a_to_vh = false;
	var j = 0;
	var a_to_vi = "";
	for(var i = 0; i < a_to_va; i++)
	{
		a_to_vh = false;
		j = 0;
		while(a_to_vh == false && j < a_to_vg)
		{
			a_to_vi = a_to_ve[i].href;
			if(a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("http://"))
			{
				a_to_vh = true;
			}
			j++;
		}
		
		if(a_to_vh == false)
		{
			a_to_ve[i].href = "http://anonym.to?" + a_to_vi;		
			a_to_vb++;
			a_to_vc += i + ":::" + a_to_ve[i].href + "\n" ;	
		}
	}
	var a_to_vj = document.getElementById("anonyminized");
	var a_to_vk = document.getElementById("found_links");
	if(a_to_vj)
	{
		a_to_vj.innerHTML += a_to_vb;
	}
	if(a_to_vk)
	{
		a_to_vk.innerHTML += a_to_va;
	}	
}
function a_to_fa()
{
	var a_to_vf = new Array();
	protected_links = protected_links.replace(" ", "");
	a_to_vf = protected_links.split(",");
	return a_to_vf;
}'));

有空再研究吧。

参考资料:http://www.bid.ren/2016/05/08/JavaScript%20decodeURIComponent()%20function/

JavaScript decodeURIComponent() 函数

定义和用法:decodeURIComponent() 函数可对 encodeURIComponent() 函数编码的 URI 进行解码。

语法:decodeURIComponent(URIstring)

参数:URIstring

描述:必需。一个字符串,含有编码 URI 组件或其他要解码的文本。

返回值:URIstring 的副本,其中的十六进制转义序列将被它们表示的字符替换。

实例:

在本例中,我们将使用 decodeURIComponent() 对编码后的 URI 进行解码:

<script type="text/javascript">

var test1="http://www.w3school.com.cn/My first/"

document.write(encodeURIComponent(test1)+ "<br />")
document.write(decodeURIComponent(test1))

</script>

输出:

http%3A%2F%2Fwww.w3school.com.cn%2FMy%20first%2F
http://www.w3school.com.cn/My first/