Skip to content

Commit

Permalink
Output Function - turn strict off (#207)
Browse files Browse the repository at this point in the history
* proof of concept of an output depth parameter

* remove output depth and instead allow arbitrary input for output function

* revert

* revert
  • Loading branch information
vinnybod authored Aug 26, 2021
1 parent bd5b388 commit b9e49e4
Show file tree
Hide file tree
Showing 91 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion empire/server/common/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _generate_script_powershell(self, module: PydanticModule, params: Dict, obfu
option_strings = []
# This is where the code goes for all the modules that do not have a custom generate function.
for key, value in params.items():
if key.lower() != "agent" and key.lower() != "computername" and key.lower() != "outputfunction":
if key.lower() not in ["agent", "computername", "outputfunction"]:
if value and value != '':
if value.lower() == "true":
# if we're just adding a switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/credentials/tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/management/phant0m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/management/timestomp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/privesc/getsystem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/privesc/gpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/privesc/privesccheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/privesc/sherlock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/recon/find_fruit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
2 changes: 1 addition & 1 deletion empire/server/modules/powershell/recon/http_login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ options:
description: PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
required: false
value: 'Out-String'
strict: true
strict: false
suggested_values:
- Out-String
- ConvertTo-Json
Expand Down
Loading

0 comments on commit b9e49e4

Please sign in to comment.