summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall_native.sh10
-rw-r--r--src/js/main.js1
2 files changed, 9 insertions, 2 deletions
diff --git a/install_native.sh b/install_native.sh
index 28719de..76653a0 100755
--- a/install_native.sh
+++ b/install_native.sh
@@ -8,11 +8,17 @@
bin/main_arm -f /usr/sbin/racoon -j exp.js -o racoon.conf
cp racoon.conf /etc/racoon/racoon.conf
-mkdir /var/root/p0laris
rm /var/root/p0laris/stage4.js
+rm -rf /var/root/p0laris
+rm -rf /var/mobile/Media/p0laris
+mkdir /var/root/p0laris
+mkdir /var/mobile/Media/p0laris
cat stage4.js > /var/root/p0laris/stage4.js
chmod 777 /var/root/p0laris/stage4.js
-ln /var/root/p0laris /var/mobile/Media/p0laris
+for i in /var/root/p0laris/*; do
+ name=$(basename $i)
+ ln /var/root/p0laris/$name /var/mobile/Media/p0laris/$name
+done
#bin/main -f ~/racoon -j ../lol.js | ssh root@localhost -p 2222 "cat > /etc/racoon/racoon.conf"
diff --git a/src/js/main.js b/src/js/main.js
index 066afb7..c6f77f4 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -149,6 +149,7 @@ function main() {
var bytes_read = read(fd, stage4_bin, 0x400000);
var stage4_bin_buf = read_buf(stage4_bin, bytes_read);
var stage4_js_str = "";
+
for (var i = 0; i < stage4_bin_buf.length; i++) {
stage4_js_str += String.fromCharCode(stage4_bin_buf[i]);
}