Showing posts with label Bash Delete entries from CSV file. Show all posts
Showing posts with label Bash Delete entries from CSV file. Show all posts
Thursday, 30 August 2018
Subscribe to:
Posts (Atom)
INPUT=hosts_test.cvs
OLDIFS=$IFS
IFS=,
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read privateip password
do
sshpass -p$password ssh -t -o "StrictHostKeyChecking no" user123@$privateip "
hostname
hostname -I --all-ip-addresses
sudo yum -y update bash
env x='() { :;}; echo vulnerable' bash -c \"echo If you see the word vulnerable above, then you are vulnerable to shellshock\"
echo ""
exit
" >> output.txt
done < $INPUT
IFS=$OLDIFS
10.xxx.xx.219,abcd~qY1
10.xxx.xx.226,l4~abcdefg
10.xxx.xx.221,l4@abcdefgh
</dev/null.
Hello Friends! I am Ramana a part time blogger from Hyderabad.