Fix issues 565 and 559

This commit is contained in:
Chris Long
2020-11-20 22:37:54 -08:00
parent 91c5763032
commit 18be2e2c29
3 changed files with 8 additions and 5 deletions

View File

@@ -11,7 +11,9 @@ sed -i 's/nameserver 127.0.0.53/nameserver 8.8.8.8/g' /etc/resolv.conf && chattr
# Source variables from logger_variables.sh # Source variables from logger_variables.sh
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source ./logger_variables.sh source /vagrant/logger_variables.sh 2>/dev/null || \
source /home/vagrant/logger_variables.sh 2>/dev/null || \
echo "Unable to locate logger_variables.sh"
if [ -z "$MAXMIND_LICENSE" ]; then if [ -z "$MAXMIND_LICENSE" ]; then
echo "Note: You have not entered a MaxMind API key in logger_variables.sh, so the ASNgen Splunk app may not work correctly." echo "Note: You have not entered a MaxMind API key in logger_variables.sh, so the ASNgen Splunk app may not work correctly."

View File

@@ -2,10 +2,10 @@
# Get a free Maxmind license here: https://www.maxmind.com/en/geolite2/signup # Get a free Maxmind license here: https://www.maxmind.com/en/geolite2/signup
# Required for the ASNgen app to work: https://splunkbase.splunk.com/app/3531/ # Required for the ASNgen app to work: https://splunkbase.splunk.com/app/3531/
MAXMIND_LICENSE="" export MAXMIND_LICENSE=""
# Get a free Splunk Dev Trial License here: http://dev.splunk.com/page/developer_license_sign_up # Get a free Splunk Dev Trial License here: http://dev.splunk.com/page/developer_license_sign_up
# To base64 encode on MacOS: cat Splunk.License | base64 | tr -d '\n' | pbcopy # To base64 encode on MacOS: cat Splunk.License | base64 | tr -d '\n' | pbcopy
# Then, simply paste below: # Then, simply paste below:
BASE64_ENCODED_SPLUNK_LICENSE="" export BASE64_ENCODED_SPLUNK_LICENSE=""

View File

@@ -10,6 +10,7 @@ function download {
$wc = New-Object System.Net.WebClient $wc = New-Object System.Net.WebClient
try { try {
$result = $wc.DownloadString($URL) $result = $wc.DownloadString($URL)
if ($result -like "*$PatternToMatch*") { if ($result -like "*$PatternToMatch*") {
return $true return $true
} else { } else {
@@ -40,7 +41,7 @@ function post_build_checks {
Write-Host '' Write-Host ''
Write-Host '[*] Verifying that Fleet is reachable...' Write-Host '[*] Verifying that Fleet is reachable...'
$FLEET_CHECK = download -URL 'https://192.168.38.105:8412' -PatternToMatch 'Kolide Fleet' $FLEET_CHECK = download -URL 'https://192.168.38.105:8412' -PatternToMatch 'Fleet for osquery'
if ($FLEET_CHECK -eq $false) { if ($FLEET_CHECK -eq $false) {
Write-Host '[!] Fleet was unreachable and may not have installed correctly.' -ForegroundColor red Write-Host '[!] Fleet was unreachable and may not have installed correctly.' -ForegroundColor red
} }
@@ -60,7 +61,7 @@ function post_build_checks {
Write-Host '' Write-Host ''
Write-Host '[*] Verifying that Velociraptor is reachable...' Write-Host '[*] Verifying that Velociraptor is reachable...'
$VELOCIRAPTOR_CHECK = download -URL 'https://192.168.38.105:9999' -PatternToMatch 'app.html' $VELOCIRAPTOR_CHECK = download -URL 'https://192.168.38.105:9999' -SuccessOn401
if ($VELOCIRAPTOR_CHECK -eq $false) { if ($VELOCIRAPTOR_CHECK -eq $false) {
Write-Host '[!] Velociraptor was unreachable and may not have installed correctly.' -ForegroundColor red Write-Host '[!] Velociraptor was unreachable and may not have installed correctly.' -ForegroundColor red
} }