summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-04-09 00:40:46 +0200
committerMichael Tänzer <neo@nhng.de>2011-04-09 00:40:46 +0200
commitb6f8838f587d48502c78d7ed70d768b989ef85fa (patch)
tree0d73fef2c78c47b1057ba86409d674c2decb08d9
parent33b83bda66eb6d55abae2ef2169b8599d221f463 (diff)
downloadcacert-b6f8838f587d48502c78d7ed70d768b989ef85fa.tar.gz
cacert-b6f8838f587d48502c78d7ed70d768b989ef85fa.tar.xz
cacert-b6f8838f587d48502c78d7ed70d768b989ef85fa.zip
Source code taken from cacert-20110406.tar.bz2
-rw-r--r--.gitignore3
-rw-r--r--cacertupload.pl10
-rw-r--r--password.dat.sample2
3 files changed, 13 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index e9d597e..4559ec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
# => ignore it
# run "make all" to generate a new one and upload it to translingo
/messages.po
+
+# Ignore file with the account data
+/password.dat
diff --git a/cacertupload.pl b/cacertupload.pl
index 4c883c8..991570b 100644
--- a/cacertupload.pl
+++ b/cacertupload.pl
@@ -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 100644
index 0000000..f9bbb55
--- /dev/null
+++ b/password.dat.sample
@@ -0,0 +1,2 @@
+$translingo_password = 'ThePassword';
+$translingo_account = 'TheAccount';