SVN: toys/rsget.pl: Get/MegaShares RSGet/Tools.pm

sparky sparky at pld-linux.org
Sat Oct 3 19:01:27 CEST 2009


Author: sparky
Date: Sat Oct  3 19:01:26 2009
New Revision: 10661

Modified:
   toys/rsget.pl/Get/MegaShares
   toys/rsget.pl/RSGet/Tools.pm
Log:
- added jstime()


Modified: toys/rsget.pl/Get/MegaShares
==============================================================================
--- toys/rsget.pl/Get/MegaShares	(original)
+++ toys/rsget.pl/Get/MegaShares	Sat Oct  3 19:01:26 2009
@@ -69,7 +69,7 @@
 	my $captcha = captcha( \$_ );
 	RESTART( 5, "Can't read captcha" ) unless $captcha;
 
-	my $rand = 1000 * time() + int rand 1000;
+	my $rand = jstime();
 	my $ajax = $-{ajax}
 		. (join "", map { '&rsargs[]=' . $_ }
 			( $captcha, $-{random_num}, $-{passport_num}, "replace_sec_pprenewal" ) )

Modified: toys/rsget.pl/RSGet/Tools.pm
==============================================================================
--- toys/rsget.pl/RSGet/Tools.pm	(original)
+++ toys/rsget.pl/RSGet/Tools.pm	Sat Oct  3 19:01:26 2009
@@ -7,7 +7,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(set_rev s2string bignum de_ml hadd hprint p isotime require_prog
-	def_settings setting verbose
+	jstime def_settings setting verbose
 	data_file dump_to_file randomize %getters);
 @EXPORT_OK = qw();
 
@@ -91,6 +91,11 @@
 	return sprintf "%d-%.2d-%.2d %2d:%.2d:%.2d", $l[5] + 1900, $l[4] + 1, @l[(3,2,1,0)];
 }
 
+sub jstime()
+{
+	return time * 1000 + int rand 1000;
+}
+
 sub de_ml
 {
 	local $_ = shift;


More information about the pld-cvs-commit mailing list