96 Commits

Author SHA1 Message Date
Catena cyber
fb3c01fe1c Sign extends x86 AND operand (capstone bug) (#852)
* Sign extends x86 AND operand (capstone bug)

Fixes #560

* Regression test for X86 AND with sign extension

For issue #560
2018-04-24 11:32:18 +01:00
Daniel James
4a98110f4a Support Solidity compilation of a file handle (#873)
This preserves the current behavior of using a string value as Solidity
source code, but now also supports instances of the `file` type, and
will use the `name` property of the file object to pass to the
subprocess invocation of solc.

This implementation also now ensures resource cleanup for the stdout and
stderr pipe handles.

Make use of compiling via file handles in multi_tx_analysis

This will enable import statements in Solidity code to work for the
Manticore CLI out of the box

Note, Manticore still wants the source code, so if we compiled using a file
handle, rather than a source string, we need to read in the source

fixes #705
2018-04-20 12:05:04 -03:00
Daniel James
2814723cc8 Support ABI parsing of specs that use function types (#874)
See http://solidity.readthedocs.io/en/v0.4.21/types.html#function-types
This is a special case of `bytes24`, 24 bytes are right zero padded in
a 32 byte word.
2018-04-16 21:44:29 -03:00
Daniel James
bfffa78b5f Fix Issue #869 (#872)
* Add testcase for empty types bug

* Fix Issue 869

Bug introduced in
0fc4bba9ad (diff-6cf4568b5e8712514d226faa04e417fbR450)

- Move empty string up to the beginning of the if-else chain.
- Correct test for bool type case

fixes #869
2018-04-13 14:32:17 -06:00
ggrieco-tob
0fc4bba9ad Added all the uint types supported by Solidity (#811)
* added all the uint types supported by solidity

* fixed some incorrect indentation

* Added missing space around "+"

* added some proper exceptions and included all the integer parameter types

* improved exception handling

* missing check

* added preliminary version of unit test for ABI

* x

* half finished

* tes

* fixes

* docstr

* Raise exception only once

* cc

* Fix merge bug

* fix merge bug in tests

* Fix bugs introduced in merge
2018-04-05 14:43:15 -06:00
Mark Mossberg
6616b9e05c
Ethereum ABI and misc fixes (#855)
* Port most of the less invasive/controversial changes from dev-evm-dynamicarguments

* Port section of fixes from ethereum.py

* Port tests unrelated to concretizing dyn args

* Add remaining changes from evm.py

* clean, fmt, code climate

* rm unnecessary setup

* disable??

* fmt

* remove all the returns

* lol cc

* Rm unused code

* port to .format

* don't use map (for py2/3 compat)

* simplify slicing

* Rm dyn arg code, since it doesn't really even work

and will be included when dev-evm-dynamicarguments is totally resolved

* add address/get_uint test

* Revert "Rm dyn arg code, since it doesn't really even work"

69188da4caf1ff74288b6398e8140f627dc495c4
2018-04-05 13:31:16 -06:00
cclauss
af779d8baa Do not forget self (again) (#854) 2018-04-03 16:47:47 -04:00
Disconnect3d
9c19014e4b Fix duplicated armv7 test name (#833)
* Fix duplicate armv7rf test name

* Small refactor of armv7rf

* Proper test classes names
2018-03-21 15:34:19 -04:00
Mark Mossberg
2eb002593e
evm: add per state trace file (#817)
* Add trace file

* Make ethersplay compatible trace format

* Small cleanup

* Record separate init and rt traces, emit separate trace files

* add todo

* More pythonic

* Add test for end insn in trace file

* Fix test

* Move trace accumulation into will_evm_execute callback

here, we can easily and correctly check the .last_exception field
to see if we were in init code or rt code. from the did_evm_execute hook
the last instruction (end instruction) had a different .last_exception
so this was causing the last instruction to not be recorded in the trace.
2018-03-19 14:22:08 -04:00
Matthew Roll
e97e631d8e port ethereum tests to individual files (issue #809) (#820)
* Add contract keyword arg to IntegrationTest._simple_cli_run

* Remove inline tests from test_eth

* Refactor IntegrationTest.test_eth_regressions to support multi-contract files
2018-03-19 09:24:04 -04:00
Mark Mossberg
fb79127bc2
Graceful exit when no states to run (#815)
* rm unnecessary return, change assert to graceful handle

* Add regression test

* Add regression test

* Correct logic

* Rm unnecessary check

This branch is unnecessary, if this condition is true, then ultimately
the executor will do nothing, and we'll simply return anyway.

* Raise NoAliveStates if no alive states to execute

* docstr update

* Update mult_tx_analysis to handle NoAliveStates

* Fancy

* Update test

* Codeclimate fmt

* fmt

* better readability

* add docstr
2018-03-16 17:48:36 -04:00
Mark Mossberg
eaa0e524b4
Fix off by 1 error in codecopy (#812)
* Fix off by 1 in codecopy

* Add regression test

* Improve formatting
2018-03-15 16:41:29 -04:00
Yan Ivnitskiy
cf789a4291
Introduce concretized_args decorator (#803)
* Introduce concretized_args decorator

* Add docs

* Cleanup

* Add basic expression counter

* Please codeclimate

* pep8

* update docstring

* Use default concretization policy when not provided

* Add concretizer tests
2018-03-14 16:45:12 -04:00
Yan Ivnitskiy
61babdbe21
Fix evm RETURN implementation (#808)
* Fix write_buffer issue (#807)

* Add test for write_buffer fix

* Use Operators.ORD instead of ord (even though were assuming concrete vals)

* Cleanup
2018-03-12 15:27:18 -04:00
Yan Ivnitskiy
fceb48ce0c
Update Create (evm exception) arguments (#805)
* Update Create arguments

* Add integration test

* Dial back the procs
2018-03-12 12:19:38 -04:00
feliam
461da57ea3
Array value configurable. 8,16,32..256 bits (not prefixed to 8) (#732)
* Array value configurable. 8,16,32..256 bits (not prefixed to 8)

* Test Array256->256

* Remove old 8 bit assumptions

* Add arrayProxy copy constructors and remove old 8 bit assumptions

* remove old 8 bit assumptions

* remove old 8 bit assumptions

* Better ArrayProxy special case handling

* Fix tests

* Review fixes

* review fix

* fix gas variable

* Review fixes

* Fix vm.gas access
2018-02-26 21:09:34 -03:00
Yan Ivnitskiy
394401e3f4
Fix ARMv7's ADD (#769)
* Fix armv7's ADD
2018-02-23 18:07:49 -05:00
Mark Mossberg
b9aa483745
evm: Fix MUL overflow false positive (#767)
* initial

* Add test for mul checker

* clean

* Rename and clean

* Rm testing

* Better comment, and clean

* Split tests, add more tests

* Clean up stuff, remove unnecessary masking

* fmt

* Add back constrain to make it match the originall buggy situation

* Clean up surrounding code, make it unit testable

* Correct name

* Use individual arguments for helpers
2018-02-23 12:42:15 -08:00
Mark Mossberg
d0f69c755c
Add ethereum regression tests (#763)
* Clean some unused variables

* Add basic infrastructure

* Add real eth regression tests

* Use check_call

* Suppress stdout

* Make 705 work

* Less error prone way of testing
2018-02-22 13:04:01 -08:00
Mark Mossberg
ebe0baa178
Emit events for exception raising evm instructions (#722)
* Create EVMInstructionException, properly emit did_evm_execute_instruction for insns that trap to the platform

* Emit event before execution of platform handlers. This is because many of the
platform handles actually destroy the cpu (platform.current) via pop_vm.
Clients that receive the event may want to access the cpu though, for example
to see the current PC. so we emit the event right before, so they can do this

* simplify

* move closure below result decl

* Add comment to explain

* Fix typo

* Revert back to pythonic style

It was this way to test emitting the did execute signal here, rather
than in the evm cpu

* Remove inline function definition from critical path

* Add test for events for exception instructions
2018-02-20 12:10:29 -08:00
Disconnect3d
680fc8f17e Armv7 code refactor (#749)
* Armv7 code refactor

Removes dead imports, makes code style more consistent and a bit more compliant with pep8 (yeah i seems we don't enforce any particular style, but this seems to be a reasonable default for me).

* Review fix: add comment for armv7 _shift
2018-02-17 11:51:58 -05:00
Garret Reece
c6f457d72e Updates for thumb mode (#610)
* WIP. issues with setting PC correctly via POP are corrected. issues with pc relative addressing in thumb mode corrected. Still a memory access error, but getting there

* WIP - PC relative addressing in thumb mode now aligns the value for PC per the spec before applying offset

* General thumb mode fixes:
* ldr pc, <operand> now swaps modes and sets pc correctly
* the bl instruction sets the lr appropriately for the current mode
* the two operand forms of the ORR, EOR, and BIC instructions now exist
* tests added for these updates

* comment cleanup

* WIP :more thumb mode instructions, a special case for the sys_brk handled, and a really ugly solution to an internal plumbing problem

* First attempt at concretizing ARM mode

* Handle symbolic mode for ARMv7

* Clean up imports

* Make comment more accurate and use instruction.size

* Collapse _Shift and _Shift_thumb

* Make ARM mode handling more Pythonic

* Improve comment on arm shift register handling and capstone behavior
2018-02-15 15:47:36 -05:00
Srinivas P G
fca3179dd0 System calls addition - sys_getrandom and sys_openat (#640)
* version argument in manticore

* Fix 591 - Exception Handler

* Issue 597 - Remove the unused policy argument

* getrandom system call - Initial commit

* openat system call initial commit

* getrandom system call fixes

* openat and getrandom system call

* Update sys_getrandom

* Make BadFd more generic as FdError

* Resolve mode inside File

* Support opening directory with open(2)

* Fix fd leak

* add sys_openat tests
2018-02-14 16:52:54 -05:00
feliam
a1f809732d
Quick evm header fix (#679)
* Quick evm header fix

* Fix BLOKKHASH
2018-01-30 17:31:28 -03:00
Yan Ivnitskiy
c0068431c9
Introduce a 'force' parameter to memory access functions (#632)
* whitespace cleanup

* Remove access check from COWMap.__setitem__/__getitem__

 * Access checks happen via read/write, so these checks are unecessary.

* Add force parameter to read/write functions

* Introduce  to AbstractCpu's accessors

* Add mem force tests

* Apply force param to symbolic operations

* Add symbolic force write tests

* Clean up test

* Fix symbolic write behavior; add tests
2018-01-30 12:17:27 -05:00
Yan Ivnitskiy
2e578acf9d
Fix Unicorn exception handling; add a symbolic wrapper for exit(2) (#616)
* Fix unicorn tests and exception handling; add a sym wrapper for sys_exit

* Add debug output when solving for exit() arg

* Update how sys_exit(expr) is handled
2017-12-22 16:24:56 -05:00
Mark Mossberg
7875aaf5fd
Rename manticore.seth to manticore.ethereum (#665)
* Rename file

* Fixup refs

* update logging

* Update docs

* Update docstr

* Clean docs
2017-12-22 14:05:37 -05:00
Mark Mossberg
6b794fecaa
eth int overflow: tests, mul support (#656)
* Move algorithm into ManticoreEVM

* Rm buggy unused line

* Initial eth testing setup

* Check for overflow in mul also

* clarifying comment

* Install solc for travis

* Add sudo

* x

* Rm travis_retry, since we rarely actually use it, and it's not available in this script for some reason

* Check for specific findings

* Fix test

* Clean up transaction firing logic

* Use less strict check, better for floating point
2017-12-21 12:54:24 -05:00
Daniel Bolognino
764151de71 Emit .input instead of .txt files in workspace (#625)
Related: #612 

* Update workspace.py

Changed extension to .input

* Update test_workspace.py

* changed key value pair in test_workspace bc of change of extension to .input in workspace.py, fixed issue #618

* removed unwanted directories

* Update seth.py

* Update seth.py

Change in Documentation issue #612
2017-12-06 18:51:20 -05:00
feliam
3a63402ae5
EVM assembler/disassembler doc and cleanup (#563)
* Fixes symbolic reentrancy example

* Fix coverage Issue# 527

* Remove  debug unused code

* New solidity biased API and reporting

* Updated examples to new api WIP

* simple_mapping FIXED. new api

* Simple transaction example added. msg.value can be symbolic now

* Reentrancy symbolic now updated to new API + bugfixes

* Doc and cleanups in evm assembler

* EVMInstruction -> Instruction

* cleanups

* typo

* deepcopy in Constant

* Better EVM-asm api and doc

* some docs

* More evm asm docs

* Fix import *

* typo

* newline between text and param

* similar phrasing to all the other flags

* typo

* typo

* fix function name in comment

* sphinx newline

* documentation fixes

* documentation fixes

* EVMAssembler to EVMAsm

* Fix evm @hook signature

* EVMAsm

* EVMasm refactor
2017-11-29 13:22:16 -03:00
awr|arr
352b9ba48d Fix typo per issue #552 - s/arm64/amd64/ (#561) 2017-11-14 15:10:14 -05:00
HighW4y2H3ll
8002a1d682 Add PCMPXSTRX Instructions (#507)
* Add PCMPXSTRX Instructions

* bug fixes

* unittest related fixes

* Full test of pcmpxstrx

* Move tests
2017-11-14 16:39:51 -03:00
cole-lightfighter
08f86cc892 [fix] Issue #550: generates extra workspace folder (#557)
* [fix] Issue #550: generates extra workspace folder

Signed-off-by: Cole Lightfighter <cole@onicsla.bz>

* Slight workspace and store refactor
2017-11-13 12:20:57 -05:00
car bauer
82d1621bfe
Remove win32 support (#535)
* Remove Windows support files
* Remove Windows test files
2017-11-06 16:51:43 -05:00
Yan
baf2d769a6 Various bug fixes. (#530)
* Fixes #503

* Fixes #515

* Fixes 272. Concretize data written to a fd.

* Revert debug hack and fix overly broad exception

* Update did/will_exec_instr semantics

* Clean up imports

* Update logging and improve sys_open return

* Update variable names+doc for consistency
2017-10-25 10:53:11 -04:00
feliam
8591bff45f EVM support (#521)
* WIP New Policy class

* WIP pubsub

* Update Signal tests

* EVM support - Wip

* EVM support - dependencies fixed

* EVM support - fix decree merge

* fix decode instrucion event

* Fix small bugs in evm opcodes (too many arguments + wrong LOG name) (#380)

Fix wrong call parameters + typo

* Fix Create/Call

* Fix depth

* Default fixed point in arithmetic simplifier

* small fixes from github comments

* Fix event decode_instruction signature

* wip wip

* Auto tests for evm

* New EVM tests

* Ran 9556  FAILED (failures=166, errors=8, skipped=62)

* Fix some arithmetic instructions

* Ran 9556  FAILED (failures=136, errors=8, skipped=62)

* More instructions - Optimizing symbolic memory

* Added gas to opcodes description - FIX DELEGATECALL POPS

* Add wip wallet example

* The tests

* Solidity constructors need argument after bytecode

* Simple integer overflow working

* Good merge

* Good good merge

* WIP manticore refactor

* Fix default old-style initial state

* context now working

* Fix context serialization

* Fix test models.  Can not set a state constraints

* typo

* A few typos (constraints setter) and use of public properties in internal methods

* Fix init wallet example

* State __init__ needs to initialize platform constraints

* Internal methods use internal properties

* Better attack modeling

* Better example layout

* Storage backup on CALL is now faster .. and correct

* Add LOG support

* Minimal SE test

* Added examples

* Send ether bugfix

* EVM: Fix wrong balance destination on CALL + decrease caller balance on CREATE

* New balance management

* Trying to maintain known hashes

* Known hash concretization policy

* CALLDATA max size bugfix

* Minimal SE example

* Remove evm tests

* add -> enqueue

* @m.init

* Fix workspace url

* Some test skipped

* Ad Fixme to platform specific stuff in State

* add -> enqueue

* Enqueue created state

* Fix m.init

Use a messy hack to adhere to the spec (callback func receive 1 state argument)

* Add _coverage_file ivar to Manticore

* Fix symbolic files

* remove extra enqueue

* Fixing __main__

* comments

* Fix visitors oddity

* setup merged

* remove duplicates and add pysha3

* Remove EVMTests import

* Refactor platform specific code out of ManticoreOutput (#505)

* Initial moving work

* Clean

* Make linux.generate_workspace_files work

* Fix

* clean

* Add test

* Test workspace for platform files

* Skip EVM cpu pretty print

* Remove bad import

* Fix coverage.py for testing

* Clean comment

* Comment hack

* Print evm cpu

* pretty print evm world instead of platform

* delet old scripts/examples

* delet old tests

* Remove z3 install script

* Array.max_size can be None, include check for that

* Rm unused _symbolic_files

add_symbolic_files was moved to linux, so this is not needed

* Rm unused args

* Import evm

* Rm dup function

* Rm stray prints

* Add docs for new classmethod apis

* minimal

* minimal example

* fix minimal

* Fair symbolic SHA3 handling

* Simple mapping example

* coverage example

* fix tests

* fix minimal

* Some eko fixes

* New SETH

* integer_overflow refactored

* Fixing the examples

* init_bytecode -> init
'

* Concrete reentrancy exampole

* concrete reentrancy selfdestruct

* Update minimal.py

* It's a new Minimal

* Integer overflow example

* New minimal

* minimal fix

* Examples last minute fixes

* Remove debug print

* add plugin.py

* Fixing event subscription

* remove temp params

* Remove param

* Update uncovered will_exec callback prototype

* Clean up debug output

* Automatically generated intruction tests

* Uninplemented instruction test removed

* Unused concretization policy removed

* Fixes enabling default bplugins

* solc from PATH

* Removed unused import

* Logger name updated
2017-10-17 19:47:20 -03:00
feliam
e84c0513a2 Manticore plugins (#506)
* WIP New Policy class

* WIP pubsub

* Update Signal tests

* small fixes from github comments

* Fix event decode_instruction signature

* Good merge

* Good good merge

* WIP manticore refactor

* Fix default old-style initial state

* add -> enqueue

* @m.init

* Fix workspace url

* Some test skipped

* Ad Fixme to platform specific stuff in State

* add -> enqueue

* Enqueue created state

* Fix m.init

Use a messy hack to adhere to the spec (callback func receive 1 state argument)

* Add _coverage_file ivar to Manticore

* Fix symbolic files

* remove extra enqueue

* Fixing __main__

* comments

* Experimental plugin system

* tests fixed

* Fix plugins

* Some reporting moved to plugin

* Fix assertions test

* Add published events to classes that publish them

* Update how we verify callbacks

* Update Eventful._publish

* Dev plugins (#512)

* Yet another flavor for event name checking

* really it's a bunch of minimal bugfixes

* Remove get_all_event_names from Plugin

* Update where we get all events

* Use new metaclass-based event registry

* Define prefixes in one place

* remove debug print

* remove debug print
2017-10-04 15:51:37 -03:00
JP Smith
0efa37933a Fix stderr file creation and test for it going forwards (#495)
* fix stderr file creation and test for it going forwards

* consolidate tests

* clean up imports
2017-09-13 19:17:13 -05:00
Mark Mossberg
58cdee814c Update test_workspace.py (#497) 2017-09-13 18:34:45 -04:00
feliam
23c2585316 Refactor platform details out from Manticore (#421)
* WIP New Policy class

* WIP pubsub

* Update Signal tests

* small fixes from github comments

* Fix event decode_instruction signature

* Good merge

* Good good merge

* WIP manticore refactor

* Fix default old-style initial state

* add -> enqueue

* @m.init

* Fix workspace url

* Some test skipped

* Ad Fixme to platform specific stuff in State

* add -> enqueue

* Enqueue created state

* Fix m.init

Use a messy hack to adhere to the spec (callback func receive 1 state argument)

* Add _coverage_file ivar to Manticore

* Fix symbolic files

* remove extra enqueue

* Fixing __main__

* comments

* Refactor CLI, and Manticore high level interfaces (#498)

* Refactor main,

- classmethod for linux
- refactor manticore ctor - compat with old linux behavior
- changed verbosity API (to allow for this use case: what if you want to set verbosity for the stuff manticore does in its ctor?)

* rm old verbosity

* small

* Add decree classmethod

* Rm checks ; they are redundant anyway

* Misc

* Move add_symbolic_file to linux platform

* rm redundant checks

* Rm explicit args for deprecated interface

* Fix cli bug

* Allow for both linux and decree from cli

* Add back argv positional param for deprecated api compat
2017-09-13 18:37:42 -03:00
Mark Mossberg
50923974e2 Fix logger verbosity and test (#491)
* something liekt his

* `will_store_state` does not exist

* slightly better cli verbosity test

* Fix variable

* Rm unused callback fun
2017-09-12 15:08:53 -04:00
Theofilos Petsios
715cc436c7 Abstract Disassembler classes and Binja CPU + Platform (#364)
* adding abstract disasm class

* before adding abstract insn

* explicit capstone use

* (wip) removing capstone

* debugging nose

* removed disassembler from constructor

* nits

* capstone->cs and nits

* basic memory (wip)

* tmp

* added binja dissasm

* fixed execution pipeline - calling LLIL instructions

* updated parseargs to select disassembler

* unstable (disassembler at CPU constructor breaks tests)

* disasm fix for tests

* nit for aliases in x86

* added a flag to differentiate disassembly and IL-disassembly for binja

* before merging

* merging with dev-events master

* fixed signal forwarding for binja

* cleaner initialization

* Binja RegisterFile. Dropped Platform

* address fixup

* properly incrementing PC

* some work on XOR, SET_REG, REG, CONST, AND, PUSH, POP

* adding first CALL, JMP, LOAD (wip)

* JUMP fix

* GOTO and misc fixes in PC handling

* adding instructions (wip)

* fixing flags and sizes (wip)

* loading database if exists for faster analysis

* fix for register debug

* fixes for register sizes and flags

* FIX for multiple IL instructions sharing the same PC

* removed CONST_PTR and misc fixes

* RET, SHR, shift left & misc instructions, fixing insn sizes (wip)

* flag fixes

* ctypes 2's complement parsing

* JUMP_TO, SYSCALL

* syscall fixups and flag computation using binja il only

* FLAG, NEG, CMP(family) of LLIL, some unimplemented methods

* MUL, DIV

* cmpxchg

* MUL, IMUL, ROR, ROL

* fallback to capstone for all LLIL_UNIMPL and LLIL_UNIMPL_MEM

* fixes for registers and memory when switching CPUs

* check for binja to disable multiprocessing

* merging

* nit

* hack for serialization

* moved check for disassembler to Manticore from __main__

* removing __class__ refs

* cleanup from __class__.disasm

* size calculation from get_instruction_low_level_il

* fix for NEG, check for empty queue, execute refactor

* fixes for LLIL functions

* removal of redundant regfile writes

* nit fixes

* function overrides in Cpu classes and orphan printf cleanup

* nit

* incomplete merge

* verbosity temp mod

* cleanups of FIXMEs

* 2-stage constructor for disassembler

* cleanup binja refs in abstractcpu

* serialization for platform_cpu

* check for UNIMPL in all the il queue

* typo fix

* fix for arm

* typo correction and starting caching implementation

* restored register printing and fixed import in x86.py
2017-08-17 17:43:27 -04:00
Garret Reece
5d87fc83b3 Instructions and tests to support issue binary for issue #182 (#403)
* orn instruction plus unit test
* uadd8 and it instructions implemented
* SEL instruction implementation
* GE flag set by UADD8
* IT instruction condition code properly no longer prevents its execution
* support for multiple instruction tests added to testing setup
* unit test for SEL instruction
* cleaned up the tests for thumb instructions
* implemented sxth and rev instructions
* implemented tests for sxth and rev instructions
* updated the add implementation to support two operand variant (i.e., add r4, #4)
* added test for itete ne instruction
2017-08-17 10:02:44 -05:00
Theofilos Petsios
09bb702fac Implement logging presets (#445)
* logging template nits

* moved logging outside Manticore

* naming fix and exposed API call

* logging -> log renaming

* fix for verbosity test

* restored setter/getter for verbosity

* fixes for warnings in 0 mode and exteneed test_cli_verbosity

* removed print

* relative import, fork message to executor, init function

* verbosity docstring fix

* docstring nit
2017-08-14 16:05:29 -04:00
Mark Mossberg
1d8e051522 Fix state.generate_testcase (#451)
* Use correct event name

* Add test for state.generate_testcase

Test merely tests that this function publishes the 'will_generate_testcase' event

* Properly test; make sure the callback executes and error if not

This is the most convoluted unit test I've ever written.

* "better"
2017-08-14 14:44:53 -04:00
Mark Mossberg
eef3cd20e2 Implement state.generate_testcase (#438)
* ran

* Some dirty work

* Rm unnecessary sanitization

* Fix state.generate_inputs event publishing

We don't need to manually pass `self` because State is automatically
forwarded as an argument. Also correctly specify a message for the state
and expose to the API

* Rename

* Update test for new save_testcase args, make test more robust

* Simplify arguments related to generate_testcase_callback by removing default arg. Add test for this behavior

* Minor test fixup

* Add official API docs

* Remove unnecessary new event type
2017-08-08 18:12:55 -04:00
feliam
3b57c0d502 Fix context serialization (#425)
* Fix context serialization

* Fix test models.  Can not set a state constraints

* typo

* A few typos (constraints setter) and use of public properties in internal methods

* State __init__ needs to initialize platform constraints

* Internal methods use internal properties

* test_record_branches removed
2017-08-01 14:08:54 -03:00
Eric Hennenfent
51837df98b Add Taint Parameters (#414)
* Add taint args to buffer creation

Allows the `new_symbolic_buffer` and `symbolicate_buffer` functions to take keyword args for tainting. Defaults to frozenset in both cases.

* Add unit tests and ArrayProxy taint propery

Adds simple unit tests for tainted buffers. Added a property to the ArrayProxy class in smtlib.expression so that it's possible to access the taint of the proxied ArrayVariable.

* Updated docstrings
2017-07-28 11:58:25 -04:00
feliam
76357216da Pub-sub like events (#371)
* WIP New Policy class

* WIP pubsub

* Update Signal tests

* small fixes from github comments

* Fix event decode_instruction signature

* Good merge

* Good good merge

* Eventful class commented

* The million typos

* Code revision

* Fix tests for new mor strict Eventful
2017-07-27 19:41:08 -03:00
JP Smith
13964d053b create workspace before running manticore to make memdump tests pass (#388) 2017-07-13 13:57:18 -04:00