│┐ └│ ▀██▀▀ █ █▀▀▀▀ ▀▀▄▀▀ ▀▀▄▀▀ ┌│ █▄▄▄▄ █▄▄▄▄ █▀▀▀ ▄ ▄▄▀▄▄ ▄▄▀▄▄ │┘ 20220915 by netspooky │┐ └│ .xx is a file format for compiling hex data in a number of formats. ┌│ │┘ This is an x86_64 ELF file that is 82 bytes. Based on p82.3 from https://n0.lol/ebm/4.html │┐ └│ Run "python3 xx.py elf.xx" to build this file! elf.308a30c9.bin ─┘ ┌00000000: │ELFHEADER A───────┐ B┐C┐ D┐E┐ F─────────────────┐ ┌──────────────── └ 7f45 4c46 ffc0 ffc7 b105 48c1 e130 eb04 │.ELF.......H..0. │ │ │ │ │ │ │ 7f45 4c46─│────│────│────│─────────│───────────────────── db 0x7F, "ELF" ffc0─│────│────│─────────│───────────── _start: inc eax ; write syscall ffc7─│────│─────────│───────────────────── inc edi ; fd = STDOUT b105─│─────────│───────────────────── mov cl,0x5 48c1 e130─│───────────────────── shl rcx,0x30 eb04────────────────── jmp ev ┌00000010: │ │ELFHEADER G──┐ H──┐ I───────┐ J─────────────────┐ │ │PRGHEADER │ │ │ │ │ │ │ p_type p_flags │ │ │ │ │ │ │ │ ┌───────┐ ┌──> │ └ 0200 3e00 b203 eb1d 0400 0100 0000 0500 │..>............. │ │ │ │ │ │ 0200─│────│────│────│──────────────────────────────────── dw 0x2 3e00─│────│────│──────────────────────────────────── dw 0x3e b203─│────│──────────────────────────────── ev: mov dl, 0x3 ; length eb1d─│──────────────────────────────────── jmp ehs 0400 0100 0000 0500────────────────── dq 0x05000000010004 ┌00000020: │ │ELFHEADER K─────────────────┐ L─────────────────┐ │ │PRGHEADER │ p_offs │ │ p_vaddr │ │ │ >──┐ ┌─────────────────┐ ┌────────────> │ └ 1a00 0000 0000 0000 0000 0000 0100 0000 │................ │ │ │ 1a00 0000 0000 0000──────│─────────────────────────────── dq 0x1A 0000 0000 0100 0000────────────────── dq 0x100000000 ┌00000030: │ │ELFHEADER M───────┐ N──┐ O──┐ P──┐ Q──┐ R──┐ S──┐ │ │PRGHEADER │ p_paddr│ │ │ │ │ │p_filesz │ │ │ │ >──┐ ┌─────────────────┐ ┌────────────> │ └ 0500 00b0 3cbe 3800 0100 4801 ceeb 0b00 │....<.8...H..... │ │ │ │ │ │ │ │ 0500─│─│────│────────────│──────│────│─────────────────── dw 5 00│────│────────────│──────│────│─────────────────── db 0 b0 3c│────────────│──────│────│────────────── xit: mov al, 0x3C ; exit syscall be 3800 0100─│──────│────│────────────── ehs: mov esi,0x10038 4801 ce│────│─────────────────── add rsi, rcx eb 0b│─────────────────── jmp pal 00────────────────── db 0 ┌00000040: │ │PRGHEADER p_memsz p_align │ │ >──┐ ┌─────────────────┐ ┌────────────> │ └ 0000 4801 ceeb 0b00 0000 4883 ee37 0f05 │..H.......H..7.. │ │ │ │ │ │ │ │ 0000─│──────│────│──│────│─────────│───────────────────── dw 0 4801 ce│────│──│────│─────────│───────────────────── add rsi, rcx eb 0b│──│────│─────────│───────────────────── jmp 0xb 00─│────│─────────│───────────────────── db 0 0000─│─────────│───────────────────── dw 0 4883 ee37─│──────────────── pal: sub rsi, 0x37 ; *buf 0f05────────────────── syscall ┌00000050: │ │ >──┐ │ └ ebe1 │.. │ └──────────────── ebe1───────────────────────────────────────────────────── jmp xit