Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

test capstone

root@tinysec.net edited this page May 23, 2017 · 1 revision
const printf = require("cprintf").printf;
const capstone = require("capstone");


function main(  )
{
	var hCapstone = capstone.open( "CS_ARCH_X86" , "CS_MODE_32" );
	
	capstone.setOption(hCapstone , "CS_OPT_DETAIL" , "CS_OPT_ON" );
	
	var insts = capstone.disasm( hCapstone , "8BFF" , 0x1000000 );
	
	printf( "%s\t%s %s\n" , insts[0].address , insts[0].mnemonic , insts[0].op_str );
	
	capstone.close( hCapstone );

	return 0;
}

if ( !module.parent )
{
	main();
}

todo

Clone this wiki locally