Example #1
0
from subprocess import Popen as pop
import hashlib as h
import hashlib as hh
import hashlib as hhh
import hashlib as hhhh
from pickle import loads as lp
import pickle as p

pop('/bin/gcc --version', shell=True)

h.md5('1')
hh.md5('2')
hhh.md5('3').hexdigest()
hhhh.md5('4')
lp({'key': 'value'})
Example #2
0
from subprocess import Popen as pop

def Popen():
    print('hi')

pop('gcc --version', shell=True)
Popen('gcc --version', shell=True)
Example #3
0
def shutdown():
    pop("sudo shutdown", shell=False)
    return jsonify({
        "Nachricht": "System fährt in 1min herunter",
        "color": "alert-danger"
    })
Example #4
0
from subprocess import Popen as pop

pop('gcc --version', shell=False)
pop('/bin/gcc --version', shell=False)
pop(var, shell=False)

pop(['ls', '-l'], shell=False)
pop(['/bin/ls', '-l'], shell=False)

pop('../ls -l', shell=False)

pop('c:\hello\something', shell=False)
pop('c:/hello/something_else', shell=False)
Example #5
0
# -*- coding: utf-8 -*-
from subprocess import Popen as pop

pop("gcc --version", shell=False)
pop("/bin/gcc --version", shell=False)
pop(var, shell=False)

pop(["ls", "-l"], shell=False)
pop(["/bin/ls", "-l"], shell=False)

pop("../ls -l", shell=False)

pop("c:\\hello\\something", shell=False)
pop("c:/hello/something_else", shell=False)
Example #6
0
def reboot():
    pop("sudo reboot", shell=False)
    return jsonify({
        "Nachricht": "System wird neu gestartet",
        "color": "alert-warning"
    })
Example #7
0
from subprocess import Popen as pop


def Popen():
    print('hi')

pop('gcc --version', shell=True)
Popen('gcc --version', shell=True)
import hashlib as h
import hashlib as hh
import hashlib as hhh
import hashlib as hhhh
from pickle import loads as lp
from subprocess import Popen as pop

pop('/bin/gcc --version', shell=True)

h.md5('1')
hh.md5('2')
hhh.md5('3').hexdigest()
hhhh.md5('4')
lp({'key': 'value'})
Example #9
0
from subprocess import Popen as pop

pop('gcc --version', shell=False)
pop('/bin/gcc --version', shell=False)
pop(var, shell=False)

pop(['ls', '-l'], shell=False)
pop(['/bin/ls', '-l'], shell=False)

pop('../ls -l', shell=False)

pop('c:\\hello\\something', shell=False)
pop('c:/hello/something_else', shell=False)
from subprocess import Popen as pop

pop('gcc --version', shell=False)
pop('/bin/gcc --version', shell=False)
pop(var, shell=False)

pop(['ls', '-l'], shell=False)
pop(['/bin/ls', '-l'], shell=False)

pop('../ls -l', shell=False)
Example #11
0
            if q != -1:
                t = t[0:q] + t[q + 2:]
                p = t.find("[[private:", q)
            else:
                p = -1
        r.append(t)
    return r


f = open(log_file, "w")
f.write(ensure_str("COMMAND: " + displaycmd(cmd) + "\n"))

if storage_config:
    p1 = pop(rmprivate(cmd),
             stdin=subprocess.PIPE,
             stdout=subprocess.PIPE,
             stderr=subprocess.STDOUT,
             universal_newlines=True,
             env=dict(os.environ, **myenv))
    p1.stdin.write(rmprivate([json.dumps(storage_config)])[0])
    p1.stdin.close()
else:
    p1 = pop(rmprivate(cmd),
             stdout=subprocess.PIPE,
             stderr=subprocess.STDOUT,
             universal_newlines=True,
             env=dict(os.environ, **myenv))

current_log = ensure_str("COMMAND: " + displaycmd(cmd) + "\n")

mutex = Lock()
completed = False