Exemplo n.º 1
0
def run(prog, args, valgrind):
    if valgrind:
        app = Application("valgrind", ["--leak-check=no", "--quiet", prog] + args)
        app.pipeStderr()
        app.start()
        try:
            while app.wait(False):
                line = app.readline(timeout=None, stream="stderr")
                if line:
                    if is_vuln(line):
                        print line
                        app.stop()
                        return True
        except KeyboardInterrupt:
            print "Interrupt!"
            app.stop()
            return True
    else:
        app = Application(prog, args)
        app.start()
        try:
            app._wait(True)
        except KeyboardInterrupt:
            print "Interrupt!"
            app.stop()
            return True
    return app.exit_failure and app.exit_code is None
Exemplo n.º 2
0
def run(prog, args, valgrind):
    if valgrind:
        app = Application("valgrind",
                          ["--leak-check=no", "--quiet", prog] + args)
        app.pipeStderr()
        app.start()
        try:
            while app.wait(False):
                line = app.readline(timeout=None, stream="stderr")
                if line:
                    if is_vuln(line):
                        print line
                        app.stop()
                        return True
        except KeyboardInterrupt:
            print "Interrupt!"
            app.stop()
            return True
    else:
        app = Application(prog, args)
        app.start()
        try:
            app._wait(True)
        except KeyboardInterrupt:
            print "Interrupt!"
            app.stop()
            return True
    return app.exit_failure and app.exit_code is None
Exemplo n.º 3
0
 def _cmdcrash(self):
     app = Application(PROG, (FUZZDIR, ))
     app.start()
     try:
         app._wait(True)
     except KeyboardInterrupt:
         print "Interrupt!"
         app.stop()
         return True
     return app.exit_failure and app.exit_code is None
Exemplo n.º 4
0
 def _cmdcrash(self):
     app = Application(PROG, (FUZZDIR,))
     app.start()
     try:
         app._wait(True)
     except KeyboardInterrupt:
         print "Interrupt!"
         app.stop()
         return True
     return app.exit_failure and app.exit_code is None