flat assembler
Message board for the users of flat assembler.
Index
> Linux > UTF 8 -or- Any even box drawing characters, dont display co |
| Author |
|
|
duanebonas6822 08 Jan 2026, 19:04
Code: Does anybody know about how FASM handles unicode because the s-lang c file states stuff like.... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ typedef struct { unsigned char vt100_char; unsigned char ascii; SLwchar_Type unicode; /* may have an ambiguous width */ SLwchar_Type unicode_narrow; /* has a narrow width */ } ACS_Def_Type; static SLCONST ACS_Def_Type UTF8_ACS_Map[] = { {'+', '>', 0x2192, '>'}, /* RIGHTWARDS ARROW [A] */ {',', '<', 0x2190, '<'}, /* LEFTWARDS ARROW [A] */ {'-', '^', 0x2191, 0x2303}, /* UPWARDS ARROW [A] */ {'.', 'v', 0x2193, 0x2304}, /* DOWNWARDS ARROW [A] */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If i run S-LANG from withing FASM format ELF64 is FASM some how reverting back to its prefered utf8.inc way i dont know.. I think maybe i have to set the terminal to use these specific details SLwchar_Type unicode; /* may have an ambiguous width */ SLwchar_Type unicode_narrow; /* has a narrow width */ If anybody knows anything about how FASM handles or uses these WCHAR width.. I can just only draw boxes with the default lines, i need to change the characters to WIDE CHARACTERS thats the problem im having.. There is a lot of details but its mostly discussing (format PE) - The windows stuff Last edited by duanebonas6822 on 09 Jan 2026, 03:02; edited 1 time in total |
|||
|
|
redsock 08 Jan 2026, 21:05
In the HeavyThing library I wrote ages ago, I implemented all of this by hand. See: https://2ton.com.au/library_as_html/string32.inc.html
That being said, there is nothing special about how fasm handles unicode or wchar_t or how S-Lang deals with it either. Consider the following code: Code: #include <cstdio> #include <cstdint> // sizeof(int) == 4 on x86_64 // from: src/slang.h typedef unsigned int SLwchar_Type; #ifdef PACKED typedef struct { unsigned char vt100_char; unsigned char ascii; SLwchar_Type unicode; /* may have an ambiguous width */ SLwchar_Type unicode_narrow; /* has a narrow width */ } __attribute__((__packed__)) ACS_Def_Type; #else typedef struct { unsigned char vt100_char; unsigned char ascii; SLwchar_Type unicode; /* may have an ambiguous width */ SLwchar_Type unicode_narrow; /* has a narrow width */ } ACS_Def_Type; #endif int main() { ACS_Def_Type a; ACS_Def_Type *b = &a; printf("offset 1: %ld\n", (uint8_t *)&a.vt100_char - (uint8_t *)b); printf("offset 2: %ld\n", (uint8_t *)&a.ascii - (uint8_t *)b); printf("offset 3: %ld\n", (uint8_t *)&a.unicode - (uint8_t *)b); printf("offset 4: %ld\n", (uint8_t *)&a.unicode_narrow - (uint8_t *)b); } Code: offset 1: 0 offset 2: 1 offset 3: 4 offset 4: 8 Code: offset 1: 0 offset 2: 1 offset 3: 2 offset 4: 6 So if you want to interact with S-Lang from fasm, you'll need to only pay attention to how the compiler that produced the S-Lang library actually put the struct together. After a quick look, he isn't using the __packed__ attribute so they are "optimised" aligns as seen in the output above. Also note: the comments in the struct saying "may have an ambiguous width" and "has narrow width" aren't necessarily true, simply because sizeof(SLwchar_Type) is always going to be sizeof(int) ... whether the S-Lang library treats these values differently (by assuming narrow code points for the unicode_narrow variable is irrelevant, because each has a known size and is treated accordingly by the compiler. As an additional example from your UTF8_ACS_Map[] example from C and per the aforementioned offsets that the compiler produces, here's an example with two entries: Code: format ELF64 executable _start: sub rsp, 4096 ; make room on the stack for our slang struct(s) ; populate two example UTF8_ACS_Map[] entries ; {'-', '^', 0x2191, 0x2303}, /* UPWARDS ARROW [A] */ mov byte [rsp], '-' mov byte [rsp+1], '^' mov dword [rsp+4], 0x2191 mov dword [rsp+8], 0x2303 ; {'.', 'v', 0x2193, 0x2304}, /* DOWNWARDS ARROW [A] */ mov byte [rsp+12], '.' mov byte [rsp+13], 'v' mov dword [rsp+16], 0x2193 mov dword [rsp+20], 0x2304 mov eax, 60 ; exit xor edi, edi ; return code syscall ; alternatively, declare them statically, though noting ; our above example on the stack is leaving gap bytes ; uninitialised .same_as_static: db '-', '^', 0, 0 dd 0x2191, 0x2303 db '.', 'v', 0, 0 dd 0x2193, 0x2304 HTH |
|||
|
|
duanebonas6822 08 Jan 2026, 22:27
Code: OMG, Asif i look at that site all of the time. i think i even sent an email. Just my style of writing code is different, U are a well mint coder. What im trying to do basically i do computer security hacking scripts and stuff. I just wanted A TUI type display. Pretty much like NCURSES, But as NCURSES is pretty outdated. I tried to implement NOTCURSES. Was trying to create like a TUI app where i could do remote execve to a remote host but have some kind of TUI that could create a dialog between the execved remote host and back to the window i launch from my machine. I really tried to implement NOTCURSES into in fasm because its about the coolest TUI app out. But because its all C based i cant implement it to even open a window. ncdirect_box then theres ncplane_box. But it uses some hard to understand MACROS to initialize the window. With S-LANG it has its own interpreter so im messing on with that. I can easy draw the boxes but having trouble with WIDE CHARS. I really love your style of coding. Just when i read how big the scripts are. It takes a really skilled programmer to do stuff like that. I just struggle with it when im trying to create a hacking tool but from only (1 .asm file). Im actually going to have a good look at how you have wrote them scripts. But it really is a resourcefully site. I think u did it all manually. God that really does take some concentration. The main things i get stuck on is how to convert or write the C functions to work in assembly. There is only really. Manual, OLD NCURSES, NOTCURSES or S-LANG. So im trying to implement S-LANG now and use (newt), as menus or boxes. Just i wanted my program to have full 24bit Colour. thats why i cant use NCURSES. Like mentioned NOTCURSES is proberbly the best, But can i hell figure out how to even create a box. There is ncdirect_box draws the box but it doesnt draw. Then there is ncplane_box. Ive got that to show output but i just cant figure out: MACROS LIKE THIS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; #define NCCHANNEL_INITIALIZER(r, g, b) \ ; (((uint32_t)r << 16u) + ((uint32_t)g << 8u) + (b) + NC_BGDEFAULT_MASK) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ But hey mate 5 star for the 2tone website its quality. Thanks for the reply, i bet you could write some advanced hacking scripts if you wanted. Top coder .. Very Happy _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 03:01; edited 1 time in total |
|||
|
|
redsock 08 Jan 2026, 22:32
Code: objdump -dx -M intel ./your_c_binary_preferrably_not_optimised gdb also makes it pretty easy to extract static structures during runtime, so if you have C source/debug binary, you can easily just add breakpoints where you want and then extract from the process memory into fasm compatible data. Cheers and Happy Coding |
|||
|
|
duanebonas6822 08 Jan 2026, 23:17
Code: Bloody hell asif you just shot together some code like that. U really do understand the bloody inner workings. Im going to read through your site. Do you think i would be able to implement (NOTCURSES) into FASM because that is what ive been trying to do. (https://notcurses.com/) The main problem is it says to create a box so im obviously trying to load the box via RAX, which other syscalls i use always but notcurses just wont work.. for instance .... i try stuff like this:... # THIS IS HOW I TRY BUT THE WCHAR ARRAY MUST BE WRONG OR SUMMET, # If you ever had some free time to get NOTCURSES to display a box. I would be willing to send you a fee for your time. I just really tried everything to get NOTCURSES to create the TUI. The C macros and getting this thing to load just seems impossible. If you ever had some free time tho to help me get a NOTCURSES window working let me know. Just thinking im implementing the Stack and syscalls all wrong. (£100) If u had any free time lol, Just really want a nice TUI that i can start building on. Not learning C that will take too long, even tho i can get NOTCURSES to work in C straight away. Implementing in FASM. Coz all my scripts are PIC Position Independent Binary. That is why FASM is the best for Hacking stuff, Im gonna create a remote window, that i can revert data to where i can Inject into a remote memory , Was using PTRACE but i decided created a LKM which i can run a Linux Kernel injection command to a remote process. I dont want to rely on reverting data back to say a TMUX shell, wanted my own window that i created. NEWT was an option also, But if NOTCURSES ever works. That is my plan lol # Sorry this thread was about S-LANG, But my main goal was notcurses, it looks beautifull. cheers mate for replying tho. My main script is all syscalls manually defined , 1000s of them like all LibC functions , im going to check your site out tho mate in a min. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mov rdi, nctermtypex mov rsi, 0 mov rdx, 0000000000000012 ; (ncdirect_box1.optionsOR) call [ncdirect_init] mov [ncdirect_init_a], rax xor rdi, rdi mov rax, 0x69 ; (setuid) syscall mov qword [ncdirect_box1.ul], 0x250C mov qword [ncdirect_box1.ur], 0x2510 mov qword [ncdirect_box1.ll], 0x2514 mov qword [ncdirect_box1.lr], 0x2518 mov word [ncdirect_box1.wchars], 0x250C + 0x2510 + 0x2514 + 0x2518 + 0x2500 + 0x2502 mov dword [ncdirect_box1.ylen], 5 mov dword [ncdirect_box1.xlen], 10 mov dword [ncdirect_box1.ctlword], 0 mov rdi, ncdirect_box1 <<-- (THIS IS HOW I TRY RUN SYSCALLS - OR RAX) call [ncdirect_box] mov qword [ncplane_box1.ul], 0x250C mov qword [ncplane_box1.ur], 0x2510 mov qword [ncplane_box1.ll], 0x2514 mov qword [ncplane_box1.lr], 0x2518 mov dword [ncplane_box1.hline], 5 mov dword [ncplane_box1.vline], 10 mov dword [ncplane_box1.ystop], 0 mov dword [ncplane_box1.xstop], 0 mov dword [ncplane_box1.ctlword], 0 mov rdi, ncplane_box1 call [ncplane_box] ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mov rdi, timespec.tv_sec ; Will sleep for 5 seconds xor rsi, rsi ; clear rsi mov rax, 0x23 ; nanosleep syscall ; Works ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mov rdi, [ncdirect_init_a] call [ncdirect_stop] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # I NO MY STRUCTS ARE PROBS WAY WRONG, BUT I TRY STUFF LIKE: ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; Draw a box with its upper-left corner at the current cursor position, having ; dimensions |ylen|x|xlen|. See ncplane_box() for more information. The ; minimum box size is 2x2, and it cannot be drawn off-screen. |wchars| is an ; array of 6 wide characters: UL, UR, LL, LR, HL, VL ; ; API int ncdirect_box(struct ncdirect* n, uint64_t ul, uint64_t ur, ; uint64_t ll, uint64_t lr, const wchar_t* wchars, ; unsigned ylen, unsigned xlen, unsigned ctlword) ; __attribute__ ((nonnull (1, 6))); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ---------------------------------------------------------------------------------------------------------------------------------- ncdirect_box1: .ul: dq 8 ; (uint64_t) .ur: dq 8 ; (uint64_t) .ll: dq 8 ; (uint64_t) .lr: dq 8 ; (uint64_t) .wchars dw 12 ; (wchar_t = array of 6 wide characters: UL, UR, LL, LR, HL, VL) .ylen dd 4 ; (unsigned) .xlen dd 4 ; (unsigned) .ctlword dd 4 ; (unsigned) ncdirect_box1_len = $ - ncdirect_box1 ; NCBOXLIGHT_A du "┌┐└┘─│" <<-- (I NO WRONG JUST WHAT BEEN TRYING - LOL) ; NCBOXLIGHT_TL dw "0x250C" ; (┌) <<-- (AND STUFF LIKE THESE DONT WORK) ; NCBOXLIGHT_TR dw "0x2510" ; (┐) ; NCBOXLIGHT_LL dw "0x2514" ; (└) ; NCBOXLIGHT_LR dw "0x2518" ; (┘) ; NCBOXLIGHT_H dw "0x2500" ; (─) ; NCBOXLIGHT_V dw "0x2502" ; (│) ncdirect_init_a dq 8 ------------------------------------------------------------------------------------------------------------------------------------- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Draw a box with its upper-left corner at the current cursor position, and its ; lower-right corner at 'ystop'x'xstop'. The 6 cells provided are used to draw the ; upper-left, ur, ll, and lr corners, then the horizontal and vertical lines. ; 'ctlword' is defined in the least significant byte, where bits [7, 4] are a ; gradient mask, and [3, 0] are a border mask: ; * 7, 3: top ; * 6, 2: right ; * 5, 1: bottom ; * 4, 0: left ; If the gradient bit is not set, the styling from the hl/vl cells is used for ; the horizontal and vertical lines, respectively. If the gradient bit is set, ; the color is linearly interpolated between the two relevant corner cells. ; ; By default, vertexes are drawn whether their connecting edges are drawn or ; not. The value of the bits corresponding to NCBOXCORNER_MASK control this, ; and are interpreted as the number of connecting edges necessary to draw a ; given corner. At 0 (the default), corners are always drawn. At 3, corners ; are never drawn (since at most 2 edges can touch a box's corner) ; ; API int ncplane_box(struct ncplane* n, const nccell* ul, const nccell* ur, ; const nccell* ll, const nccell* lr, const nccell* hline, ; const nccell* vline, unsigned ystop, unsigned xstop, ; unsigned ctlword) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ncplane_box1: .ul dq 8 ; (nccell) .ur dq 8 ; (nccell) .ll dq 8 ; (nccell) .lr dq 8 ; (nccell) .hline dd 4 ; (nccell) .vline dd 4 ; (nccell) .ystop dd 4 ; (unsigned) .xstop dd 4 ; (unsigned) .ctlword dd 4 ; (unsigned) ncplane_box1_len = $ - ncplane_box1 ; ncplane_box (ncplane_box1, ul, ur, ll, lr, hline, vline, ystop, xstop, ctlword) ------------------------------------------------------------------------------------------------------------------------------------- _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 03:01; edited 2 times in total |
|||
|
|
duanebonas6822 08 Jan 2026, 23:40
Code: God i'm looking at your code. There is no way i'm going to be to write a program like that (its too advanced). I wouldn't even know where to start. LOL - really is astonishing mate ~~~~~~~~~ added ~~~~~~~~~ I see how you initiate the stack but . Like say with the notcurses stuff, I assume like most other libc calls etc etc. I have to load the STRUCT with the BOX CHARACTERS + WCHAR ARRAY into the RAX REGISTER and the syscall should just work.. So by your code i could also get the Notcurses working by loading the details like you do to the stack correct.. So i see how you have loaded the characters like this: # (mov byte [rsp+1], '^') <<-- (COULD I LOAD WCHARS LIKE THIS - BUT THERE WORDS) # # I THINK IM TRYING TO LOAD THE STRUCT THE WRONG WAY BASICALLY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub rsp, 4096 ; make room on the stack for our slang struct(s) ; populate two example UTF8_ACS_Map[] entries ; {'-', '^', 0x2191, 0x2303}, /* UPWARDS ARROW [A] */ mov byte [rsp], '-' mov byte [rsp+1], '^' mov dword [rsp+4], 0x2191 mov dword [rsp+8], 0x2303 ; {'.', 'v', 0x2193, 0x2304}, /* DOWNWARDS ARROW [A] */ mov byte [rsp+12], '.' mov byte [rsp+13], 'v' mov dword [rsp+16], 0x2193 mov dword [rsp+20], 0x2304 mov eax, 60 ; exit xor edi, edi ; return code syscall ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 03:00; edited 1 time in total |
|||
|
|
redsock 09 Jan 2026, 00:10
So it looks like you have some groundwork that you need to do IMO.
Just as a quick example, from the notcurses documentation, this is the function header you are attempting: Code: int ncdirect_box(struct ncdirect* n, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, const wchar_t* wchars, int ylen, int xlen, unsigned ctlword); If you read through Agner Fog's calling conventions: https://www.agner.org/optimize/calling_conventions.pdf you'll see that the first 6 parameters go into registers, and then additional parameters onto the stack. You should ideally start with C, compile with -O0 -g3, and then examine your working C example/demo to shortcut figuring all this out yourself. Also, in your pasted code Code: mov word [ncdirect_box1.wchars], 0x250C + 0x2510 + 0x2514 + 0x2518 + 0x2500 + 0x2502 Code: mov word [ncdirect_box1.wchars], 0xde4a The article I wrote years ago re: gcc/c++ integration has lots of useful information (in addition to Agner Fog's awesome resources as well): https://2ton.com.au/rants_and_musings/gcc_integration.html |
|||
|
|
duanebonas6822 09 Jan 2026, 01:21
Code: Thanks for the reply mate really appreciate it, im gonna look at the links you provided. You really do know your stuff, Yeah i think i need to figure out the calling conversions a little better, Just its when you read the C headers, As the data is miles differant, i get confused as of how to convert it to assembley . Ill do a lot of reading. But yeah Notcurses definatly can make a TUI look good. And the work that nick black has put in is great. He must really know his stuff. I f i have any questions ill try ask you. I dont know how u figure out all them crazy functions u are able to do. Its just really advanced stuff, I think i need to concentrate a bit more on structuring my programs. I have never used them .inc file extensions u use. Like the added functions i mean. I normally just try to implement my FASM from a main file. But as i have hundreds of LibC + ncurses libraries statically compiled in, managing all the C macros and header Variables , I have to go through the C .h (headers) and manually add all the header details to the top of my script. Id be better making an include file that adds the headers seperate. Also yeah that main syscall just says i need to add an Array of 6 WCHARS mov word [ncdirect_box1.wchars], 0x250C + 0x2510 + 0x2514 + 0x2518 + 0x2500 + 0x2502 # So is this the only way i could do this , or is there an easier way, the du + dw, shouldnt this be (du - tho) # 1 more thing if you read # My fasm binary is manually (statically compiled as PIE) # So im not using a linker, i cant see this having an effect as calling convention will be same # RDI, RSI, RDX # RCX <<-- (DONT NORMALL USE) # R8, R9 ETC ETC Many Thanks bud _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 02:59; edited 1 time in total |
|||
|
|
redsock 09 Jan 2026, 02:04
Friday afternoon here and just about beer-o-clock
I haven't looked at the notcurses code directly, but normally if C code requires an array to unsighed short or uint16_t, they specify it as a pointer: Code: unsigned short *wchars; Code: .my_wchars: dw 0x205c, 0x2510, 0x2514, 0x2518, 0x2500, 0x2502 Code: mov qword [ncdirect_box.wchars], .my_wchars Calling convention is the same for all Linux ABI standard goods. Outside the scope of the kernel syscalls, you are ofc free to use whatever calling conventions you want. But interacting with C/C++/whatever external tooling means you'll need to adhere to the standard ABI for the platform you are working with, ALWAYS. Lastly, if you aren't using a linker, how are you linking the external C libraries to your code? |
|||
|
|
duanebonas6822 09 Jan 2026, 02:15
Code: You are a good man, I have got half of the box to display. I added it similar to my PTY code but still messing with it. # This was how i structured some of my other code, its just the wchars what gets confusing lol ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mov rdi, FDMasterM1 ; (int *amaster) = (FDMasterM1 rd Cool mov rsi, FDSlaveS1 ; (int *aslave) = (FDSlaveS1 rd Cool mov rdx, ptsnamebuff ; (char *name) = (If not NULL, the file of the slave is ret in name) mov rcx, TermiosOPTY ; (termios *termp) mov r8, WinsizeOPTY ; (winsize *winp) call [openpty] ; (openpty) -not- (posix_openpty) - (*!*) mov r12, rax ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Least i got it displaying summet, god how long did it take you to write some of the code on your # site, just downloaded (HeavyThing-1.24), So im looking through the excellency lol, where u from # THE USA ?, im in the United Kingdom good old Britain, The best thing about the FASM forum # is its pretty active with loads sharing ideas, Once ive figured this TUI stuff out, Im doing # Process Injection with stuff like, PTRACE, Also im well into Linux Kernel Modules _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 02:59; edited 1 time in total |
|||
|
|
duanebonas6822 09 Jan 2026, 02:18
I dont know why the FASM syntax formatter, I allign the quotes but when the message is displayed it always ends up non format lol weird, Just hard to read
# And if i get this working , ill owe u a beer mate HaHa _________________ d.bonas |
|||
|
|
revolution 09 Jan 2026, 02:28
duanebonas6822 wrote: I dont know why the FASM syntax formatter, I allign the quotes but when the message is displayed it always ends up non format lol weird, Just hard to read Code: I'm inside a code tag |
|||
|
|
duanebonas6822 09 Jan 2026, 02:34
Code: format ELF64 executable use64 entry start -------------------------------------------------------------------------------------------------------------------------------- Elf64_Sym _ncdirect_printf_aligned-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 Elf64_Sym _ncdirect_detected_terminal-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 Elf64_Sym _ncdirect_hline_interp-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 Elf64_Sym _ncdirect_vline_interp-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 Elf64_Sym _ncdirect_box-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 -------------------------------------------------------------------------------------------------------------------------------- _ncdirect_printf_aligned db "ncdirect_printf_aligned", 0 _ncdirect_detected_terminal db "ncdirect_detected_terminal", 0 _ncdirect_hline_interp db "ncdirect_hline_interp", 0 _ncdirect_vline_interp db "ncdirect_vline_interp", 0 _ncdirect_box db "ncdirect_box", 0 ------------------------------------------------------------------------------------------------------------------------------- Elf64_Rela ncdirect_printf_aligned,498,R_X86_64_64 Elf64_Rela ncdirect_detected_terminal,499,R_X86_64_64 Elf64_Rela ncdirect_hline_interp,500,R_X86_64_64 Elf64_Rela ncdirect_vline_interp,501,R_X86_64_64 Elf64_Rela ncdirect_box,502,R_X86_64_64 -------------------------------------------------------------------------------------------------------------------------------- ncdirect_printf_aligned dq ? ncdirect_detected_terminal dq ? ncdirect_hline_interp dq ? ncdirect_vline_interp dq ? ncdirect_box dq ? -------------------------------------------------------------------------------------------------------------------------------- # Like this then, # # fasm shellcode40.asm # # Thats it, creates a PIE binary ohh and the librays like this -------------------------------------------------------------------------------------------------------------------------------- dq DT_NEEDED,_libSDL2_net - strtab dq DT_NEEDED,_libSDL3 - strtab dq DT_NEEDED,_libSDL3_ttf - strtab dq DT_NEEDED,_libSDL3_image - strtab dq DT_NEEDED,_libSDL3_sound - strtab dq DT_NEEDED,_libSDL3_mixer - strtab dq DT_NEEDED,_libtickit - strtab ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~: ;; dq DT_INIT, ; (ADDR-OF-A-FUNCTION-TO-CALL-ON-INITIALIZATION) ;; dq DT_FINI, ; (ADDR-OF-A-FUNCTION-TO-CALL-ON-FINITIALIZATION) ;; dq DT_INIT_ARRAY, ; (The address of an array of pointers to initialization functions) + DT_INIT_ARRAYSZ ;; dq DT_FINI_ARRAY, ; (The address of an array of pointers to termination functions) + DT_FINI_ARRAYSZ ;; dq DT_INIT_ARRAYSZ, ; + ;; dq DT_FINI_ARRAYSZ, ; + ;; dq DT_JMPREL, 0x0404756 ; *A* + (JUST PLT)-(The address of relocation entries associated solely with the PLT) + (DT_PLTRELSZ) + (DT_PLTREL) ;; dq DT_PLTREL, rva rela ; *T* + (.got.plt) = (Indicates the type of relocation entry to which the procedure linkage table refers - DT_RELA) ;; dq DT_PLTRELSZ, relasz ; *SZ* + (The total size, in bytes, of the relocation entries associated with the procedure linkage table) ;; dq DT_PLTGOT, 0x0404856 ; *A* + (An address associated with the procedure linkage table or the global offset table) dq DT_STRTAB, strtab ; *T* + (DYN-STR) dq DT_HASH,hash ; *T* + (The address of the symbol hash table) dq DT_SYMTAB, symtab ; *T* + (DYN-SYM + The address of the symbol table) dq DT_STRSZ,strsz ; *T* + (The address of the string table. Symbol names, dependency names) dq DT_SYMENT,sizeof.Elf64_Sym1 ; - Elf64_Rela --** dq DT_RELA, rela ; *T* +(ALL RELOCATIONS) dq DT_RELASZ,relasz ; dq DT_RELAENT,sizeof.Elf64_Rela1 ; (The size, in bytes, of the DT_RELA relocation entry) - Elf64_Rela --** ;; dq DF_TEXTREL, ; (superseded by the DF_TEXTREL flag) ;; dq DT_TEXTREL, ; (Indicates that one or more relocation entries might request modifications to a non-writable segment) ;; dq DT_RPATH, ; (The DT_STRTAB string table offset of a null-terminated library search path string) ;; dq DT_SONAME, ; (The DT_STRTAB string table offset of a null-terminated string, identifying the name of the shared object) ;; dq DT_DEBUG, ; (Used for debugging) ;; dq DT_SYMBOLIC, ; (Indicates the object contains symbolic bindings that were applied during its link-edit) ;; dq DF_SYMBOLIC, 0x00000002 ; (Symbol resolutions starts here) ;; dq DT_BIND_NOW,1 ; (Indicates that all relocations for this object must be processed before returning control to the program) ;; dq DF_BIND_NOW, 0x00000008 : (No lazy binding for this object) dq DT_FLAGS,DF_BIND_NOW or DF_TEXTREL ; dq DT_FLAGS_1,DF_1_NOW or DF_1_PIE ; ;; dq DT_SYMINFO, ; (The address of the symbol information table) + DT_SYMINENT and DT_SYMINSZ ;; dq DT_SYMINENT, ; (The size, in bytes, of the DT_SYMINFO information entry) ;; dq DT_SYMINSZ, ; (The total size, in bytes, of the DT_SYMINFO table) ;; dq DT_VERDEF, ; (The address of the version definition table) + DT_STRTAB + DT_VERDEFNUM ;; dq DT_VERDEFNUM, ; (The number of entries in the DT_VERDEF table) ;; dq DT_VERNEED, ; (The address of the version dependency table) + DT_STRTA + DT_VERNEEDNUM ;; dq DT_VERNEEDNUM, ; (The number of entries in the DT_VERNEEDNUM table) ;; dq DT_RELACOUNT, ; (Indicates that all Elf64_Rela RELATIVE reloc have been concatenated together + specifies the RELATIVE relocation count) ;; dq DT_AUXILIARY, ; (The DT_STRTAB string table offset of a null-terminated string that names one or more auxiliary filtees) ;; dq DT_FILTER, ; (The DT_STRTAB string table offset of a null-terminated string that names one or more standard filtees) ;; dq DT_CHECKSUM, ; (A simple checksum of selected sections of the object) ;; dq DT_MOVEENT, ; (The size, in bytes, of the DT_MOVETAB move entries) ;; dq DT_MOVESZ, ; (The total size, in bytes, of the DT_MOVETAB table) ;; dq DT_MOVETAB, ; (The address of a move table. This element requires that the DT_MOVEENT and DT_MOVESZ elements also be present) ;; dq DT_CONFIG, ; (The DT_STRTAB string table offset of a null-terminated string defining a configuration file) ;; dq DT_DEPAUDIT, ; (The DT_STRTAB string table offset of a null-terminated string defining one or more audit libraries) ;; dq DT_AUDIT, ; (The DT_STRTAB string table offset of a null-terminated string defining one or more audit libraries) ;; dq DT_FLAGS_1, ; (Flag values specific to this object) ;; dq DT_FEATURE_1, ; (Feature values specific to this object) ;; dq DT_VALRNGLO - DT_VALRNGHI, ; (Values in this inclusive range use the d_un.d_val field of the dynamic structure) ;; dq DT_ADDRRNGLO - DT_ADDRRNGHI, ; (Values in this inclusive range use the d_un.d_ptr field of the dynamic structure) ;; dq DT_SPARC_REGISTER, ; (Index of STT_SPARC_REGISTER symbol within the DT_SYMTAB symbol table + 1 entry for every STT_SPARC_REGISTER symbol) ;; dq DT_LOPROC - DT_HIPROC, ; (Values in this inclusive range are reserved for processor-specific semantics) ;; dq DT_PLTPADSZ, 0x6ffffdf9 ; () ;; dq DT_POSFLAG_1, 0x6ffffdfd ; (Flags for DT_* entries, effecting the following DT_* entry) ;; dq DT_SYMINSZ, 0x6ffffdfe ; (Size of syminfo table (in bytes) ;; dq DT_SYMINENT, 0x6ffffdff ; (Entry size of syminfo) ;; dq DT_VALRNGHI, 0x6ffffdff ; () ;; dq DT_VALTAGIDX(tag) + (DT_VALRNGHI - (tag)) ; (Reverse order!) ;; dq DT_VALNUM, 12 ; () ;; dq DT_ADDRRNGLO, 0x6ffffe00 ; () ;; dq DT_GNU_HASH, 0x6ffffef5 ; (GNU-style hash table) ;; dq DT_TLSDESC_PLT, 0x6ffffef6 ; () ;; dq DT_TLSDESC_GOT, 0x6ffffef7 ; () ;; dq DT_GNU_CONFLICT, 0x6ffffef8 ; (Start of conflict section) ;; dq DT_GNU_LIBLIST, 0x6ffffef9 ; (Library list) ;; dq DT_CONFIG, 0x6ffffefa ; (Configuration information) ;; dq DT_DEPAUDIT, 0x6ffffefb ; (Dependency auditing) ;; dq DT_AUDIT, 0x6ffffefc ; (Object auditing) ;; dq DT_PLTPAD, 0x6ffffefd ; (PLT padding) ;; dq DT_MOVETAB, 0x6ffffefe ; (Move table) ;; dq DT_SYMINFO, 0x6ffffeff ; (Syminfo table) ;; dq DT_ADDRRNGHI, 0x6ffffeff ; () ;; dq DT_ADDRTAGIDX(tag) + (DT_ADDRRNGHI (tag)) ; (Reverse order!) ;; dq DT_ADDRNUM, 11 ; () ;; dq DT_FLAGS_1, 0x6ffffffb ; State flags, see DF_1_* below ;; dq DT_VERDEF, 0x6ffffffc ; Address of version definition table ;; dq DT_VERDEFNUM, 0x6ffffffd ; Number of version definitions ;; dq DT_VERNEED, 0x6ffffffe ; Address of table with needed versions ;; dq DT_VERNEEDNUM, 0x6fffffff ; Number of needed versions ;; dq DT_VERSIONTAGIDX(tag) ; (Reverse order!) ;; dq (DT_VERNEEDNUM (tag)) ; (Reverse order!) ;; dq DT_VERSIONTAGNUM, 16 ; () ;; dq DT_AUXILIARY, 0x7ffffffd ; (Shared object to load before self) <<-- (SUN -!-) ;; dq DT_FILTER, 0x7fffffff ; (Shared object to get values from) <<-- (SUN -!-) ;; dq DT_EXTRATAGIDX(tag) ; + ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) <<-- (SUN -!-) ;; dq DT_EXTRANUM, 3 ; () ;; dq DF_ORIGIN, ; (Indicates that the object requires $ORIGIN processing) ;; dq DF_STATIC_TLS, ; (Indicates that the object contains code using a static thread-local storage scheme) ;; dq DF_1_NOW, ; (Indicates that all relocations for this object must be processed before returning control to the program) ;; dq DF_1_GLOBAL, 0x00000002 ; (Set RTLD_GLOBAL for this object) ;; dq DF_1_GROUP, ; (Indicates that the object is a member of a group. This flag is recorded in the object using the link-editor's -B group option) ;; dq DF_1_NODELETE, ; (Indicates that the object cannot be deleted from a process) ;; dq DF_1_LOADFLTR, ; (Meaningful only for filters. Indicates that all associated filtees be processed immediately) ;; dq DF_1_INITFIRST, ; (Indicates that this object's initialization section be run before any other objects loaded with it) ;; dq DF_1_NOOPEN, ; (Indicates that the object cannot be added to a running process with dlopen(3DL) ;; dq DF_1_ORIGIN, ; (Indicates that the object requires $ORIGIN processing) ;; dq DF_1_DIRECT, ; (Indicates that the object should use direct binding information) ;; dq DF_1_TRANS, 0x00000200 ; () ;; dq DF_1_INTERPOSE, ; (Indicates that the objects symbol table is to interpose before all symbols except the primary load object) ;; dq DF_1_NODEFLIB, ; (Indicates that the search for dependencies of this object ignores any default library search paths) ;; dq DF_1_NODUMP, ; (Indicates that this object is not dumped by dldump(3DL) ;; dq DF_1_CONFALT, ; (Identifies this object as a configuration alternative object generated by crle(1) ;; dq DF_1_ENDFILTEE, ; (Meaningful only for filtees. Terminates a filters search for any further filtees) ;; dq DF_1_DISPRELDNE, ; (Indicates that this object has displacement relocations applied) ;; dq DF_1_DISPRELPND, ; (Indicates that this object has displacement relocations pending) ;; dq DF_1_NODIRECT, ; (Indicates that this object contains symbols that can not be directly bound to) ;; dq DF_1_IGNMULDEF, 0x00040000 ; () ;; dq DF_1_NOKSYMS, 0x00080000 ; () ;; dq DF_1_NOHDR, 0x00100000 ; () ;; dq DF_1_EDITED, 0x00200000 ; (Object is modified after built) ;; dq DF_1_NORELOC, 0x00400000 ; () ;; dq DF_1_SYMINTPOSE, 0x00800000 ; (Object has individual interposers) ;; dq DF_1_GLOBAUDIT, 0x01000000 ; (Global auditing required) ;; dq DF_1_SINGLETON, 0x02000000 ; (Singleton symbols are used) ;; dq DF_1_STUB, 0x04000000 ; () ;; dq DF_1_PIE, 0x08000000 ; () ;; dq DF_1_KMOD, 0x10000000 ; () ;; dq DF_1_WEAKFILTER, 0x20000000 ; () ;; dq DF_1_NOCOMMON, 0x40000000 ; () ;; dq DF_P1_LAZYLOAD, 0x00000001 ; (Identifies the following DT_NEEDED entry as an object to be lazy loaded) ;; dq DF_P1_GROUPPERM, 0x00000002 ; (Identifies the following DT_NEEDED entry as an object to be loaded as a group) ;; dq DTF_1_PARINIT, 0x00000001 ; (Indicates that the object requires partial initialization) ;; dq DTF_1_CONFEXP, 0x00000002 ; (Identifies this object as a configuration alternative object generated by crle(1) ;; dq VER_DEF_NONE, 0 ; (No version) ;; dq VER_DEF_CURRENT, 1 ; (Current version) ;; dq VER_DEF_NUM, 2 ; (Given version number) ;; dq VER_FLG_BASE, 0x1 ; (Version definition of file itself) ;; dq VER_FLG_WEAK, 0x2 ; (Weak version identifier) ;; dq VER_NDX_LOCAL, 0 ; (Symbol is local) ;; dq VER_NDX_GLOBAL, 1 ; (Symbol is global) ;; dq VER_NDX_LORESERVE, 0xff00 ; (Beginning of reserved entries) ;; dq VER_NDX_ELIMINATE, 0xff01 ; (Symbol is to be eliminated) ;; dq VER_NEED_NONE, 0 ; (No version) ;; dq VER_NEED_CURRENT, 1 ; (Current version) ;; dq VER_NEED_NUM, 2 ; (Given version number) ;; dq VER_FLG_WEAK, 0x2 ; (Weak version identifier) dq DT_NULL,0 ; (NULL) ;#sizeof.Elf64_Sym1 = $-$$ ;#sizeof.Elf64_Rela2 = $ - sizeof.Elf64_Sym2 segment readable writeable ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*SYMTAB*~~>> symtab: ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*SYMTAB*~~>> -------------------------------------------------------------------------------------------------------------------------------- # BASICALLY FEW PARTS ITS A SCRIPT WITH NEARLY EVERY LIBC CALL INCLUDED # # CURL # IOURING # READLINE # NCURSES # NOTCURSES # S-LANG # # SO ITS LIKE A MASTER BINARY THAT I CAN CALL EVERYTHING FROM # JUST THE HEADER FILE IS ALSO BIG # # I DONT KNOW HOW TO UPLOAD A FILE SO U COULD OPEN IT # # ONLY THING U WOULD NEED TO DO IS EXCLUDE OR RENAME STUFF LIKE # (CURL - LIBRARY VERSIONS + CROSS OUT STUFF YOU DONT WANT TO LOAD) -------------------------------------------------------------------------------------------------------------------------------- # THIS IS JUST THE MAIN PARTS SO U CAN GET AN IDEA OF HOW IT LOADS # U WILL KNOW BY LOOKING EVERYTHING IS RELA MASSIVE # # readelf -r --use-dynamic # (static relas for everything took ages to add it all) -------------------------------------------------------------------------------------------------------------------------------- _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 02:57; edited 1 time in total |
|||
|
|
duanebonas6822 09 Jan 2026, 02:41
Code: ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0x44ac34 Start of program headers: 64 (bytes into file) Start of section headers: 0 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 6 Size of section headers: 64 (bytes) Number of section headers: 0 Section header string table index: 0 There are no sections in this file. There are no section groups in this file. Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x00000000000027f6 0x00000000000027f6 RWE 0x1000 INTERP 0x00000000000027f6 0x00000000004037f6 0x00000000004037f6 0x000000000000001c 0x000000000000001c R 0x1 [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] DYNAMIC 0x0000000000002812 0x0000000000403812 0x0000000000403812 0x0000000000000780 0x0000000000000780 R 0x1 LOAD 0x00000000000027f6 0x00000000004037f6 0x00000000004037f6 0x000000000004643e 0x000000000004643e RW 0x1000 LOAD 0x0000000000048c34 0x000000000044ac34 0x000000000044ac34 0x000000000000021c 0x000000000000021c RWE 0x1000 LOAD 0x0000000000048e50 0x000000000044be50 0x000000000044be50 0x00000000000465fc 0x000000000004f380 RWE 0x1000 Dynamic section at offset 0x2812 contains 120 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libgstreamer-1.0.so.0.2610.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpkgconf.so.7.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libunistring.so.5.2.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libgpm.so.2.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libffmpegthumbnailer.so.4.16.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/liburing.so.2.13] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/liburing-ffi.so.2.13] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libreadline.so.8.3] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/guile/3.0/extensions/guile-readline.so.0.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libssh.so.4.10.3] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libedit.so.0.0.75] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libqrcodegen.so.1.8.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libOpenImageIO.so.3.1.8] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libOpenImageIO_Util.so.3.1.8] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libcurl.so.4.8.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libcap.so.2.77] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcap.so.1.10.5] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libcap-ng.so.0.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpam.so.0.85.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libtermcap.so.1.3.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libtinfo.so.6] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libutil.so.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/sudo/libsudo_util.so.0.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libavutil.so.60.8.100] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libmemcachedutil.so.2.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libtevent-util.so.0.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libevent-2.1.so.7.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libevent_core-2.1.so.7.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libevent_extra-2.1.so.7.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libevent_openssl-2.1.so.7.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libevent_pthreads-2.1.so.7.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libvte-2.91-gtk4.so.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libvte-2.91.so.0.8200.2] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libavcodec.so.62.11.100] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/liblua.so.5.4.8] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libva-x11.so.2.2200.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libxkbcommon-x11.so.0.13.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libncursesw.so.6.5] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libformw.so.6.5] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libmenuw.so.6.5] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpanelw.so.6.5] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libnotcurses-core.so.3.0.17] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libnotcurses-ffi.so.3.0.17] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libnotcurses++.so.3.0.17] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libnotcurses.so.3.0.17] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpng16.so.16.53.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libz.so.1.3.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libfreetype.so.6.20.4] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libgobject-2.0.so.0.8600.3] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSM.so.6.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libICE.so.6.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXi.so.6.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXrender.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXrandr.so.2.2.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXfixes.so.3.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXcursor.so.1.0.2] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXinerama.so.1.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libfontconfig.so.1.16.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXext.so.6.4.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libX11.so.6.4.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libstdc++.so.6.0.34] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libbz2.so.1.0.8] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libharfbuzz.so.0.61230.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libbrotlidec.so.1.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libuuid.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libxml2.so.16.1.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libxcb.so.1.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libgraphite2.so.3.2.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libbrotlicommon.so.1.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/liblzma.so.5.8.2] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libXau.so.6.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcre.so.1.2.13] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcre2-16.so.0.15.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcre2-32.so.0.15.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcre2-8.so.0.15.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpcre2-posix.so.3.0.7] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/openssl-1.1/libcrypto.so] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libaudit.so.1.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglib-2.0.so.0.8600.3] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglibmm-2.4.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglibmm-2.68.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglibmm_generate_extra_defs-2.4.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglibmm_generate_extra_defs-2.68.so.1.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libbpf.so.1.6.2] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/librte_bpf.so.26.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libsfbpf.so.0.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/xtables/libxt_bpf.so] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libxdp.so.1.5.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libcc1.so.0.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libbcc.so.0.35.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libodbccr.so.2.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libpfm.so.4.10.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libglslang.so.16.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libslang.so.2.3.3] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libnewt.so.0.52.25] 0x0000000000000001 (NEEDED) Shared library: [/usr/local/lib/libSDL3_gfx.so.1.0.1] 0x0000000000000001 (NEEDED) Shared library: [/usr/local/lib/libSDL2_net-2.0.so.0.200.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSDL3.so.0.3.7] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSDL3_ttf.so.0.2.2] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSDL3_image.so.0.3.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSDL3_sound.so.0.0.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/lib/libSDL3_mixer.so.0.1.0] 0x0000000000000001 (NEEDED) Shared library: [/usr/local/lib/libtickit.so.3.0.0] 0x0000000000000005 (STRTAB) 0x41ae6a 0x0000000000000004 (HASH) 0x445eeb 0x0000000000000006 (SYMTAB) 0x403f92 0x000000000000000a (STRSZ) 82369 (bytes) 0x000000000000000b (SYMENT) 41 (bytes) 0x0000000000000007 (RELA) 0x42f02b 0x0000000000000008 (RELASZ) 93888 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000000000001e (FLAGS) TEXTREL BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x0000000000000000 (NULL) 0x0 _________________ d.bonas Last edited by duanebonas6822 on 09 Jan 2026, 02:58; edited 1 time in total |
|||
|
|
duanebonas6822 09 Jan 2026, 02:48
Code: Ohh yess by that last comment i have got the box to display with correct edges, it was definatly that wchar struct, well ive got it half way there, off to bed but ill let u no mate. I cant believe it was summet as simple as that. NOTCURSES seems to be loading these wcars arrays with dw just fine, I dont know why S-LANG has a problem, But id prefer Notcurses anyway. ill let u no . Thanks _________________ d.bonas |
|||
|
|
duanebonas6822 09 Jan 2026, 04:42
##########################################################################
# JUST A FEW MACROS ANOTHER USER SUPPLIED ME ON THE WAY NOTCURSES # INITIALIZES, THE INITIALIZATION MACRO THINK IT WILL BE NEEDED # ########################################################################### Code: ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; #define NCCHANNEL_INITIALIZER(r, g, b) \ ; (((uint32_t)r << 16u) + ((uint32_t)g << 8u) + (b) + NC_BGDEFAULT_MASK) ; ;*(If all the arguments are constants then we could simply use) ; ; macro NCCHANNEL_INITIALIZER dst, r, g, b ; mov dst, ( (r shl 16) + (g shl _________________ d.bonas |
|||
|
|
duanebonas6822 09 Jan 2026, 08:15
Code: Hi mate, Just me again, U no what ive been reading all night, and i finally realize what i think i should do. Coz ive been running more simple syscalls for ages, I finally have a picture of what im doing wrong: (1) = I'm populating the struct members OK - (well nearly apart from WCHARS) (2 ) = Im thinking i can just run the function with the struct populated alone (3) = I normally have no problems running stuff like printf - etc etc (4) = I no what u mean now, i have to initialize the stack correctly (5) = So where you were doing stuff like (*) = mov byte [rsp+1], '^' (6) = I need to use registers like , rbp, rsp, ax, dx, (registers) (7) = Just the RSP is it the stack pointer (need to point it or increment it with data) (8) = Looking at your code, (be better making little functions like you have) (9) = Functions that have pointers and point the stack to that data # Im going to sleep but i ran the ncdirect_box with only 7 Arguments # # And i got loads of gibberish, (WHICH I NEVER BEFORE) # # That must mean some of the data is correct (*) = If you could give me any good tips or tricks u might use in regards to (RBP, RSP) (*) = U no what i mean, so i use RAX to load or read data , then some how load the data (*) = Back to the stack in the right order to make the system call work, Its finally clicked ....!!!! # I'll let u know but once ive got the hang , all other system calls will be similar, u no what i mean.. # # Just 1 thing i might need u to look at, is the NCCHANNEL_INITIALIZER macro, the 1 that lad gave # me doenst work, im gonna read up on macros, But that initializer isnt a syscall, so i cant call it ?? _________________ d.bonas |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.