Created
November 21, 2013 18:26
-
-
Save pronto/7586837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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