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
// 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/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
#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
#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" |
OlderNewer