- In vstruct/defs/ihex.py getMemoryMaps, there is not a check for
IHEX_REC_STARTLINADDR. The patch adds a check for this record type and
skips over the chunk, similarly to IHEX_REC_STARTSEG.
* sped up vsEmit() of ihex and srec file formats
* updated generator comprehension to be more efficient per suggestion
---------
Co-authored-by: James Gross <45212823+rakuy0@users.noreply.github.com>
* Migrate away from deprecated `assertRaisesRegexp`
In Python 3.12 `assertRaisesRegexp` will no longer work. Replace it with
`assertRaisesRegex`.
* Migrate deprecated threading.currentThread
* Migrate from deprecated `threading.Thread.setDaemon`
* auto-build getArchModules() using getArchModule()
refactor getArchModule() to load from a set of dictionaries (instead of manually importing and loading each arch module based on manual matching of the arch string name)
clean up arch_by_name to only include a direct 1-to-1 mapping. probably should autogenerate this from arch_names
creation of getArchNames() to return a dictionary with only the correctly loaded architectures (for use in things like the Viv Context Menu)
* fix older ELF parsing bug (robustness in the calculation of DYNAMICS DynSyms table)
* bugfix: strsz
* tweak
* clarification and tweak
* delete commented old code
* commentary
* integer division, please.
* removed comments which are half-truths
* architectures transformation to a dict of dicts
* implementing the module loader as a separate function.
storing full path to the envi module libraries, and the ArchitectureModule as a separate field in the dict.
* updates per @rakuy0
* updates per @rakuy0
---------
Co-authored-by: James Gross <45212823+rakuy0@users.noreply.github.com>
* wip
* still some cleanup I wanna do but it's mostly there
* back out a few things and make dynamics win more
* fixup elf tests
* cleanup
* moar data
* test data
* initial emulation commit:
bugfix: BSF
bugfix: ROR (emu doesn't set OF when processor does, in the "undefined behavior" realm)
add: e_bits.msb_minus_one() and unittest
* a few bugs
* psize should be imem_psize
* PE use archcalls instead of defcalls...
* more updates - emu-bugfixes and lockstep updates
* amd64-emu-bugfixes and lockstep work.
* bugfix for call [esp + FOO]
bugfix for pushfd
* new memory allocator (been long in coming). hey, it said "fixme!"
* more efficient findFreeMemoryBlock() algorithm
* lots of emulation and symbol bugfixes
* enhancement: REP i386reponce
enhancement: i386 LEA analyzed for accessing local vars
* tweak for Function Header
bugfix: VWGUI envi nav sendto (actually check and limit which funcgraphs are sent)
* bugfix: REP/REPZ/REPNZ handlers
* Safeguard codeblocks.py as it counts mnemonics (#408)
* Safeguard codeblocks.py as it counts mnemonics
* Add logging for error
* break instead of pass
Co-authored-by: todd-plantenga <todd.plantenga@mandiant.com>
Co-authored-by: James Gross <45212823+rakuy0@users.noreply.github.com>
* Yet Another Grabbag Bugfix PR (#404)
* Get vtrace and other unittests working on windows
* tests for vivisect.reports
* PE.carve bytes/string IO fix
* lots of fixes to the intel emulators per the lockstepper test which only runs on windows.
* utilitize some common hex functionality
* bugfix and implement BOUND emulation
* reponce bugfix
cleanup
* mods and bugfixes per @rakuy0
* updates from merge-fail
* bugfix: envitools->util
* more tweaks for unittests and @rakuy0
* replacing delMemoryMap() in envi.memory!
* fix unittest that doesn't want to work correctly.
* modified rep prefix handler to handle repz as well.
unittests
* updated BSR tests (and emu flags work)
* changes per @rakuy0
* bugfix: IMUL now does signed math
* fixed unittest
* mods per @rakuy0
* unduplicate the rep_handler list for Amd64Emulator (since it's defined in IntelEmulator's __init__)
* updated MM_* constants from envi.const
* more e_mem -> e_const for MM_READ/WRITE/etc..
* updates per @rakuy0
* touchups before the purge... about to kill off the LockStep stuff from this branch (will continue in Vtrace conversions PR#406)
* RESET LockStepper code and tests. look to Vtrace PR#406 for these changes
* test allocateMemory() "insufficient contiguous memory" exception case.
Co-authored-by: upside2 <todd.plantenga@fireeye.com>
Co-authored-by: todd-plantenga <todd.plantenga@mandiant.com>
Co-authored-by: James Gross <45212823+rakuy0@users.noreply.github.com>
* Get vtrace and other unittests working on windows
* tests for vivisect.reports
* PE.carve bytes/string IO fix
* lots of fixes to the intel emulators per the lockstepper test which only runs on windows.
* utilitize some common hex functionality
* clean up the emulators a bit. tried to use safemem to fix the bug, but that didn't work as intended.
* ton of cleanup and test cleanup. and also emulator fix
* found the edge case
* Make the dirs on a save just in case
* fix issue with v_zwstr in vstruct parsing and cleanup
* Bunch of little fixups from division fixes for py2/3 stuff, a set of new intel instructions (from decoding all the way up to symboliks), to PE loading
* Docstring updates, more unittests for vstruct, extension fix, memcanvas fix for certain edge cases. Overall: incorporating feedback from @willi and @atlas
* custom log level
* envi config encoding per @willi, getting memoryview hotkeys working again for the same reason mouse was broken
Massive cutover to python3 (baseline is 3.9.1, but is also tested/working on 3.7.x). This merge is a breaking change for any downstream consumers, as the python 2->3 strings/bytes change is central. Most APIs should still work roughly as intended, as I didn't majorly re-organize the codebase, so most APIs live where they lived before. But a changelog/migration guide will be included in the next PR for this.
This PR will constitute most if not all of the v1.0.0 release that is forthcoming soon.
* initial commit of SREC file parser
* vivbin really wants to read in more than one option at a time!
* minor SREC parser bugfixes
* cleanup and logging
* updates per @rakuy0
* bugfix
* cleanup and unittest per @rakuyo
* cleanup
* updates per @rakuy0
* bugfix: imported constants
* updates to SREC and IHEX for hashing and improved parsing.
* div comment per @rakuy0
* reduce log clutter on makePointers where pointers already exist (at the same location)
* streamlined testelf, loading one workspace at a time.
* merge fail
* updates
* bugfix
* your hex and blob unittests, and a bugfix for ihex parsing.
* bugfix per @rakuyo
* bugfix (newrel) and cleanup.
* fix wrong handling of IHEX_REC_STARTSEG