Easiest language to produce a Windows executable to prefix running another executable with system calls?
Date : March 29 2020, 07:55 AM
To fix this issue Visual C# 2008 Express Edition is free comes with a compiler outputs exes C# is a good choice if you have C experience .net currently is the "canonical" Windows platform
|
Spring Boot generates the smallest executable jar package
Tag : spring , By : user126922
Date : March 29 2020, 07:55 AM
this will help You are using spring-boot-maven-plugin to create fat jar. You can avoid using it however your jar won't be executable, meaning you won't be able to do: java -jar myapp.jar
unzip -q myapp.jar -d myapp
java -cp myapp org.springframework.boot.loader.JarLauncher
|
What is the smallest possible Windows (PE) executable?
Tag : windows , By : Novi Indrayani
Date : March 29 2020, 07:55 AM
|
We would like to find the smallest, 3rd-smallest, 5th-smallest and 7th-smallest of n elements in an array
Date : March 29 2020, 07:55 AM
wish helps you Let's iterate through the input array A and on every iteration maintain sorted array smallest containing 7 smallest elements so far: smallest = [INF, INF, INF, INF, INF, INF, INF]
for each Number in A
find the insert position of the Number (if any) in the smallest array with binary
search (3 comparisons)
insert to the smallest if needed (0 comparisons)
|
Smallest executable program (x86-64)
Date : March 29 2020, 07:55 AM
With these it helps Starting from an answer of mine about the "real" entrypoint of an ELF executable on Linux and "raw" syscalls, we can strip it down to bits 64
global _start
_start:
mov di,42 ; only the low byte of the exit code is kept,
; so we can use di instead of the full edi/rdi
xor eax,eax
mov al,60 ; shorter than mov eax,60
syscall ; perform the syscall
66 bf 2a 00 31 c0 b0 3c 0f 05
bits 64
org 0x08048000
ehdr: ; Elf64_Ehdr
db 0x7F, "ELF", 2, 1, 1, 0 ; e_ident
times 8 db 0
dw 2 ; e_type
dw 62 ; e_machine
dd 1 ; e_version
dq _start ; e_entry
dq phdr - $$ ; e_phoff
dq 0 ; e_shoff
dd 0 ; e_flags
dw ehdrsize ; e_ehsize
dw phdrsize ; e_phentsize
dw 1 ; e_phnum
dw 0 ; e_shentsize
dw 0 ; e_shnum
dw 0 ; e_shstrndx
ehdrsize equ $ - ehdr
phdr: ; Elf64_Phdr
dd 1 ; p_type
dd 5 ; p_flags
dq 0 ; p_offset
dq $$ ; p_vaddr
dq $$ ; p_paddr
dq filesize ; p_filesz
dq filesize ; p_memsz
dq 0x1000 ; p_align
phdrsize equ $ - phdr
_start:
mov di,42 ; only the low byte of the exit code is kept,
; so we can use di instead of the full edi/rdi
xor eax,eax
mov al,60 ; shorter than mov eax,60
syscall ; perform the syscall
filesize equ $ - $$
bits 64
org 0x08048000
ehdr: ; Elf64_Ehdr
db 0x7F, "ELF", 2, 1, ; e_ident
_start:
mov di,42 ; only the low byte of the exit code is kept,
; so we can use di instead of the full edi/rdi
xor eax,eax
mov al,60 ; shorter than mov eax,60
syscall ; perform the syscall
dw 2 ; e_type
dw 62 ; e_machine
dd 1 ; e_version
dq _start ; e_entry
dq phdr - $$ ; e_phoff
dq 0 ; e_shoff
dd 0 ; e_flags
dw ehdrsize ; e_ehsize
dw phdrsize ; e_phentsize
phdr: ; Elf64_Phdr
dw 1 ; e_phnum p_type
dw 0 ; e_shentsize
dw 5 ; e_shnum p_flags
dw 0 ; e_shstrndx
ehdrsize equ $ - ehdr
dq 0 ; p_offset
dq $$ ; p_vaddr
dq $$ ; p_paddr
dq filesize ; p_filesz
dq filesize ; p_memsz
dq 0x1000 ; p_align
phdrsize equ $ - phdr
filesize equ $ - $$
|