57582 CVE-2011-3389 6.4 Medium x.x.x.x tcp 443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 14 5 2 3months 0:00 s3 6
57582 CVE-2011-3389 6.4 Medium x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 4 3 2 3months 0:00 s3 6
58751 CVE-2011-3389 4.3 High x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 5 5 3 2months 0:00 s3 3
65821 CVE-2013-2566 4.3 Medium x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 6 6 2 3months 0:00 s3 6
65821 CVE-2015-2808 4.3 Critical x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 78 7 4 1month 0:00 s3 5
78479 CVE-2014-3566 4.3 Medium x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 5 7 2 3months 0:00 s3 6
80035 CVE-2014-8730 4.3 Medium x.x.x.x tcp 8443 Bad vulnerability, fix ti Full Name email@xxxxxx.net 3 7 2 3months 0:00 s3 6
So every line of input will be assigned to the curl variable data (-d) for example:
for i in $(awk -F "\t" '//{print $0}' inputfile)
do
"the curl command"
done
but I know it wont work.
I think I should assign the awk output to an array and use for loop to iterate the array. But how do i parse each field and then each line in the input file?
Now, I am having problem when there is an empty item in the input. The subsequent item in the array does not take the empty item which causes the output of the script to be not accurate. For example the second line of input below has empty second item so the array ${CUARR[1]} will be the third item "6.4" instead of empty. How to make ${CUARR[1]} stays empty?
Thanks.
35291 CVE-2004-2761 4 Medium xxxxxxxxxxxxxxx tcp 443 SSL Certificate Signed Using Weak Hashing Algorithm 14 4 2 12/8/2016 0:00 s3 6
51192 6.4 Medium xxxxxxxxxxxxxxx tcp 443 SSL Certificate Cannot Be Trusted 14 4 2 24/9/2016 0:00 s3 6