summaryrefslogtreecommitdiff
path: root/script/script.upload
diff options
context:
space:
mode:
Diffstat (limited to 'script/script.upload')
-rwxr-xr-xscript/script.upload33
1 files changed, 33 insertions, 0 deletions
diff --git a/script/script.upload b/script/script.upload
new file mode 100755
index 0000000..841a5e1
--- /dev/null
+++ b/script/script.upload
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+IP=$1
+LOC=$2
+BIN=$3
+TAR=$4
+
+usage() {
+ echo ""
+ echo "usage : $0 [IP] [LOCAL] [BIN] [TARGET]"
+ echo " - IP : target ip"
+ echo " - BIN : binary name"
+ echo " - LOCAL : binary path"
+ echo " - TARGET : target path to install"
+ exit
+}
+
+if [ -z $IP ]; then echo "[!] IP is not set."; usage; fi
+if [ -z $BIN ]; then echo "[!] BIN is not set."; usage; fi
+if [ -z $LOC ]; then echo "[!] LOCAL is not set."; usage; fi
+if [ -z $TAR ]; then echo "[!] TARGET is not set."; usage; fi
+
+echo "[*] upload... $LOC/$BIN to $IP:$TAR"
+cd $LOC
+ftp -n $IP << +
+user root a
+prompt off
+bi
+cd $TAR
+put $BIN
+bye
++
+