Skip to content
/ selfmd5 Public
forked from fengjixuchui/selfmd5

计算自身md5的最小ELF64程序.The minimum ELF64 program to calculate its own md5

License

Notifications You must be signed in to change notification settings

skyZY/selfmd5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

selfmd5

计算自身md5的最小程序,最终大小约676字节.

# ll selfmd5 
-rwxr-xr-x 1 root root 676 4月   9 09:52 selfmd5

编译

  • 下载最新gcc9.3,先写c,然后编译成汇编main-src.s
gcc -S main-src.c  -Os -mavx -msse -mavx2 -ffast-math -fsingle-precision-constant -fno-verbose-asm -fno-unroll-loops -fno-asynchronous-unwind-tables
  • 然后把main.s的依赖libc的部分干掉,换成直接syscall
  • 精简main-src.s的无用代码,编译,并sstrip
./build-asm.sh

About

计算自身md5的最小ELF64程序.The minimum ELF64 program to calculate its own md5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 83.2%
  • Assembly 10.9%
  • Shell 5.9%