One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
systemtap
/
runtime
/
dyninst
/
Edit File:
sym.c
struct task_struct; #include "../sym.h" #include <assert.h> #include <elfutils/libdwfl.h> typedef struct { char *fn; unsigned long offset; } module_args; static int module_callback (Dwfl_Module *mod, void **userdata __attribute__((unused)), const char *name, Dwarf_Addr start, void *arg) { module_args *modargs = (module_args*)arg; if (strcmp (modargs->fn, name) == 0) { modargs->offset += start; return DWARF_CB_ABORT; } return DWARF_CB_OK; } static unsigned long _stp_umodule_relocate(const char *path, unsigned long offset, struct task_struct *task) { static char *debuginfo_path; static const Dwfl_Callbacks proc_callbacks = { .find_debuginfo = dwfl_standard_find_debuginfo, .debuginfo_path = &debuginfo_path, .find_elf = dwfl_linux_proc_find_elf, }; Dwfl *dwfl = dwfl_begin (&proc_callbacks); if (dwfl == NULL) _stp_error ("dwfl_begin: %s", dwfl_errmsg (-1)); int result = dwfl_linux_proc_report (dwfl, getpid()); if (result < 0) _stp_error ("dwfl_linux_proc_report: %s", dwfl_errmsg (-1)); else if (result > 0) _stp_error ("dwfl_linux_proc_report"); if (dwfl_report_end (dwfl, NULL, NULL) != 0) _stp_error ("dwfl_report_end: %s", dwfl_errmsg (-1)); module_args modargs = { .fn = (char*)path, .offset = offset }; if (dwfl_getmodules (dwfl, module_callback, &modargs, 0) == -1) _stp_error ("dwfl_getmodules: %s", dwfl_errmsg (-1)); dwfl_end (dwfl); return modargs.offset; }
Simpan