I wrote a simple program which reads IpTables log results , remove 90% of the output , and what is left is:
192.168.1.1 152 192.168.1.1 17485 192.168.1.1 5592 Where, the first column contains source IP , the second one destination Port. Those values are stored in a string. I would like to transfer the values from that string to a Hashtable, but I don't have any idea how.
Hashtable<String, String> IpDpt = new Hashtable<String, String>(); hmIpDpt.put(IP1,DPT1); hmIpDpt.put(IP1,DPT2); hmIpDpt.put(IP1,DPT3); hmIpDpt.put(IP2,DPT4);