예제 #1
0
from Vanapagan.Detector.WinBasic import WinBasic
from Vanapagan.Loging.FilesystemLoging import FilesystemLoging


log = FilesystemLoging()
run = WinBasic()


run.run(['crash'])
crash = run.waitForCrash(10, True)
if crash != None:
	log.log("./Readme.txt", crash, "TEST")
예제 #2
0
			x = 0
			while True:
				try:
					desc = mut.mutate("c:/Work/input/" + f, "c:/Work/test1.pdf")
					break
				except:
					if x>10:
						raise
					if x>5:
						killAll()
					time.sleep(1)
					x+=1
		
					
			while True:					
				run.run(["C:\\Program Files\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe", "/n", "/s", "/o", "/h", "c:/Work/test1.pdf"])			
				#crash = run.waitForCrash(12)
				crash = None
				for x in xrange(12 + (crashCheck*3)):
					psutil.cpu_percent()
					crash = run.waitForCrash(1)
					usage = psutil.cpu_percent()
					if crash != None:
						break
					if usage<8.0:
						break
				run.close()
				killAll()
				if crash != None:
					if crashCheck == 3:
						crashes += 1
예제 #3
0
from Vanapagan.Detector.WinBasic import WinBasic
from Vanapagan.Loging.FilesystemLoging import FilesystemLoging

log = FilesystemLoging()
run = WinBasic()

run.run(['crash'])
crash = run.waitForCrash(10, True)
if crash != None:
    log.log("./Readme.txt", crash, "TEST")
예제 #4
0
                        break
                    except:
                        time.sleep(0.5)

            inputFile = configurations.input + os.path.sep + f
            unique = "%08X" % random.randint(0, 0xFFFFFFFF)
            outputFile = "." + os.path.sep + unique + os.path.splitext(f)[1]

            desc = mutators[count % len(mutators)].mutate(
                inputFile, outputFile)

            crashLocation = None
            for crashCount in xrange(configurations.retry):
                crash = None
                run.mainProcs = []
                run.run([configurations.executable, outputFile])
                pids = []
                pidsStoped(pids, configurations.binaries)
                if configurations.windowToInteract is not None:
                    win32gui.EnumWindows(enumHandler, configurations)

                for x in xrange(configurations.maxWait):
                    crash = run.waitForCrash(1)
                    if crash != None:
                        break
                    if pidsStoped(pids, configurations.binaries):
                        break
                    if configurations.windowToInteract is not None:
                        win32gui.EnumWindows(enumHandler, configurations)

                run.close()
예제 #5
0
            while True:
                try:
                    desc = mut.mutate("c:/Work/input/" + f,
                                      "c:/Work/test1.pdf")
                    break
                except:
                    if x > 10:
                        raise
                    if x > 5:
                        killAll()
                    time.sleep(1)
                    x += 1

            while True:
                run.run([
                    "C:\\Program Files\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe",
                    "/n", "/s", "/o", "/h", "c:/Work/test1.pdf"
                ])
                #crash = run.waitForCrash(12)
                crash = None
                for x in xrange(12 + (crashCheck * 3)):
                    psutil.cpu_percent()
                    crash = run.waitForCrash(1)
                    usage = psutil.cpu_percent()
                    if crash != None:
                        break
                    if usage < 8.0:
                        break
                run.close()
                killAll()
                if crash != None:
                    if crashCheck == 3: