예제 #1
0
파일: info.py 프로젝트: maximerobin/Ufwi
    def entry_form(self, entry):
        """ We transform IP form to a string
            @param entry [tuple]
            @return [tuple]

            id, username, oob_time_sec, oob_time_usec, oob_in, oob_out, oob_prefix, oob_mark, ip_saddr_str,
            ip_daddr_str, ...
        """
        result = (entry[0],)
        result += (anonymizer.anon_username(self.ctx, entry[1]),)

        result += entry[2:8]
        result += (anonymizer.anon_ipaddr(self.ctx, self.ip2str(entry[8])),)
        result += (anonymizer.anon_ipaddr(self.ctx, self.ip2str(entry[9])),)
        result += entry[10:16]
        result += (self.proto2str(entry[16]),)
        result += (1 if entry[17] else 0,)
        result += entry[18:34]
        result += (anonymizer.anon_appname(self.ctx, entry[34]),)
        result += entry[35:]

        return result
예제 #2
0
파일: table.py 프로젝트: maximerobin/Ufwi
 def entry_form(self, result):
     return (anonymizer.anon_appname(self.ctx, result[0]),
             (anonymizer.anon_username(self.ctx, result[1])),
             result[2], result[3], result[4])
예제 #3
0
파일: table.py 프로젝트: maximerobin/Ufwi
 def entry_form(self, entry):
     return (anonymizer.anon_appname(self.ctx, entry[0]),) + entry[1:]