Created
August 18, 2017 19:53
-
-
Save mainframed/2bafc913db2d168508fc6c5d9fff650d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "[+] Mainframe Upload Script" | |
if [ "$#" -ne 5 ]; then | |
echo "[!] Usage:" $0 "host username password PDS filename" | |
exit -1 | |
fi | |
echo "[>] Connecting to" $1 " as" $2 "and uploading" | |
echo "[>] Uploading" $5 "to PDS" $4 | |
ftp -n <<EOF | |
open $1 | |
prompt | |
user $2 $3 | |
cd $4 | |
put $5 | |
bye | |
EOF | |
echo "[+] Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment