def filter_coms_blacklist(cmt):
"""
These are standards coms, we don't want them in the DB
"""
if cmt is None:
g_logger.error("No comment provided to filter_coms")
return True
black_list = [
"size_t", "int", "LPSTR", "char", "char *", "lpString",
"dw", "lp", "Str", "Dest", "Src", "cch", "Dst", "jumptable",
"switch ", "unsigned int", "void *", "Size",
"indirect table for switch statement", "this", "jump table for",
"switch jump", "nSize", "hInternet", "hObject",
"SEH", "Exception handler", "Source", "Size", "Val", "Time",
"struct", "unsigned __int", "__int32", "void (", "Memory",
"HINSTANCE", "jumptable"
]
for elem in black_list:
if cmt.lower().startswith(elem.lower()):
g_logger.debug("Comment %s has been blacklisted", cmt)
return True
return False
评论列表
文章目录