SVN: toys/rsget.pl/Get/FileFactory
sparky
sparky at pld-linux.org
Fri Jun 4 20:17:16 CEST 2010
Author: sparky
Date: Fri Jun 4 20:17:16 2010
New Revision: 11524
Modified:
toys/rsget.pl/Get/FileFactory
Log:
- fixed, updated for webpage changes - now it uses javascript obscuring
very similar to older mediafire page
Modified: toys/rsget.pl/Get/FileFactory
==============================================================================
--- toys/rsget.pl/Get/FileFactory (original)
+++ toys/rsget.pl/Get/FileFactory Fri Jun 4 20:17:16 2010
@@ -10,11 +10,13 @@
web: "http://filefactory.com/"
tos: "http://filefactory.com/legal/terms.php"
uri: qr{filefactory\.com/file/[0-9a-z]{6}}
-status: BROKEN 2010-06-04
+status: OK 2010-06-04
start:
GET( $-{_uri} );
+ RESTART( -2 * 60, "no slots for free users" )
+ if /there are currently no free download slots available/;
ERROR( "file not found" ) if /File Not Found|This file has been deleted/;
! m{<title>(.*?) - download now for free};
my $name = $1;
@@ -27,17 +29,31 @@
RESTART( $1 / 1000, "free limit reached" ) if $1 > 0;
}
- ! m#<a href="(/dlf.*?)"><img.*?alt="Download Now" /></a>#;
- CLICK( $1 );
+ ! m#var.*?eval.*?fromCharCode.*?"(\?key=.*?)"#;
+ GET( "/file/getLink.js" . $1, keep_referer => 1 );
- ! m#<a href="(http.*?)"><strong>Download with FileFactory Basic</strong></a>#;
- $-{file_uri} = $1;
+ ! s/^(.*)var \S+=function\(\){ var \S+=(.*?);.*//m;
+ my ($vars, $toeval) = ($1, $2);
+
+ my %vars = map { /var\s+(\S+?)\s*=\s*'(.*?)'/ } split /;/, $vars;
+ my $code = join "", map { /'(.*)'/ ? $1 : $vars{ $_ } } split /\s*\+\s*/, $toeval;
+
+ CLICK( $code );
! m#<span class="countdown".*?>(\d+)</span>#;
- my $wait = $1;
- RESTART( $wait, "free limit reached" ) if $wait > 120;
+ $-{wait} = $1;
+ RESTART( $-{wait}, "free limit reached" ) if $-{wait} > 120;
+
+ ! m#var.*?eval.*?fromCharCode.*?"(\?key=.*?)"#;
+ GET( "/file/getLink.js" . $1, keep_referer => 1 );
+
+ ! s/^(.*)var \S+=function\(\){ var \S+=(.*?);.*//m;
+ my ($vars, $toeval) = ($1, $2);
+
+ my %vars = map { /var\s+(\S+?)\s*=\s*'(.*?)'/ } split /;/, $vars;
+ $-{file_uri} = join "", map { /'(.*)'/ ? $1 : $vars{ $_ } } split /\s*\+\s*/, $toeval;
- WAIT( $wait, "expecting download link" );
+ WAIT( $-{wait}, "starting download" );
CLICK_DOWNLOAD( $-{file_uri} );
More information about the pld-cvs-commit
mailing list