URL Obfuscated v1.0

edit: I replaced the v.gd link with another link shortener since they turned lame and starting enforcing link protection :(

This is some sample perl code for part of a project I’m working on. It allows you to run a perl script against a url, and it will obfuscate the link by using multiple url shorteners. Some people have programs that will show the original link that the shortened url is pointing to (seen mostly on twitter). Having the link processed by multiple url shortener’s will circumvent this from happening.

Example Run:

You could now post the link http://easyuri.com/ds893 which would link to http://v.gd/prevdisable.php?url=7BDd8H and THAT would link to the original url, http://www.reddit.com. Although, a user who is trying to see where the original easyuri.com link is going to would see this:

Feel free to try it out yourselves! This will be part of a little project I am working on that should be released around the end of the year. Source code is shown below along with it attached on the page.

Source Code:


# URL Obfuscated v1.0 <urlobs.pl>
# Passes the original link via v.gd to (obfuscate) shorten the link
# Then passes the shortened link through easyuri.com to generate
#  another obfuscated link.
# Once completed we have a easyuri.com/<whatever> link that we can post
# Process:
#  <user clicks on easyuri.com link> -> <passes through mrte.ch link> -> 
#  -> <goes to original url>

use LWP::Simple;

if ($#ARGV != 0) {
    print "usage: ./urlobs.pl <link>\n";
	print "example: ./urlobs.pl http://www.google.com\n";

# encode url passed in argv[0]
$url = urlencode($ARGV[0]);

# submit request for shortened url
$request = "http://api.mrte.ch/go.php?action=shorturl&url=$url&format=simple";

#v.gd was lame and started protecting links
#$request = "http://v.gd/create.php?format=simple&url=$url";

# disable the 'click to continue' page from v.gd's url shortener
# adding prevdisable.php?url= will allow it to go automatically

$response = get($request);

print "Original URL: $ARGV[0]\n";
print "URL Encoded URL(pass 1): $url\n";
print "Shortened URL (pass 1): $response\n";

$url2 = $response; # make url2 equal to the first shortened url
$response2 = urlencode($url2); # assign the encoded url2 param to response2
print "URL Encoded (pass 2) $response2\n";
$request2 = "http://easyuri.com/api.php?link=$response2"; 
# make short url from response2
$response2 = get($request2);
print "Shortened URL (pass 2); $response2\n";

# encode the url
sub urlencode {
	my $URL = $_[0];
	$URL =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg;
	return $URL;
Scroll To Top
Descargar musica