• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >python > Python获取文件ssdeep值的方法

Python获取文件ssdeep值的方法

作者:shichen2014 字体:[增加 减小] 来源:互联网

shichen2014 通过本文主要向大家介绍了ssdeep,python 函数返回值,python求平均值,python 取绝对值,python函数返回多个值等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

本文实例讲述了Python获取文件ssdeep值的方法,分享给大家供大家参考。具体方法如下:

首先,得到ssdeep值,需要先import ssdeep
在ubuntu上安装pyssdeep时 一直出错  后来发现apt-cache search "ssdeep"时把几个全apt-get install 上,但问题依旧。
后来下载到pyssdeep的源文件 ,tar zxvf pyssdeep.tar.zip 然后 apt-get install python-dev 然后 python setup.py install  就安装上了。
总体来看应该是没装python-dev的原因。

具体代码如下:

  def _get_ssdeep(self, file_path): 
    """ 
    Generates the ssdeep fuzzy hash of the file. 
    @return: ssdeep fuzzy hash of the file 
    """ 
    if not IS_SSDEEP: 
      return None 
 
    try: 
      return ssdeep.ssdeep().hash_file(file_path) 
    except: 
      return None 
</div>

希望本文所述对大家的Python程序设计有所帮助。

</div>

您可能想查找下面的文章:

  • Python获取文件ssdeep值的方法
  • Python获取文件ssdeep值的方法

相关文章

  • Python中Collections模块的Counter容器类使用教程
  • Python中动态获取对象的属性和方法的教程
  • python如何在终端里面显示一张图片
  • Windows下Python2与Python3两个版本共存的方法详解
  • 用实例分析Python中method的参数传递过程
  • Python捕捉和模拟鼠标事件的方法
  • Python与Java间Socket通信实例代码
  • python中执行shell的两种方法总结
  • 详解Python的Flask框架中的signals信号机制
  • Python深入学习之对象的属性

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • Python中map,reduce,filter和sorted函数的使用方法
    • Python打包可执行文件的方法详解
    • python中getattr函数使用方法 getattr实现工厂模式
    • 结合Python的SimpleHTTPServer源码来解析socket通信
    • python实现的一个火车票转让信息采集器
    • Python中atexit模块的基本使用示例
    • python处理图片之PIL模块简单使用方法
    • Python Tkinter基础控件用法
    • Python3.x版本中新的字符串格式化方法
    • python中使用mysql数据库详细介绍

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有