update to ida 7.6, add builds
This commit is contained in:
38
idasdk76/plugins/hello/hello.cpp
Normal file
38
idasdk76/plugins/hello/hello.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <ida.hpp>
|
||||
#include <idp.hpp>
|
||||
#include <loader.hpp>
|
||||
#include <kernwin.hpp>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
struct plugin_ctx_t : public plugmod_t
|
||||
{
|
||||
virtual bool idaapi run(size_t) override;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
bool idaapi plugin_ctx_t::run(size_t)
|
||||
{
|
||||
msg("Hello, world! (cpp)\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
static plugmod_t *idaapi init()
|
||||
{
|
||||
return new plugin_ctx_t;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
plugin_t PLUGIN =
|
||||
{
|
||||
IDP_INTERFACE_VERSION,
|
||||
PLUGIN_UNL // Unload the plugin immediately after calling 'run'
|
||||
| PLUGIN_MULTI, // The plugin can work with multiple idbs in parallel
|
||||
init, // initialize
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr, // long comment about the plugin
|
||||
nullptr, // multiline help about the plugin
|
||||
"Hello, world", // the preferred short name of the plugin
|
||||
nullptr, // the preferred hotkey to run the plugin
|
||||
};
|
||||
30
idasdk76/plugins/hello/hello.idc
Normal file
30
idasdk76/plugins/hello/hello.idc
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <idc.idc>
|
||||
|
||||
class myplugin_t
|
||||
{
|
||||
myplugin_t()
|
||||
{
|
||||
this.flags = 0;
|
||||
this.comment = "This is a comment";
|
||||
this.help = "This is help";
|
||||
this.wanted_name = "Sample IDC plugin";
|
||||
this.wanted_hotkey = "Alt-F6";
|
||||
}
|
||||
init()
|
||||
{
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
run(arg)
|
||||
{
|
||||
msg("Hello world\n");
|
||||
return 0;
|
||||
}
|
||||
term()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
static PLUGIN_ENTRY()
|
||||
{
|
||||
return myplugin_t();
|
||||
}
|
||||
21
idasdk76/plugins/hello/hello.py
Normal file
21
idasdk76/plugins/hello/hello.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import idaapi
|
||||
|
||||
class myplugin_t(idaapi.plugin_t):
|
||||
flags = idaapi.PLUGIN_UNL
|
||||
comment = "This is a comment"
|
||||
help = "This is help"
|
||||
wanted_name = "My Python plugin"
|
||||
wanted_hotkey = "Alt-F8"
|
||||
|
||||
def init(self):
|
||||
return idaapi.PLUGIN_OK
|
||||
|
||||
def run(self, arg):
|
||||
print "Hello world!"
|
||||
|
||||
def term(self):
|
||||
pass
|
||||
|
||||
def PLUGIN_ENTRY():
|
||||
return myplugin_t()
|
||||
|
||||
26
idasdk76/plugins/hello/makefile
Normal file
26
idasdk76/plugins/hello/makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
PROC=hello
|
||||
|
||||
include ../plugin.mak
|
||||
|
||||
all: scripts
|
||||
|
||||
SCRIPTS := $(addprefix $(BIN_PATH),idchello.idc pyhello.py)
|
||||
|
||||
.PHONY: scripts
|
||||
scripts: $(SCRIPTS)
|
||||
|
||||
$(BIN_PATH)%.idc: %.idc
|
||||
$(CP) $? $@
|
||||
$(BIN_PATH)%.py: %.py
|
||||
$(CP) $? $@
|
||||
|
||||
uninstall::
|
||||
rm -rf $(SCRIPTS)
|
||||
|
||||
# MAKEDEP dependency list ------------------
|
||||
$(F)hello$(O) : $(I)bitrange.hpp $(I)bytes.hpp $(I)config.hpp $(I)fpro.h \
|
||||
$(I)funcs.hpp $(I)ida.hpp $(I)idp.hpp $(I)ieee.h \
|
||||
$(I)kernwin.hpp $(I)lines.hpp $(I)llong.hpp \
|
||||
$(I)loader.hpp $(I)nalt.hpp $(I)netnode.hpp $(I)pro.h \
|
||||
$(I)range.hpp $(I)segment.hpp $(I)ua.hpp $(I)xref.hpp \
|
||||
hello.cpp
|
||||
Reference in New Issue
Block a user