ROSE
0.9.12.28
|
Binary specimen.
The speciment represents the thing that is to be tested, but not how to test it. In other words, a specimen might be an executable, but not any specifics about how to run the executable such as which arguments to give it.
Definition at line 123 of file BinaryConcolic.h.
#include <BinaryConcolic.h>
Public Types | |
typedef Sawyer::SharedPointer< Specimen > | Ptr |
Referenc-counting pointer to a Specimen. More... | |
Public Member Functions | |
void | open (const boost::filesystem::path &executableName) |
Open an executable file. More... | |
void | close () |
Close the executable file. More... | |
bool | isEmpty () const |
Test whether this object is empty. More... | |
std::string | printableName (const DatabasePtr &db=DatabasePtr()) |
Returns printable name of specimen for diagnostic output. More... | |
const std::vector< uint8_t > & | content () const |
Property: Specimen content. More... | |
void | content (std::vector< uint8_t > binary_data) |
The setter helps to conveniently populate a Specimen's properties from a database query. More... | |
std::string | name () const |
Property: Specimen name. More... | |
void | name (const std::string &) |
Property: Specimen name. More... | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. More... | |
SharedObject (const SharedObject &) | |
Copy constructor. More... | |
virtual | ~SharedObject () |
Virtual destructor. More... | |
SharedObject & | operator= (const SharedObject &) |
Assignment. More... | |
Public Member Functions inherited from Sawyer::SharedFromThis< Specimen > | |
SharedPointer< Specimen > | sharedFromThis () |
Create a shared pointer from this . More... | |
SharedPointer< const Specimen > | sharedFromThis () const |
Create a shared pointer from this . More... | |
Static Public Member Functions | |
static Ptr | instance (const boost::filesystem::path &executableName) |
Allocating constructor. | |
static Ptr | instance () |
Allocating constructor. | |
Referenc-counting pointer to a Specimen.
Definition at line 126 of file BinaryConcolic.h.
void Rose::BinaryAnalysis::Concolic::Specimen::open | ( | const boost::filesystem::path & | executableName | ) |
void Rose::BinaryAnalysis::Concolic::Specimen::close | ( | ) |
bool Rose::BinaryAnalysis::Concolic::Specimen::isEmpty | ( | ) | const |
std::string Rose::BinaryAnalysis::Concolic::Specimen::name | ( | ) | const |
Property: Specimen name.
This should be a printable name, such as a file name. It's used mostly for informational purposes such as debugging. There is no requirement that names be unique or non-empty or contain only printable characters.
Thread safety: This methods is thread-safe.
void Rose::BinaryAnalysis::Concolic::Specimen::name | ( | const std::string & | ) |
Property: Specimen name.
This should be a printable name, such as a file name. It's used mostly for informational purposes such as debugging. There is no requirement that names be unique or non-empty or contain only printable characters.
Thread safety: This methods is thread-safe.
std::string Rose::BinaryAnalysis::Concolic::Specimen::printableName | ( | const DatabasePtr & | db = DatabasePtr() | ) |
Returns printable name of specimen for diagnostic output.
Returns a string suitable for printing to a terminal, containing the word "specimen", the database ID if appropriate, and the specimen name using C-style double-quoted string literal syntax if not empty. The database ID is shown if a non-null database is specified and this specimen exists in that database.
const std::vector<uint8_t>& Rose::BinaryAnalysis::Concolic::Specimen::content | ( | ) | const |
void Rose::BinaryAnalysis::Concolic::Specimen::content | ( | std::vector< uint8_t > | binary_data | ) |
The setter helps to conveniently populate a Specimen's properties from a database query.