instructions
Highlights
- Pro
Pinned Loading
-
setup-netfilter
setup-netfilter PublicA collection of shell scripts that build a config file for use with NetFilter.
Shell
-
Minimising required CPU cycles for a...
Minimising required CPU cycles for a task 1Would a compiler or AI LLM ever generate the following code?
2I needed to convert IP addresses in CIDR format to a numeric `u32` value for it's start and end addresses.
34Typically, one would iterate forward. In this case, iterating in reverse is best:
5 -
Analysis of Stanford's "Bit Twiddlin...
Analysis of Stanford's "Bit Twiddling Hacks" (Kinda) 1https://graphics.stanford.edu/~seander/bithacks.html
23Determining if an integer is a power of 2
45```
-
"Best Practices" for 'C' compilation...
"Best Practices" for 'C' compilation, assembly and linkage 1As during development; YAGNI: you ain't gonna need it.
2`gcc` has some cool features to ensure that you're putting out minimal, correct code:
34### ! -g
5If it's available outside your network; don't include debugging symbols with the `-g` flag: it makes it far too easy to reverse engineer.
-
Defending against static analysis
Defending against static analysis 1In the above example, strings are passed to `void handle_exit(str, strlen)` literally. These would be stored in the binary closely to how they are written, and this would make it fairly easy to understand the flow of execution with a little effort.
23A method to harden your program could be:
45Call a `vec8* get_message(enum_msg_code message_code)`,
-
Memory Layout Hardening or '++ASLR'
Memory Layout Hardening or '++ASLR' 1Randomise your struct layout!
23Instead of the following:
4```
5#define VEC8_INITIAL_SIZE 32
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.

