Skip to content

Instantly share code, notes, and snippets.

View ethercflow's full-sized avatar
🎯
Focusing

Wenbo Zhang ethercflow

🎯
Focusing
  • SmartX
  • China
View GitHub Profile
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
from __future__ import print_function
from bcc import BPF
import sys, os
from bcc.utils import printb
# define BPF program
prog = """
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
from __future__ import print_function
from bcc import BPF
from time import sleep, strftime
import argparse
examples = """examples:
"""
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
from __future__ import print_function
from bcc import BPF
from time import sleep, strftime
import argparse
examples = """examples:
"""
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
from __future__ import print_function
from bcc import ArgString, BPF
from time import sleep
bpf_text = """
#include <uapi/linux/ptrace.h>
#include <linux/sched.h>
#!/bin/bash
while true; do
date
netstat -sn | egrep "prune|collap"
sleep 30
done
#include <sys/mount.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
int main(void) {
int ret;
while (1) {
ret = mount("/dev/sdc", "/mnt", "ext4",
#include <sys/mount.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
int main(void) {
int ret = 0;
while (1) {
ret = mount("/dev/sdc", "/mnt", "ext4", MS_MGC_VAL | MS_RDONLY | MS_NOSUID, "");
syntax = "proto3";
package timechaos;
import "google/protobuf/empty.proto";
service Inject {
rpc SetTimeval(Request) returns (google.protobuf.Empty) {}
rpc Recover(Request) returns (google.protobuf.Empty) {}
}
#include <uapi/linux/ptrace.h>
#include <linux/time.h>
#define NANOS_PER_SEC 1000000000
#define MICROS_PER_SEC 1000000
#define MAX_JMP_SEQ 8192
struct clock_filter {
long sec;
package main
import (
"context"
"flag"
"log"
"strings"
"time"
pb "github.com/ethercflow/injuredfs/pb"