Пример #1
0
class FunctionInfo(db.Model):
    """
        Function information. Contains function's name, machoc hash and
        address. Used for quick function access. Machoc hash can be
        updated by tasks or by skelenox itself.
    """
    __tablename__ = 'functioninfo'
    id = db.Column(db.Integer, primary_key=True)
    address = db.Column(db.BigInteger(), index=True)
    name = db.Column(db.String(), index=True)
    machoc_hash = db.Column(db.BigInteger(), index=True)
    sample_id = db.Column(db.Integer(), db.ForeignKey("sample.id"), index=True)
Пример #2
0
class IDAAction(db.Model):
    """
        Abstract class for implementing IDA actions.
        This mirrors actions done by the analyst on his database
    """
    __tablename__ = "idaactions"
    id = db.Column(db.Integer(), primary_key=True)

    # The action data
    data = db.Column(db.String())

    # The address where the action occured
    address = db.Column(db.BigInteger(), index=True)

    # We must keep timestamp to reorder actions
    timestamp = db.Column(db.DateTime(), index=True)

    # We also keep the last user
    user_id = db.Column(db.Integer, db.ForeignKey('user.id'))

    # The action type
    type = db.Column(db.String(), index=True)
    __mapper_args__ = {
        'polymorphic_identity': 'idaactions',
        'polymorphic_on': type
    }