dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
sms.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2ec644
)
Code formatting.
author
Rafał Długołęcki
<kontakt@dlugolecki.net.pl>
Sun, 6 Jan 2013 00:36:11 +0000
(
01:36
+0100)
committer
Rafał Długołęcki
<kontakt@dlugolecki.net.pl>
Sun, 6 Jan 2013 00:36:11 +0000
(
01:36
+0100)
sms.pl
patch
|
blob
|
history
diff --git
a/sms.pl
b/sms.pl
index 647cb3493e2dbd664ed1157cab06e72a808a3ff9..4104fbc92f781364ada8468a6fb50dd20d39d280 100755
(executable)
--- a/
sms.pl
+++ b/
sms.pl
@@
-8,17
+8,16
@@
use Mojo::DOM;
use Config::General;
use Data::Dumper;
use Config::General;
use Data::Dumper;
-#Usage:
-# sms.pl MOBILE_NO "TEXT_MESSAGE"
+#
Usage:
+#
sms.pl MOBILE_NO "TEXT_MESSAGE"
#
#
-# You need to set sms.conf file in the scripts directory and fill it
-# like this:
-# login LOGIN
-# password PASSWORD
+# You need to set .smsrc file in the HOME directory and fill it like this:
+# login = LOGIN
+# password = PASSWORD
#
# where LOGIN and PASSWORD are your credentials to orange.pl site
#
# where LOGIN and PASSWORD are your credentials to orange.pl site
-my $conf = new Config::General("
sms.conf
");
+my $conf = new Config::General("
$ENV{HOME}/.smsrc
");
my %config = $conf->getall;
die "No login in config file. Stopped" unless $config{login};
die "No password in config file. Stopped" unless $config{password};
my %config = $conf->getall;
die "No login in config file. Stopped" unless $config{login};
die "No password in config file. Stopped" unless $config{password};
@@
-33,8
+32,8
@@
$mech->get("http://orange.pl");
$mech->submit_form(
form_id => 'loginForm',
fields => {
$mech->submit_form(
form_id => 'loginForm',
fields => {
-
'/tp/core/profile/login/ProfileLoginFormHandler.value.login' => $config{login},
-
'/tp/core/profile/login/ProfileLoginFormHandler.value.password' => $config{password}
+ '/tp/core/profile/login/ProfileLoginFormHandler.value.login' => $config{login},
+ '/tp/core/profile/login/ProfileLoginFormHandler.value.password' => $config{password}
}
);
$mech->follow_link( text => 'SMS');
}
);
$mech->follow_link( text => 'SMS');