Commit Graph

16 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
Matthias Görgens 7a883f4bbf Migrate away from some deprecated functions (#593)
* 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`
2023-03-17 10:07:50 -04: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 7e05e03bac more tests 2020-08-13 17:29:02 -04:00
rakuyo 385798a0d2 save work and move init files to new pr 2020-08-03 17:14:03 -04:00
James Gross 402e944e0b Py3 Task #1 (#289)
* no more xrange

* travis ci

* cleanup per review. And a test to prove that pycparser still works as intended.

* msgpack 1.0 compat and pin requirements
2020-07-17 12:44:30 -04: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
invisig0th 43d9b8f384 Merge pull request #12 from atlas0fd00m/bitfield.vsEmit
Add bitfield.vsEmit() to vstruct core
2014-11-24 13:33:00 -05:00
atlas 9b483157a7 Add bitfield.vsEmit() to vstruct core 2014-11-19 03:11:04 -05:00
l1berty b91148148a return field obj along with name, update tests 2014-11-18 22:31:42 -05:00
l1berty 74f320e138 add new vstruct method vsGetFieldByOffset and unittests 2014-11-18 18:39:08 -05:00
invisigoth 8ea56cd4fb ported unit tests from mercurial 2014-11-14 20:20:33 -05:00