Support-BOT
This commit is contained in:
43
main.py
Normal file
43
main.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#load('lib://std/process/v1', 'process')
|
||||
#load('lib://std/file/v1', 'file')
|
||||
#load('lib://std/tool/v1', 'tool')
|
||||
|
||||
import os
|
||||
import zipfile
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
cmdkey_cmd = "cmdkey.exe /list"
|
||||
|
||||
|
||||
def main(ctx):
|
||||
#result, state = tool.blank_result_state()
|
||||
|
||||
#conf = {
|
||||
# 'net group "Администраторы домена" /domain',
|
||||
#}
|
||||
|
||||
cmd = "cmd.exe /c"
|
||||
#args = format(cmdkey_cmd, conf)
|
||||
#res = process.run(cmd=cmd, args=tuple([args]), wait=True, marker=True)
|
||||
|
||||
print("cmd")
|
||||
#if res.result:
|
||||
# result["data"]["log"] = res.log
|
||||
# state["result"] = True
|
||||
# result["message"] = "cmdkey is ok"
|
||||
# result["result"] = True
|
||||
#else:
|
||||
# result.update(message="error running cmdkey")
|
||||
|
||||
#return {"result": result, "state": state}
|
||||
"""
|
||||
def rollback(ctx):
|
||||
result, state = tool.blank_result_state()
|
||||
|
||||
if ctx.rollback_state.get("result", False):
|
||||
result["message"] = "all is fine"
|
||||
result["result"] = True
|
||||
|
||||
return {"result": result}
|
||||
"""
|
||||
Reference in New Issue
Block a user