Skip to content

Instantly share code, notes, and snippets.

@pronto
Created November 21, 2013 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pronto/7586837 to your computer and use it in GitHub Desktop.
Save pronto/7586837 to your computer and use it in GitHub Desktop.
class ScanIP(Base):
__tablename__='ScanIP'
pk = Column(Integer,Sequence('pk'), primary_key=True)
ip = Column(VARCHAR(39))
class ScanPort(Base):
__tablename__='ScanPort'
pk = Column(Integer,Sequence('pk'), primary_key=True)
ip_pk= Column(Integer, ForeignKey('ScanIP.pk'))
portnum = Column(VARCHAR(5))
dtime = Column(DATETIME)
#so; each ip scanned will have a uniq entry in ScanIP
#each scan, if the port is open, it'll be tossed into ScanPort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment