Run the following: lftp -c "open -u {USERNAME}, {PASSWORD} {HOSTNAME}; put -O {DIRECTORY-TO-DATA-TO-REMOTELY} {FILE-TO-MOVE}" For example: lftp -c "open -u john.doe, password ftp.google.com; put -O /remote-backups/ /local-backups/file_2_upload.zip"
Run the following: lftp -c "open -u {USERNAME}, {PASSWORD} {HOSTNAME}; put -O {DIRECTORY-TO-DATA-TO-REMOTELY} {FILE-TO-MOVE}" For example: lftp -c "open -u john.doe, password ftp.google.com; put -O /remote-backups/ /local-backups/file_2_upload.zip"
Grep is a useful tool to filtering large quantities of data and acquiring just the data you need. In some circumstances the format of the data can be fine and it's easier to remove some other regular recurring lines that impact the structure of the data. Take the following as an example, this data was […]
If you are looking to determine the state of a host before actioning something on it then the code snippet below is perfect.
Having dealt with many hacked websites over the years it is common knowledge that hackers love to use base64 encoded files and eval function to take control of websites and exploit them to the best of their ability. Scanning For Base64 If you are dealing with a hacked website you can scan for files containing […]
We were running a bash script containing a while loop to process a large amount of data. The basics of the script looked like the following: When running the script whenever a line was reached that successfully connected via SSH and the else part of the script was run, e.g: ssh -q -o ConnectTimeout=30 $IP_ADDRESS […]