Example #1
0
def test():
	key_file = "key.tmp"
	key = "The key is {150a09840a39aec42662e3b7dd006f830fec39fa0020f65ea884216903fc9e4b}\n"
	f = open(key_file, "w")
	f.write(key)
	f.close()
	sc = shellcode.readfile(key_file)
	testing.run_expecting_output(sc, key)
	os.remove(key_file)
Example #2
0
def test():
	sc = shellcode.helloworld()
	testing.run_expecting_output(sc, "Hello World!\n")	
Example #3
0
def test():
	command = ["/bin/uname", "-s", "-n", "-r", "-v", "-m", "-p", "-i", "-o"]
	sc = shellcode.execve(command)
	expect = subprocess.check_output(command)
	testing.verify_no_nulls(sc)
	testing.run_expecting_output(sc, expect)
Example #4
0
def test():
	sc = shellcode.helloworld()
	testing.verify_no_nulls(sc)
	testing.run_expecting_output(sc, "Hello World!\n")