是否将美国Fuzzy Lop用作Travis CI的一部分? [英] Apply american fuzzy lop as a part of Travis CI?

查看:96
本文介绍了是否将美国Fuzzy Lop用作Travis CI的一部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想运行美国模糊作为Travis CI运行的一部分.我该怎么办?

I would like to run american fuzzy lop as a part of Travis CI run. How can I do that?

推荐答案

这是我的尝试-我设法以这种方式运行AFL:

Here are my attempts - I managed to run AFL this way:

https://github.com/d33tah/travis-test-c-app

.travis.yml

language: c
install: wget "http://lcamtuf.coredump.cx/afl/releases/afl-1.88b.tgz" -O- | tar zxf - ; pushd . ; cd afl-*; make PREFIX=/tmp/afl install; echo core | sudo tee /proc/sys/kernel/core_pattern; popd

Makefile

CC=/tmp/afl/bin/afl-gcc
all: app
test: app
    ./perform_fuzzing

perform_fuzzing

#!/bin/bash
AFL_EXIT_WHEN_DONE=1 /tmp/afl/bin/afl-fuzz -i i -o o ./app >/dev/null
cat o/fuzzer_stats

配置

#!/bin/sh
true

app.c

int main() {
    if (getchar() == '1')
        abort();
    return 0;
}

注意:

正如用户 cubuspl42 在对这个问题的评论中指出的那样,Travis CI有时间限制.这意味着您可能希望将输出目录推送到Git并以恢复模式运行AFL.您可能还希望将命令包装为 timeout 编程和/或用cycles_wo_finds > 20 nofollow>此行(将来可能还会有其他行).

Note:

As user cubuspl42 pointed out in his comment to this question, Travis CI has time limitations though. This means that you might want to push the output directory to Git and run AFL in resume mode instead. You might also want to wrap the command with timeout program and/or replace cycles_wo_finds > 20 with a smaller number in this line (and possibly some others in the future).

这篇关于是否将美国Fuzzy Lop用作Travis CI的一部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆