This repository contains few tools that I wrote over the years to check
something once. They are kind of like my throw-away shell scripts, only in C
and for low-level stuff. They are not big enough nor important enough to have
their own repository, but still, they needed too much energy to stay in /tmp
,
so here they are.
Those tools are mainly linux/x86 oriented.
bufpipe
: buffer stdin to be used as a regular fileclose_range
: close a range of file descriptorscoredump_filter
: get/setcoredump_filter
flagscpuid
: pretty print information from theCPUID
instructiondumpauxv
: pretty print a auxv filedumpvdso
: dump vDSO (wip)fxsave
: pretty print the result ofFXSAVE
x86 instructiongetpid32
: print pid and waitgetpid
: print self or parent pidget_ss
: print segment selectorshpet
: get info about local hpet (wip)lsholes
: show holes/data in sparse filesmem_cat
: dump memory of another process (wip)memfd_secret
: open amemfd_secret
fd for the provided commandmmapable
: tell if a file supports themmap
file operationparse_segm
: convert x86 segmented address to linear addressrdpid
: read the processor ID withRDPID
x86 instructionrdrand
: print random numbers generated with theRDRAND
instructionrdtsc
: printRDTSC
readcmos
: read the CMOS clock registerreadio
: read an io portsegm2linear
: convert an x86 real-mode segmented address to a linear addresssetcpuid
: enable or disableCPUID
instructionset_no_new_privs
: set theno_new_privs
thread attributeset_ptracer
: set this process ptracerset_tsc
: cause SIGSEGV when the process tries to read timestamp countersgdt
: get the base and limit ofSGDT
,SLDT
,SIDT
, andSTR
instructionssmsw
: pretty print the result of theSMSW
instructionspeculation
: control the process speculation configurationstatvfs
: get filesystem statisticsudpsend
: send something over UDPvmcall
: execute vmcall instruction in userland (fails)writeio
: write to an io portx86_int
: executeINT
instructionxgetbv
: pretty print the result of theXGETBV
instruction
scdoc
for documentationpandoc
to update README.md