15 Commits

Author SHA1 Message Date
Mark Mossberg
a21c8b6012
Improve evm docs (#816)
* Add docstr for finalize

* prune unnecessary stuff from docs

* Add trace file

* Revert "Add trace file"

4687810e15c2bc6cc3e729c32bdad2f617679d77
2018-03-16 13:32:32 -04:00
Mark Mossberg
84aca4ac1b
Add docs on symbolic input (#750)
* Change tagline

* Not sure socket support is a gotcha exactly

* initial docs

* Better docs

* Code blocks

* Links to the api docs

* Improve language

* Doc add_symbolic_file in public API

* Rm stray init
2018-02-13 19:15:54 -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
feliam
9c777e6d2b
EVM api refactor (#589)
* 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

* Initial seth in place refactor

* 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

* refactors

* EVMAssembler to EVMAsm

* Fix evm @hook signature

* EVMAsm

* WIP seth doc

* WIP move seth

* seth moved to manticore module

* Fixed DUP and typo

* Slightly better evm reporting

* review

* review

* Removed unfinished refactor
2017-11-29 19:00:49 -03: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
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
Mark Mossberg
f9489d3249 Document Manticore.locked_context API (#460)
* Add locked_context to documented APIs

* Initial
2017-08-17 16:50:21 -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
Mark Mossberg
03ee876005 Add basic documentation on function modeling (#386)
* Add basic models docs

* Phrasing

* Minor fixes
2017-07-13 11:57:07 -04:00
Mark Mossberg
7c00b44675 Update docs (#360)
* Update State docs

* Update manticore docs

* Document models

* Doc models

* Use sphinx link
2017-06-28 14:58:23 -04:00
JP Smith
14499f7ba8 Add solve_buffer to API (#280)
* add solve_buffer to api and update google ctf script to use it

* start adding push/pop_constraints functionality

* remove push/pop constraints, just use with

* add mark's changes

* add solve_buffer to api.rst

* fix typo
2017-06-05 14:49:39 -04:00
Mark Mossberg
5b5392e54d Implement user variadic model interface (#276)
* Add variadic decorator

* Add check for _variadic func attribute

* Expose @variadic at top level

* Use variable for the actual name of attr

* Update naming

* Use helper

* Maybe more pythonic?

* Add variadic to public API

* Add variadic decorator tests

* Clean

* Remove variadic parameter

* Add docstrings

* Document parameter

* Clean

* Better use of autodoc

* Update docstring

* Add todo comment
2017-05-31 15:48:19 -04:00
Mark Mossberg
1e76998eb7 Add infrastructure for core models (#244)
* Rename libc.py to models.py

* Clean old unused libc.py code

* Make models top level importable

* Add State level model invocation function

So user is not required to pass in state at to a platform level func

* Explicitly mark what is in the public API

Protects against accidentally making something a public API just because
it has a docstring

* clean

* Move models.py to top level

* Rm models

* Fix docstring typo

* Add default param name, move comment

* Update docstring
2017-05-11 13:25:43 -04:00
Mark Mossberg
1047fa42e3 Document state, cpu, issymbolic (#101)
* Add unstable warning

* verbosity docs

* Add State and Cpu to docs

* Add State docs

* Add cpu docs

* Add select cpu docs

* Add issymbolic helper doc

* Rm double docstring

* Update write_bytes docstring

* Update Cpu docstr

* Document cpu reg interfaces

* Fix rebase mistakes
2017-03-27 15:03:42 -04:00
Mark Mossberg
ebe7f8268b Add docs (#61)
* Add sphinx-quickstart generated docs

* Add api.rst

* Edit index.rst

* Add autodocumenting Manticore class

* Update Manticore docstring

* Doc verbosity

* Doc hook and add_hook

* More docs

* Add Sphinx dev dep

For building docs
2017-03-22 15:44:03 -04:00