mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: project.show_command_output to def:ShowCommandOutput
This commit is contained in:
@@ -7,6 +7,7 @@ class FilePath(str):
|
|||||||
# with shellcodes/createfile.bin
|
# with shellcodes/createfile.bin
|
||||||
VerifyFilename: FilePath = r'C:\Temp\a'
|
VerifyFilename: FilePath = r'C:\Temp\a'
|
||||||
|
|
||||||
|
ShowCommandOutput: bool = False
|
||||||
|
|
||||||
# Correlated with real template files
|
# Correlated with real template files
|
||||||
# in plugins/
|
# in plugins/
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ def run_process_checkret(args, check=True):
|
|||||||
if ret.stderr != None:
|
if ret.stderr != None:
|
||||||
logger.info(ret.stderr.decode('utf-8'))
|
logger.info(ret.stderr.decode('utf-8'))
|
||||||
raise Exception("Command failed: " + " ".join(args))
|
raise Exception("Command failed: " + " ".join(args))
|
||||||
if project.show_command_output:
|
if ShowCommandOutput:
|
||||||
logger.info("> " + " ".join(args))
|
logger.info("> " + " ".join(args))
|
||||||
if ret.stdout != None:
|
if ret.stdout != None:
|
||||||
logger.info(ret.stdout.decode('utf-8'))
|
logger.info(ret.stdout.decode('utf-8'))
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.show:
|
if args.show:
|
||||||
project.show_command_output = True
|
ShowCommandOutput = True
|
||||||
|
|
||||||
if args.verify:
|
if args.verify:
|
||||||
project.payload_path = "shellcodes/createfile.bin"
|
project.payload_path = "shellcodes/createfile.bin"
|
||||||
|
|||||||
Reference in New Issue
Block a user