Jump to content
PuRiCeL

[BASH] - Connect to FTP HOST and Send File

Recommended Posts

Connect to FTP HOST and Send File

Script 1

#!/bin/sh -vx
#
# Script to FTP data to server
# Paramters: host FTP Server
# user FTP Username
# passwd FTP Password
# file File to send/put
##############################

# Variables
HOST=$1
USER=$2
PASSWD=$3
FILE=$4
TONAME=$5

# Connect to FTP HOST and Send File
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
dir
ascii
put $FILE $TONAME
dir
quit
END_SCRIPT
exit 0

Usage: ./ftp1.sh <host> <username> <passwd> <filename> <toname>

Script 2

#!/bin/bash
clear
echo "[+] - - - - - - - - - - - - - - - - - - - - - - - [+]"
echo "[+] irc.[***].com [+]"
echo "[+] #PUB - Channel [+]"
echo "[+] Usage: ./ftp.sh ftp.TV.nL users pass arhive [+]"
echo "[+] - - - - - - - - - - - - - - - - - - - - - - - [+]"
ftp -inv $1<<ENDFTP
user $2 $3
put $4
bye
ENDFTP
echo "[+] Gata [+]"
echo "[+] uter [+]"

usage: ./ftp.sh <host> <user> <pass> <arhiva>

Download:

[+] Script 1 - http://tevad.do.am/ftp1.sh

[+] Script 2 - http://tevad.do.am/ftp.sh

Edited by PuRiCeL
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...