I am trying to run a perl script in python according to this post on XDA Thanks to mod23 and robberknight on XDA for posting and implementing this.
Here is the script I am having trouble with.
I have installed SLA4, added python 2.6.2 interpreter and installed perl for android. I also changed SuperSU to grant any requests. I saved the script shown here as gen-gesture.key.py and added it to my SLA4 scripts folder. When I open SLA4, I see the script available and when I run it, it just says gen-gesture.key.py has exited. There is a note in the the original post that says to run the script without arguments. I am not sure how to do that and if that might be causing my issues. So, is there something major I am missing here?
Here is the script I am having trouble with.
Code:
#!/usr/bin/env perl
use strict;
use Digest::SHA1;
if($#ARGV < 0) {
print "Usage: gen-gesture.key.pl <sequence>
With sequence as number sequence drawn on this keypad:
0 1 2
3 4 5
6 7 8
The generated binary output has to be put into: /data/system/gesture.key
";
exit 1;
}
my $bytestr = "";
foreach my $number (split(//, $ARGV[0])) {
$bytestr .= chr($number);
}
print STDERR "Hash: " . Digest::SHA1::sha1_hex($bytestr) . "\n";
print Digest::SHA1::sha1($bytestr);
I have installed SLA4, added python 2.6.2 interpreter and installed perl for android. I also changed SuperSU to grant any requests. I saved the script shown here as gen-gesture.key.py and added it to my SLA4 scripts folder. When I open SLA4, I see the script available and when I run it, it just says gen-gesture.key.py has exited. There is a note in the the original post that says to run the script without arguments. I am not sure how to do that and if that might be causing my issues. So, is there something major I am missing here?