Skip to content

Instantly share code, notes, and snippets.

@reveal79
reveal79 / splunk-download.sh
Created January 3, 2025 17:12 — forked from K-Yo/splunk-download.sh
Bash script to help download the latest splunk version of your choice.
#!/bin/bash
# code used for the article https://olivontech.com/en/posts/splunk/download-splunk-without-login/
# inspired from https://gist.github.com/ThinGuy/ee76f181151047267cdb38b7e1c1f1e3
# compatible with bash 4.4+
# you need curl for the dowloads to happen
# if download is interrupted, it will resume where it left off
download-splunk() {
# Array of Splunk URLS
@reveal79
reveal79 / splunk-download.ps1
Created January 3, 2025 17:19
Powershell Splunk Download
function Download-Splunk {
function Get-URLsFromPage {
param (
[string]$Url,
[string]$Pattern
)
$content = (Invoke-WebRequest -Uri $Url -UseBasicParsing).Content
$matches = Select-String -InputObject $content -Pattern $Pattern -AllMatches
$urls = $matches.Matches | ForEach-Object { $_.Groups[1].Value.Trim() }
return $urls