Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

Public tools, scripts or code snippets that can help when working with our products

## ASGARD
## Management Center

### Bulk License Generator for ASGARD v2
### Bulk License Generator for Management Center v2

Written for: ASGARD v2
Written for: Management Center v2
Language: Windows Batch

A Windows Batch files that allows you to generate and retrieve licenses for a list of hosts from a remote ASGARD v2 system.
A Windows Batch files that allows you to generate and retrieve licenses for a list of hosts from a remote Management Center v2 system.

## ASGARD Analysis Cockpit
## Analysis Cockpit

### THOR Timestamp Converter

Expand All @@ -24,7 +24,7 @@ The converter allows you to convert the timestamp of old THOR logs to the new RF

### THOR Seed

Written for: THOR, ASGARD v3, Nextron Portal (referenced as "THOR Cloud" in the script)
Written for: THOR, Management Center v3, Nextron Portal (referenced as "THOR Cloud" in the script)
Language: PowerShell

THOR Seed is a lightweight PowerShell script that facilitates the deployment of THOR in cases in which you can't or don't want to use an agent for a continous compromise assessment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
SETLOCAL EnableDelayedExpansion

REM Configuration
SET ASGARD_HOST=asgard.nextron-systems.com
SET MGMTCNT_HOST=mgmt-center.nextron-systems.com
SET API_KEY="not set"

ECHO =============================================
ECHO Bulk License Generator for ASGARD v2
ECHO ================================================
ECHO Bulk License Generator for Management Center v2
ECHO Florian Roth v1.0, Win10 Version using Curl
ECHO =============================================
ECHO ================================================
ECHO.

IF %API_KEY% == "not set" (
ECHO Error: No API key set. Open this batch file with a text editor and set your asgard host and api key in the configurtaion section. You can find your API Key in User Settings > API Key.
ECHO Error: No API key set. Open this batch file with a text editor and set your management center host and api key in the configuration section. You can find your API Key in User Settings > API Key.
EXIT /b 1
)

Expand All @@ -29,7 +29,7 @@ IF NOT EXIST %CD%\hostnames.txt (

FOR /F "tokens=*" %%A in (%CD%\hostnames.txt) DO (
ECHO Generating license for %%A ...
curl -X POST "https://%ASGARD_HOST%:8443/api/v0/licensing/issue" ^
curl -X POST "https://%MGMTCNT_HOST%:8443/api/v0/licensing/issue" ^
-H "accept: application/octet-stream" ^
-H "Authorization: %API_KEY%" ^
-H "Content-Type: application/x-www-form-urlencoded" ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# License retrieval script
# Florian Roth, June 2021

# ASGARD URL
$AsgardURL = "https://asgard.nextron-systems.com:8443/api/v0/licensing/issue"
# Management Center URL
$MgmtCntURL = "https://mgmt-center.nextron-systems.com:8443/api/v0/licensing/issue"
$Token = ""
$LicenseFile = "licenses.zip"
$OutputPath = ".\"
Expand All @@ -18,9 +18,9 @@ $ExtractLicenses = $True
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$WebClient = New-Object System.Net.WebClient
if ( $Token ) {
$AsgardURL = [string]::Format("{0}?token={1}", $AsgardURL, $Token)
$MgmtCntURL = [string]::Format("{0}?token={1}", $MgmtCntURL, $Token)
}
Write-Host "Using URL: $AsgardURL"
Write-Host "Using URL: $MgmtCntURL"

# Hostname
$Hostname = $env:COMPUTERNAME
Expand All @@ -44,7 +44,7 @@ Write-Host "Requesting license for HOST: $Hostname TYPE: $LicenseType"

# Request license
try {
$Response = $WebClient.UploadValues($AsgardURL, $postData)
$Response = $WebClient.UploadValues($MgmtCntURL, $postData)
# HTTP Errors
} catch [System.Net.WebException] {
Write-Host "The following error occurred: $_"
Expand Down
Loading