From: Ralf Ertzinger Date: Fri, 10 Feb 2012 22:45:23 +0000 (+0100) Subject: Wimp: Obfuscating download URLs? Nasty. X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=541e2135bed7a462c478e40602512fa3e81557f3 Wimp: Obfuscating download URLs? Nasty. --- diff --git a/videosite/WimpGrabber.pm b/videosite/WimpGrabber.pm index 8d37766..c424760 100644 --- a/videosite/WimpGrabber.pm +++ b/videosite/WimpGrabber.pm @@ -9,6 +9,7 @@ use videosite::GrabberBase; @ISA = qw(videosite::GrabberBase); use LWP::Simple qw(!get); +use MIME::Base64; use HTML::Parser; use Data::Dumper; @@ -71,9 +72,18 @@ sub _parse { } # Look for the download URL + # This is obfuscated a little bit. foreach $e (@text) { - if ($e->[0] =~ m|\.addVariable\("file",\s*"([^\x22]+)"\)|) { - $metadata->{'DLURL'} = $1; + if ($e->[0] =~ m|var googleCode = '([^\x27]+)'|) { + my $c = $1; + + $self->debug("Found obfuscated code: %s", $c); + my $d = decode_base64($c); + $self->debug("Decoded to: %s", $d); + + if ($d =~ m|\.addVariable\("file",\s*"([^\x22]+)"\)|) { + $metadata->{'DLURL'} = $1; + } } }