Source Code for network and port scanner, TRW algorithm, and reduction method implementations.

erase.py 357B

123456789101112131415161718
  1. hash = {"123": {"hola":{"wassup":9}}}
  2. sip = "123"
  3. dip = "hola"
  4. dport = "wassup"
  5. if not hash.get(sip):
  6. hash[sip] = {dip :{ dport: 5}}
  7. if not hash.get(sip).get(dip):
  8. hash[sip][dip] = {dport:1}
  9. print "hola"
  10. if not hash.get(sip).get(dip).get(dport):
  11. hash[sip][dip][dport] = 7
  12. else:
  13. hash[sip][dip][dport] +=1
  14. print hash