mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
feature: guardrail data
This commit is contained in:
@@ -239,6 +239,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if project.settings.plugin_guardrail != "none" %}
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="guardrail" class="col-sm-5 col-form-label">
|
||||||
|
Guard Data
|
||||||
|
</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input type="text" name="guardrail_data" class="hidden form-control"
|
||||||
|
placeholder="" value="{{project.settings.plugin_guardrail_data}}"
|
||||||
|
aria-label="guardrail_data" aria-describedby="basic-addon1"
|
||||||
|
onchange="this.form.submit()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="antiemulation_style" class="col-sm-5 col-form-label">
|
<label for="antiemulation_style" class="col-sm-5 col-form-label">
|
||||||
AntiEmulation
|
AntiEmulation
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ def add_project():
|
|||||||
payload_location = request.form['payload_location']
|
payload_location = request.form['payload_location']
|
||||||
settings.payload_location = PayloadLocation[payload_location]
|
settings.payload_location = PayloadLocation[payload_location]
|
||||||
|
|
||||||
|
settings.plugin_guardrail_data = request.form['guardrail_data']
|
||||||
|
|
||||||
# overwrite project
|
# overwrite project
|
||||||
project = storage.get_project(project_name)
|
project = storage.get_project(project_name)
|
||||||
project.settings = settings
|
project.settings = settings
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ int mystrcmp(wchar_t* str1, wchar_t* str2) {
|
|||||||
int executionguardrail() {
|
int executionguardrail() {
|
||||||
// Execution Guardrail: Env Check
|
// Execution Guardrail: Env Check
|
||||||
wchar_t envVarName[] = L"USERPROFILE";
|
wchar_t envVarName[] = L"USERPROFILE";
|
||||||
wchar_t tocheck[] = L"C:\\Users\\";
|
wchar_t tocheck[] = L"{{guardrail_data}}";
|
||||||
WCHAR buffer[1024]; // NOTE: Do not make it bigger, or we have a __chkstack() dependency!
|
WCHAR buffer[1024]; // NOTE: Do not make it bigger, or we have a __chkstack() dependency!
|
||||||
DWORD result = GetEnvironmentVariableW(envVarName, buffer, 1024);
|
DWORD result = GetEnvironmentVariableW(envVarName, buffer, 1024);
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class Settings():
|
|||||||
self.plugin_antiemulation = "none"
|
self.plugin_antiemulation = "none"
|
||||||
self.plugin_decoy = "none"
|
self.plugin_decoy = "none"
|
||||||
self.plugin_guardrail = "none"
|
self.plugin_guardrail = "none"
|
||||||
|
self.plugin_guardrail_data = "C:\\Users\\"
|
||||||
|
|
||||||
self.dllfunc: str = "" # For DLL injection
|
self.dllfunc: str = "" # For DLL injection
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ def create_c_from_template(settings: Settings, payload_len: int):
|
|||||||
settings.plugin_guardrail)
|
settings.plugin_guardrail)
|
||||||
with open(filepath_guardrails, "r", encoding='utf-8') as file:
|
with open(filepath_guardrails, "r", encoding='utf-8') as file:
|
||||||
plugin_guardrails = file.read()
|
plugin_guardrails = file.read()
|
||||||
|
plugin_guardrails = Template(plugin_guardrails).render({
|
||||||
|
'guardrail_data': settings.plugin_guardrail_data,
|
||||||
|
})
|
||||||
|
|
||||||
# Plugin: Decoder
|
# Plugin: Decoder
|
||||||
filepath_decoder = PATH_DECODER + "{}.c".format(
|
filepath_decoder = PATH_DECODER + "{}.c".format(
|
||||||
|
|||||||
Reference in New Issue
Block a user