MCPcopy Create free account
hub / github.com/ActiveState/code / run

Method run

recipes/Python/286240_Python_portscanners/recipe-286240.py:22–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 self.sd = sk.socket(sk.AF_INET, sk.SOCK_STREAM)
21
22 def run(self):
23 try:
24 # connect to the given host:port
25 self.sd.connect((self.host, self.port))
26 print "%s:%d OPEN" % (self.host, self.port)
27 self.sd.close()
28 except: pass
29
30class pyScan:
31 def __init__(self, args=[]):

Callers 1

recipe-286257.pyFile · 0.45

Calls 5

socketMethod · 0.80
connectMethod · 0.45
closeMethod · 0.45
getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected