Skip to content

Instantly share code, notes, and snippets.

@plowsec
Created July 21, 2022 12:40
Show Gist options
  • Select an option

  • Save plowsec/72c88bc8e450749ba0f0a54e5616a77f to your computer and use it in GitHub Desktop.

Select an option

Save plowsec/72c88bc8e450749ba0f0a54e5616a77f to your computer and use it in GitHub Desktop.
Get all the functions addresses and names from an IDB
auto func,i;
func = NextFunction(0);
while ( func != BADADDR )
{
Message("start = 0x%08x name = %s\n" , func , GetFunctionName(func));
func = NextFunction(func);
}
@plowsec

plowsec commented Jul 21, 2022

Copy link
Copy Markdown
Author
auto func,i;
func = NextFunction(0);
while ( func != BADADDR ) 
{
    if(get_segm_name(func) != ".text"){
        func = NextFunction(func);
        continue;
    }
    Message("start = 0x%08x name = %s segment = %s\n" , func , GetFunctionName(func), get_segm_name(func));

    func = NextFunction(func);
}

only .text segment fnctions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment