Skip to content

Instantly share code, notes, and snippets.

View Phhere's full-sized avatar

Philipp Helo Rehs Phhere

  • HHU Düsseldorf
  • Düsseldorf, Germany
View GitHub Profile
@jfeilbach
jfeilbach / get_splunk.sh
Created April 8, 2019 20:11
Get splunk universal forwarder download URL
#!/bin/bash
#URL="https://www.splunk.com/en_us/download/splunk-enterprise.html"
URL="https://www.splunk.com/en_us/download/universal-forwarder.html"
OS_REGEX="linux-2\.6-x86_64\.rpm"
#OS_REGEX="Linux-x86_64\.md5"
RESPONSE=`curl -s --connect-timeout 10 --max-time 10 $URL`
LINK=`echo $RESPONSE | egrep -o "data-link=\"https://[^\"]+-${OS_REGEX}\"" | cut -c12- | rev | cut -c2- | rev`