24 Commits

Author SHA1 Message Date
atlas0fd00m 5531bdae6f Vstruct repr render improvement (#674)
* vstruct rendering improvements

* bugfix and unittests

* unittests

* Update vivisect/tests/testvstruct.py

---------

Co-authored-by: James Gross <45212823+rakuy0@users.noreply.github.com>
2025-01-07 17:31:53 -05:00
James Gross 0d883083c2 LNK parser (#649) 2024-07-15 14:57:31 -04:00
atlas a374161e27 Merge branch 'master' into viv_loader.
rehashing lots of Mach-O parsing stuff (especially around endianness)

# Conflicts:
#	vivisect/parsers/macho.py
#	vstruct/defs/macho/__init__.py
#	vstruct/defs/macho/const.py
#	vstruct/defs/macho/loader.py
2021-12-27 16:15:02 -05:00
James Gross 6de41d2f23 Fix vstruct number issue (#412)
Squash a few bugs in vstruct related to negative numbers and unformatted values.
2021-07-31 00:09:44 -04:00
James Gross 888d683663 Py3 Cleanup (#353)
* 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
2021-02-12 22:55:03 -05:00
James Gross a7b5f8deef Py3 cutover (try number: who knows?) (#328)
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.
2021-02-03 14:37:09 -05:00
James Gross 80de840881 Even More Syntax Cleanup (#293)
A lot of cleanup things in prep for a python 3 transition. Getting rid of the old exception syntax, converting prints over to logging, cutting random scraps of code to be proper unit tests,  cut away some older bits of code, etc.

This still works in python2. It's just a lot of tidying up. There are no major functionality changes.
2020-09-08 13:00:06 -04:00
rakuyo 385798a0d2 save work and move init files to new pr 2020-08-03 17:14:03 -04:00
Jay Smith 59e8278c41 Forcing string return for __str__ to allow setting an integer field's enum to be a v_bitmask, which returns a list of labels from vsReverseMapping() 2016-12-06 13:14:41 -05:00
invisigoth 5172e60cf9 Merge branch 'master' of https://github.com/vivisect/vivisect 2015-07-16 21:46:01 -04:00
invisigoth 4f320bab0e added __setitem__ to vstruct and vsParseFd for zstr 2015-07-16 21:45:53 -04:00
invisig0th 39e2eaa0a7 Merge pull request #67 from williballenthin/vstruct-enum-uints
VStruct enum uints
2015-07-16 21:41:12 -04:00
Willi Ballenthin 550df81d22 vstruct: prims: pull enum support into v_number 2015-07-16 10:30:01 -04:00
invisig0th 2a151ecdec Merge pull request #66 from williballenthin/vstruct-struck-typo
VStruct struck typo
2015-06-07 20:41:24 -04:00
Willi Ballenthin 132fc25d24 vstruct: add __hash__ for vstruct primitives. closes #59. 2015-06-03 10:46:12 -04:00
Willi Ballenthin 836b4bdafb vstruct: add enum_uint* variants that stringify to their constant names 2015-06-03 10:36:09 -04:00
Willi Ballenthin a445a1e24d vstruct/primitives.py: fix typo, s/struck/struct/ 2015-06-03 10:32:44 -04:00
invisigoth a56e69a973 last (hopefully) merge from viv mercurial 2015-04-08 13:30:31 -04:00
invisig0th 06de528eff Merge pull request #34 from vivisect/l1berty_vstruct_ctor_fix
fix bug, call correct ctor
2015-01-01 19:11:36 -05:00
l1berty 6272790794 fix bug, call correct ctor 2015-01-01 19:01:23 -05:00
l1berty e94cae76ec compute 'expected' bitwise result instead of exception 2015-01-01 10:02:13 -05:00
l1berty c2a78b1425 fixed setting of integers that could not be represented by the vstruct number types (and hence could not be subsequently vsEmit'd). added min/max checks in vsSetValue, added new signed number type, overrided vsSetValue in bitfield to reflect new behavior, added dynamically generated testcases, minor cleanup 2014-12-10 17:32:17 -05:00
invisigoth 19458cae6a merged deltas from a downstream hg repo 2014-11-16 22:11:59 -05:00
invisigoth be146cabd2 initial import from hg 2014-11-14 16:59:32 -05:00