bulkanalyzer

package module
v0.0.0-...-f44cb42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

README

BulkAnalyzer Logo

made-with-Go License GitHub go.mod Go version of a Go module GoDoc reference example GoReportCard example

Project status: Work in progress

We do not recommend to use this tool in any production related scenario. It still under development, and its not widely tested.

Requirements

  • Docker installed and properly configured.

Built-in analyzers support

  • Oyente: at single core speed: 1.66 contracts/second
  • Honeybadger: WIP
  • Vandal: WIP
  • Conkas: WIP

Latest release

Download

Contributing

Everybody is welcome to contribute to the project. Please check out the Contribution Steps for instructions about how to proceed.

And any other comments will be very appreciate.

License

All rights reserved to project author(s)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Uses GPL license described below

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENSE file for full license details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidAddress

func IsValidAddress(addr string) error

IsValidAddress return error when invalid address is provided

func IsValidBytecode

func IsValidBytecode(bytecode string) error

IsValidBytecode return error when invalid bytecode sequence is provided

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

func (*Analyzer) ExistFile

func (bulk *Analyzer) ExistFile(path string) bool

func (*Analyzer) Run

func (bulk *Analyzer) Run(csvPath string, opts *Options) error

type Options

type Options struct {
	// name of the docker image to execute
	DockerImage string
	// name of the tool being used
	ToolName string
	// number of containers to deploy
	// this is required for parallel analysis execution using
	// different workers (containers)
	MaxContainers uint
	// flag to indicate if bytecode 0x prefix needs to be removed or not
	Remove0xPrefix bool
	// flag to indicate if we need to skip CSV header row
	SkipHeaderRow bool
	// function used to parse the results of the analysis
	Parser func(out []byte) ([][]byte, error)
	// function used to build the command that triggers the analysis
	BuildCommand func(containerName string, address string, code string) string
	// function that returns a pre-defined failed return result in a structured format
	OnFailedReturn func() ([][]byte, error)
	// debug flag to enable a more verbose output
	Debug bool
}

Options is a wrapper struct that contains all configurable parameters for specific analysis

func (Options) ValidToolName

func (o Options) ValidToolName() bool

ValidToolName returns true when tool name has a valid value Use this check to avoid directory traversing bugs

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL