Split off account/password in extra file
authorBernhard Fröhlich <bernhard@cacert.org>
Tue, 22 Mar 2011 23:10:23 +0000 (00:10 +0100)
committerBernhard Fröhlich <bernhard@cacert.org>
Tue, 22 Mar 2011 23:10:23 +0000 (00:10 +0100)
cacertupload.pl [changed mode: 0644->0755]
password.dat.sample [new file with mode: 0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4c883c8..991570b
@@ -20,6 +20,12 @@ use LWP::UserAgent;
 $ua = LWP::UserAgent->new(agent => 'Translingo Client 1.0');
 use HTTP::Request::Common qw(POST);
 
+my $translingo_password;
+my $translingo_account;
+
+# Read Account&Password from file
+eval `cat password.dat`;
+
 $ua->cookie_jar({});
 $ua->timeout(10000);
 
@@ -33,8 +39,8 @@ $req->referer('http://translingo.cacert.org/');
 # 1.Test - Umgebung
 my $req = POST 'http://translingo.cacert.org/login.php',
 [
- username => 'support@cacert.org',
- password => 'ilccSSAMNIemU',
+ username => $translingo_account,
+ password => $translingo_password,
  submit => 'Login',
 ];
 # ggf. Referer faken
diff --git a/password.dat.sample b/password.dat.sample
new file mode 100755 (executable)
index 0000000..f9bbb55
--- /dev/null
@@ -0,0 +1,2 @@
+$translingo_password = 'ThePassword';
+$translingo_account = 'TheAccount';