Example #1
0
        result.end_form()

        result.para("The following inodes will be annotated:")
        result.start_table(**{'class':'GeneralTable'})
        for inode_id in new_query.getarray("annotate_inode"):
            path, inode, inode_id = fsfd.lookup(inode_id = inode_id)
            
            result.row(inode, path)

    result.toolbar(cb = mass_annotate, icon="annotate.png",
                   tooltip = "Annotate all selected inodes",
                   pane='popup')

    return self.name

add_display_hook(AFF4URN, "render_annotate_inode_id", render_annotate_inode_id)
add_display_hook(ThumbnailType, "render_annotate_inode_id", render_annotate_inode_id)

AFF4URN.operator_annotated = operator_annotated
if AFF4URN.column_decorator != column_decorator:
    original_column_decorator = AFF4URN.column_decorator
    AFF4URN.column_decorator = column_decorator

class InterestingIPObj(TableObj.TableObj):
    table = "interesting_ips"
    columns = (
        'ip', 'IP Address',
        'notes','Notes',
        'category', 'category',
        )
Example #2
0
        table_renderer.add_file_from_string(filename, tmp.__str__())

    return "<a href='%s' target='_blank' >%s</a>" % (filename, tmp3)


def insert(self, value):
    ### When inserted we need to convert them from string to ints
    if config.PRECACHE_IPMETADATA == True:
        lookup_whois(value)

    return "_" + self.column, "inet_aton(%r)" % value.strip()


from pyflag.ColumnTypes import IPType, add_display_hook, clear_display_hook

add_display_hook(IPType, "geoip_display_hook", geoip_display_hook, 1)

IPType.insert = insert
IPType.extended_csv = extended_csv
IPType.operator_whois_country = operator_whois_country
IPType.code_maxmind_isp_like = code_maxmind_isp_like
IPType.code_maxmind_isp = code_maxmind_isp
IPType.operator_maxmind_isp = operator_maxmind_isp
IPType.operator_maxmind_isp_like = operator_maxmind_isp_like
IPType.code_maxmind_org = code_maxmind_org
IPType.code_maxmind_org_like = code_maxmind_org_like
IPType.operator_maxmind_org = operator_maxmind_org
IPType.operator_maxmind_org_like = operator_maxmind_org_like
IPType.code_maxmind_city = code_maxmind_city
IPType.operator_maxmind_city = operator_maxmind_city
IPType.code_maxmind_country = code_maxmind_country
Example #3
0
                                                           report="LookupIP", address=value),
                           result = tmp)
            table_renderer.add_file_from_string(filename, tmp.__str__())

        return "<a href='%s' target='_blank' >%s</a>" % (filename, tmp3)
    

def insert(self, value):
    ### When inserted we need to convert them from string to ints
    if config.PRECACHE_IPMETADATA==True:
        lookup_whois(value)

    return "_"+self.column, "inet_aton(%r)" % value.strip()
    
from pyflag.ColumnTypes import IPType, add_display_hook, clear_display_hook
add_display_hook(IPType, "geoip_display_hook", geoip_display_hook,1)

IPType.insert = insert
IPType.extended_csv = extended_csv
IPType.operator_whois_country = operator_whois_country
IPType.code_maxmind_isp_like = code_maxmind_isp_like
IPType.code_maxmind_isp = code_maxmind_isp
IPType.operator_maxmind_isp = operator_maxmind_isp
IPType.operator_maxmind_isp_like = operator_maxmind_isp_like
IPType.code_maxmind_org = code_maxmind_org
IPType.code_maxmind_org_like = code_maxmind_org_like
IPType.operator_maxmind_org = operator_maxmind_org
IPType.operator_maxmind_org_like = operator_maxmind_org_like
IPType.code_maxmind_city = code_maxmind_city
IPType.operator_maxmind_city = operator_maxmind_city
IPType.code_maxmind_country = code_maxmind_country
Example #4
0
        result.end_form()

        result.para("The following inodes will be annotated:")
        result.start_table(**{'class':'GeneralTable'})
        for inode_id in new_query.getarray("annotate_inode"):
            path, inode, inode_id = fsfd.lookup(inode_id = inode_id)
            
            result.row(inode, path)

    result.toolbar(cb = mass_annotate, icon="annotate.png",
                   tooltip = "Annotate all selected inodes",
                   pane='popup')

    return self.name

add_display_hook(InodeIDType, "render_annotate_inode_id", render_annotate_inode_id)
InodeIDType.operator_annotated = operator_annotated
if InodeIDType.column_decorator != column_decorator:
    original_column_decorator = InodeIDType.column_decorator
    InodeIDType.column_decorator = column_decorator

class InterestingIPObj(TableObj.TableObj):
    table = "interesting_ips"
    columns = (
        'ip', 'IP Address',
        'notes','Notes',
        'category', 'category',
        )

    add_constraints = {
        'category': TableActions.selector_constraint,