123456789101112131415161718 |
-
-
- hash = {"123": {"hola":{"wassup":9}}}
- sip = "123"
- dip = "hola"
- dport = "wassup"
-
- if not hash.get(sip):
- hash[sip] = {dip :{ dport: 5}}
- if not hash.get(sip).get(dip):
- hash[sip][dip] = {dport:1}
- print "hola"
- if not hash.get(sip).get(dip).get(dport):
- hash[sip][dip][dport] = 7
- else:
- hash[sip][dip][dport] +=1
-
- print hash
|