Last active
August 12, 2022 00:24
-
-
Save SavSanta/3c45c385f7d4f7c8a8e24cb3b72fdc4d to your computer and use it in GitHub Desktop.
amonsec load_scripts cna
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For some reason dude secreted it so im just gonna steal his shit and repurpose it | |
# Java packages | |
import aggressor.windows.ScriptManager; | |
import aggressor.AggressorClient; | |
import aggressor.Prefs; | |
import cortana.Cortana; | |
import java.util.List; | |
# $1 - array of scripts to load | |
sub load_aggressor_script { | |
this('$script $client $cortana $prefs $list'); | |
$script = [new ScriptManager: getAggressorClient()]; | |
$client = [$script client]; | |
$cortana = [$client engine]; | |
# Get preferences | |
$prefs = [Prefs getPreferences]; | |
$list = [$prefs getList: 'cortana.scripts']; | |
# Load/Reload scripts | |
foreach $value ($1) { | |
println("\c2[+]\c0 Loading: " . $value); | |
# Unload script if alread exist | |
if ([[$cortana scripts] containsKey: $value]) { | |
[$cortana unloadScript: $value]; | |
[$list remove: $value]; | |
} | |
# Load script | |
[$cortana loadScript: $value]; | |
[$list add: $value]; | |
} | |
# Refresh UI | |
[$prefs setList: 'cortana.scripts', $list]; | |
[$prefs save]; | |
[$script refresh]; | |
} | |
# Banner | |
println(''); | |
println('Cobalt Strike Aggressor Script Utility for Loading Aggressor Scripts'); | |
println('Dude Secreted His Stuff So Must Not Want The Credit'); | |
println(''); | |
# Scripts to load | |
@scripts_to_load = @( | |
"C:\\Users\\redacted\\Desktop\\script1.cna", | |
"C:\\Users\\redacted\\Desktop\\script2.cna" | |
); | |
load_aggressor_script(@scripts_to_load); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment