python-计算资源图标的crc值
来源:互联网 发布:淘宝卖家15天账期延长 编辑:程序博客网 时间:2024/06/06 07:44
关键在于解析资源信息,找到icon的数据,然后计算这些数据的crc
#---------------------------------------------------------------------- def _get_iconcrc(self, file_path): """ Generates the crc32 hash of the icon of the file. @return: str, the str value of the file's icon """ iconData = "" mype = pefile.PE(file_path) if hasattr(mype, "DIRECTORY_ENTRY_RESOURCE"): resIcons = filter(lambda x: x.id==pefile.RESOURCE_TYPE['RT_ICON'], mype.DIRECTORY_ENTRY_RESOURCE.entries) if len(resIcons)>0: resIcons = resIcons[0] if hasattr(resIcons, "directory"): for resId in resIcons.directory.entries: if hasattr(resId, 'directory'): for resLang in resId.directory.entries: iconData += mype.get_data(resLang.data.struct.OffsetToData, resLang.data.struct.Size) if not iconData: print "not iconData" return None else: return self._crc32(iconData)
- python-计算资源图标的crc值
- 查表法计算crc的python演示程序
- java计算文件的CRC校验值
- STM32的CRC计算
- 测试python计算MD5和CRC的速度
- 计算资源中ICON,Image,Bmp的CRC值,检查自己的程序图片是否被篡改
- 计算CRC
- crc计算
- Python CRC-Modbus的实现
- iPhone下,计算图片的crc
- 计算CDT规约的8位CRC
- 图标等资源的引用
- 查表法计算CRC
- CRC计算校验码过程
- Perl计算CRC
- CRC原理与计算
- CRC计算程序
- 如何计算CRC校验码
- python 求crc32的值
- C++类overlode、override和overwrite详细解释
- vim的分割窗口
- PHP原理之内存管理
- 关于C/C++中结构体(Struct)类型的sizeof结果的探讨
- python-计算资源图标的crc值
- Hadoop 全局变量与数据传递
- 关于伸缩对话框的使用
- redhat enterprise linux as4 update 8(RHEL AS4 U8) 下载
- myeclipse中的快捷键
- Android中ProgressDialog的简单示例
- iOS中后台运行
- 界面无延迟显示数据后台计算
- Oracle常用小知识(一)