mirror of
https://github.com/QuasarApp/pe-parse.git
synced 2025-05-09 09:59:33 +00:00
now it gets the VAs of the addresses of imports
This commit is contained in:
parent
afb2287fdd
commit
fe933ff9d6
@ -38,7 +38,8 @@ string to_string(T t, ios_base & (*f)(ios_base&)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void printImports(void *N, RVA impAddr, string &modName, string &symName) {
|
void printImports(void *N, RVA impAddr, string &modName, string &symName) {
|
||||||
cout << to_string<uint32_t>(impAddr, hex) << " " << modName << "!" << symName;
|
cout << "0x" << to_string<uint32_t>(impAddr, hex);
|
||||||
|
cout << " " << modName << "!" << symName;
|
||||||
cout << endl;
|
cout << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ parsed_pe *ParsePEFromFile(const char *filePath) {
|
|||||||
//okay now we know the pair... add it
|
//okay now we know the pair... add it
|
||||||
importent ent;
|
importent ent;
|
||||||
|
|
||||||
ent.addr = 0;
|
ent.addr = curEnt.AddressRVA + p->peHeader.nt.OptionalHeader.ImageBase;
|
||||||
ent.symbolName = symName;
|
ent.symbolName = symName;
|
||||||
ent.moduleName = modName;
|
ent.moduleName = modName;
|
||||||
p->internal->imports.push_back(ent);
|
p->internal->imports.push_back(ent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user