mirror of
https://github.com/rizinorg/shellforge4.git
synced 2026-11-12 08:31:24 -10:00
18 lines
251 B
C
Executable File
18 lines
251 B
C
Executable File
/*
|
|
* ShellForge example: Return IDT and GDT, enabling virtual machine discovery
|
|
* $Id$
|
|
*/
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int a[4];
|
|
a[0]=a[1]=a[2]=a[3]=0;
|
|
|
|
__asm__("sidt %0 \n"
|
|
"sgdt %1 \n"
|
|
: "=m" (a), "=m" (a[2]));
|
|
write(1,a,16);
|
|
}
|
|
|