OFS2RVA(1)

πŸ“¦
version 0.85.1 Β· 2 versions
, in alpine 3.24, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– OFS2RVA πŸ’–

okay bestie, gather round, because ofs2rva is one of those tiny little tools that does exactly ONE thing and does it flawlessly, and honestly? we love that for her. she lives in the pev PE file analysis toolkit (you know, the readpe fam πŸ‘‘) and she's about to convert a raw file offset into an RVA for you. no drama, no fuss, just math and vibes. ✨


✨ NAME ✨

ofs2rva β€” converts a PE raw file offset to relative virtual address πŸ¦‹


🌸 SYNOPSIS 🌸

ofs2rva offset pefile

πŸ’… DESCRIPTION πŸ’…

ofs2rva converts a raw file offset to RVA (Relative Virtual Address), if it's valid. that "if it's valid" is doing a LOT of heavy lifting there, so like… pay attention, okay? she's not gonna hold your hand if you hand her nonsense. 😭

she's part of pev, the PE file analysis toolkit. the whole squad. the iconique collective. 🫢

  • offset β€” a valid PE file offset, in decimal or hexadecimal (hex has to be prefixed with 0x, no cap, that's the rule).
  • pefile β€” a PE32/PE32+ executable or dynamic linked library file. that's a .exe or a .dll for the girlies keeping score. πŸ’–

πŸŽ€ OPTIONS πŸŽ€

  • -V, --version β€” show version. that's it. she's telling you who she is. main character behavior. πŸ‘‘
  • --help β€” show this help. when in doubt, ask for help. growth. 🌱

πŸ”₯ EXAMPLES πŸ”₯

get the RVA of the 0x1b9b8 offset of calc.exe:

$ ofs2rva 0x1b9b8 calc.exe

see? one line. she ate and left no crumbs. πŸ’…βœ¨


😭 REPORTING BUGS 😭

found something cursed? first, please check the latest development code β€” maybe someone already fixed it, bestie β€” and then report at:

https://github.com/mentebinaria/readpe/issues

we're not mad, we're just disappointed. (jk, we're not even disappointed, we want your bug report fr fr 🫢)


🌈 SEE ALSO 🌈

pedis(1), pehash(1), peldd(1), pepack(1), peres(1), pescan(1), pesec(1), pestr(1), readpe(1), rva2ofs(1)


Copyright (C) 2012 - 2020 pev authors. License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.txt>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

translation: she's free, she's open, she's yours to remix, but if she breaks, that's on you. no warranty. periodt. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

rva2ofs(1)

(yeah she gets her own second SEE ALSO because she's the mirror twin of this whole operation. if ofs2rva goes this way, rva2ofs goes the other way. iconic duo. 🌈)


and that's the whole page, bestie πŸ’œ this one came straight out of the General Commands Manual, section 1 β€” OFS2RVA(1), top and bottom, like matching nails πŸ’… β€” part of the pev toolkit. now go convert some offsets, you absolute genius. bye bye! πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from