Last active
February 3, 2022 09:03
-
-
Save kohnakagawa/1daf222f7d924663ccdd8df5cc730aad to your computer and use it in GitHub Desktop.
null-free get_pc example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
int main() { | |
int a; | |
__asm { | |
fldz; | |
fstenv ss : [esp - 0xc]; | |
pop eax; | |
mov a, eax; | |
}; | |
printf("%x\n", a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: https://web.archive.org/web/20131017021753/http://skypher.com/wiki/index.php/Hacking/Shellcode/GetPC