This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <err.h> | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include "seccomp-bpf.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <limits.h> | |
#include <signal.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
uint64_t g_addr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p "Input a file path: " filepath | |
file $filepath 2>/dev/null | grep -q "ASCII text" 2>/dev/null | |
# TODO: print the result the above command. | |
# $? == 0 -> It's a text file. | |
# $? != 0 -> It's not a text file. | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick and Dirty Crash Minimizer. | |
// Usage: minimize input output -- program_invocation program_flags FILE | |
// The program has to crash with either SIGSEGV or SIGABRT. | |
use log::{debug, info}; | |
use nix::sys::ptrace; | |
use nix::sys::signal::Signal; | |
use nix::sys::wait::{waitpid, WaitStatus}; | |
use nix::unistd::Pid; | |
use rand::prelude::SliceRandom; | |
use std::collections::HashSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Example script for configuring and compiling Bochs on Linux for Windows. | |
# | |
CC="x86_64-w64-mingw32-gcc" | |
CXX="x86_64-w64-mingw32-g++" | |
CFLAGS="-O3 -Wall -Wno-format -mno-ms-bitfields" | |
CXXFLAGS="$CFLAGS" | |
WINDRES="x86_64-w64-mingw32-windres" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Sup 3 test" | |
Memcheck:Leak | |
match-leak-kinds: reachable | |
fun:calloc | |
obj:/lib/ld-musl-x86_64.so.1 | |
fun:__dls3 | |
obj:* | |
obj:* | |
obj:* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This code is useful for moments when the stack might be corrupted. | |
On the first asan panic, asan will disable further panics and switch | |
to a new stack. | |
*/ | |
// ktl::atomic<bool> g_asan_panic = false; | |
// uint8_t kasan_panic_stack[4096]; | |
if (g_asan_panic.exchange(true)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/build/tools/json_merge/json_merge.cc | |
/build/tools/json_merge/main.cc | |
/build/tools/json_merge/test.cc | |
/build/tools/json_validator/main.cc | |
/examples/dotmatrix_display/create_ssd1306.cc | |
/examples/dotmatrix_display/fuchsia_logo.cc | |
/examples/dotmatrix_display/main.cc | |
/examples/dotmatrix_display/space_invaders.cc | |
/examples/fidl/echo_client/cpp/main.cc | |
/examples/fidl/echo_server/cpp/main.cc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Writing logs to /home/user/codeql-home/fuchsia-ql/log/database-analyze-20200129.111407.684.log. | |
Running queries. | |
Writing logs to /home/user/codeql-home/fuchsia-ql/log/execute-queries-20200129.111408.306.log. | |
Expanding query suite /home/user/codeql-home/ql/cpp/ql/src/codeql-suites/cpp-lgtm-full.qls. | |
Suite description = Standard LGTM queries for C/C++, including ones not displayed by default | |
Scanning for QL files at /home/user/codeql-home/ql/cpp/ql/src. | |
Found 553 QL files in /home/user/codeql-home/ql/cpp/ql/src. | |
Scanning for qlpack.yml from /home/user/codeql-home/ | |
Scanning for qlpack.yml from /home/user/codeql-home/codeql/.codeqlmanifest.json | |
Scanning for qlpack.yml from /home/user/codeql-home/ql/.codeqlmanifest.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import re | |
import subprocess | |
import tempfile | |
import requests | |
def get_repo(owner, repo): |
NewerOlder