Browse Source

log op count

master
JoYo 3 years ago
parent
commit
8d8df2ab5a
  1. 5
      sins/orm.py

5
sins/orm.py

@ -6,9 +6,8 @@ from sqlalchemy import LargeBinary, Column, ForeignKey, Integer, String, DateTim
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship, backref
from sqlalchemy.orm.collections import attribute_mapped_collection
import json
from .disassemble import objdump
from .disassemble import objdump, disasm
now = '{0:%Y%m%dT%H%M%S}'.format(datetime.utcnow())
Base = declarative_base()
@ -49,6 +48,8 @@ class ScrapNode(Base):
values = {
'checksum': self.checksum,
'length': self.length,
# todo remove for performance
'operations': len(disasm(self.image)),
'parent_id': self.parent_id,
'id': self.id,
}

Loading…
Cancel
Save