Skip to content

Instantly share code, notes, and snippets.

@aaronmelton
Created December 2, 2015 03:32
Show Gist options
  • Select an option

  • Save aaronmelton/e1afc6563f309bdc7e65 to your computer and use it in GitHub Desktop.

Select an option

Save aaronmelton/e1afc6563f309bdc7e65 to your computer and use it in GitHub Desktop.
#!/usr/bin/sh
#
# downloadOTX.sh
#
# This script uses AlienVault's Open Threat Exchange (OTX) to download a PDF
# containing the IP reputation of the IP Addresses provided.
#
# USAGE:
# $ ./downloadOTX.sh 1.2.3.4
# $ ./downloadOTX.sh 1.2.3.4 1.2.3.5 1.2.3.6 etc.
#
# Set path to save files:
path=/home/Downloads/
# Set filename prefix and/or suffix:
prefix=
suffix=\_otx.pdf
for args in "$@"
do
#wget http://www.alienvault.com/apps/api/threat/pdf/?ip=$args -O $path$prefix$args$suffix
wget https://www.alienvault.com/apps/api/threat/ip/$args/pdf/?source=internal -O $path$prefix$args$suffix
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment