mirror of https://github.com/dirtbags/netarch.git
add an import harness to start-here.py
This commit is contained in:
parent
ae8ceead45
commit
89ae0c868b
|
@ -85,8 +85,8 @@ class StinkyPinkySession(ip.HtmlSession):
|
||||||
self.log(packet.firstframe, packet.text, True)
|
self.log(packet.firstframe, packet.text, True)
|
||||||
|
|
||||||
|
|
||||||
# execution harness
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
''' an execution harness '''
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
sessions = {}
|
sessions = {}
|
||||||
dp = ip.Dispatch(*sys.argv[1:])
|
dp = ip.Dispatch(*sys.argv[1:])
|
||||||
|
@ -99,3 +99,6 @@ if __name__ == '__main__':
|
||||||
sessions[fhash].handle(is_srv, frame, gs, dp.last)
|
sessions[fhash].handle(is_srv, frame, gs, dp.last)
|
||||||
for sess in sessions.itervalues():
|
for sess in sessions.itervalues():
|
||||||
sess.done()
|
sess.done()
|
||||||
|
else:
|
||||||
|
''' an import harness '''
|
||||||
|
session = StinkyPinkySession
|
||||||
|
|
Loading…
Reference in New Issue