Thread #108252317
File: 1724124941627724.webm (1.1 MB)
1.1 MB WEBM
previous: >>108244624#define __NR_uname 63
https://man7.org/linux/man-pages/man2/uname.2.html
tl;dr:
get your kernel version
it's actually a bit more than just kernel version, thoughstruct utsname {
char sysname[]; /* Operating system name (e.g., "Linux") */
char nodename[]; /* Name within communications network to which the node is attached, if any */
char release[]; /* Operating system release (e.g., "2.6.28") */
char version[]; /* Operating system version */
char machine[]; /* Hardware type identifier */
#ifdef _GNU_SOURCE
char domainname[]; /* NIS or YP domain name */
#endif
};
useful for what it does, and quite literally nothing else lol
if you want to be nice and help keep the thread bumped, rununame -aand post the results ITT. or, if you're feeling adventurous, use the syscall together with a__builtin_dump_structand print it nicely formatted into a struct
relevant resources:man manman syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
42 RepliesView Thread
>>
>>
>>
>>
>>
>>108252521
it's one of my favorite builtins. especially in newer versions of clang, it looks so nice
my biggest complaint is that it doesn't always print out strings correctly, and it prints uintptrs in base 10
>>108252505
i believe proc displays different (but similar) info. there is definitely some overlap, though
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
Linux bazzite 6.17.7-ba25.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 19 05:47:43 UTC 2026 x86_64 GNU/Linux
>>108252688
Python is useful for cyber security as a scripting language. I don't know if it's the only language you should consider though.
>>
>>
File: Bildschirmfoto_20260227_201604.png (20.8 KB)
20.8 KB PNG
uuh well. if they were char pointers clang might try to print them as strings?
>>
>>
>>
>>
>>
>>108252317
any field that starts getting represented by women is a dead field and won't be around in a decade after ai wipes out most white collar work. cybersecurity is done for, start finding work in construction or oil fields.
>>
>>108256276
According to clang documentation you should use printf https://clang.llvm.org/docs/LanguageExtensions.html#builtin-dump-struc t
>>
>>108253177
get someone to consent to it
>>108254665
uggghhhh it's so frustrating when it pulls this shit
>>108255908
we just can't help it :^)
>>
>>
File: 2nd try.png (60.6 KB)
60.6 KB PNG
>>108256276
no, puts doesn't work, complaining about too many arguments.
>>108257416
char pointers werked
>>
>>
>>108261514
yeah okay, that's what it was. really bizarre, right? you'd think a char buffer would be even safer to print than a pointer. who knows why they do the things that they do
but they could at least have the decency to hexdump the buffer
>>
>>
>>
>>
File: crimes.png (41.8 KB)
41.8 KB PNG
>>108263501
look at the type of of sysname etc.char[65] sysname = [some hex number]
in C the brackets would be on the other side of the variable name, so I thought that clang does aways with accurate type information.
What it actually does it print the abstract declarator, followed by the variable name, see picrel
>>
>>
>>
>>
>>108263748
right so. in C, types you define go somewhat unusually to the left AND the right of the variable you're defining.
so an array of pointers to integers in C isint *array[]
notint []*array
as you might expect. Above in >>108254665, the types were listed as char[65], which is why it seemed to me that clang's formatter there disregarded strict allegiance to C typing rules. further experiments in >>108263588 however, concluded that that wasn't the case, and instead clang just prints out the abstract declarator, followed by the variable name.
the abstract declarator is a piece of C grammar, which can be used to describe a type, such as in function prototypes or in the argument of sizeof etc., without an intervening type name.
and it turns out that that is what clang is using when dumping structs.