Giter Club home page Giter Club logo

extract_ssl_certs's Introduction

exctract_ssl_certs.py

从已有的pcap或cap文件中,提取HTTPS握手阶段产生的证书文件。

例子

D:\Python\提取证书>extract_ssl_certs.py -f d:\test\123.pcap
2015-10-30 15:56:20,644 52 DEBUG Extract: d:\test\123.pcap
2015-10-30 15:56:21,084 120 INFO 192.243.112.130.crt
2015-10-30 15:56:21,085 120 INFO 140.207.232.110.crt
2015-10-30 15:56:21,086 120 INFO 61.135.169.121.crt
2015-10-30 15:56:21,088 120 INFO 112.65.203.33.crt
2015-10-30 15:56:21,088 120 INFO 110.76.18.156.crt
2015-10-30 15:56:21,089 120 INFO 61.135.169.125.crt
2015-10-30 15:56:21,091 120 INFO 140.207.232.109.crt
2015-10-30 15:56:21,107 120 INFO 111.206.76.32.crt
2015-10-30 15:56:21,109 120 INFO 203.208.40.158.crt
2015-10-30 15:56:21,112 135 INFO Extract 9 crt files.

运行环境

命令行参数

  • -f,--file,与-d二选一,指定一个文件名,从该文件中提取ssl证书
  • -d,--dir,与-f二选一,指定一个目录,从该目录及其子目录中的所有文件中,提取ssl证书
  • -e,--exclude,可选,指定一个包含IP列表的文件,所有在此文件中的IP地址,将在提取过程中被跳过,用户可能希望跳过以获证书,或用来加速程序运行。

extract_ssl_certs.py

Extract ssl certificates from cap file

Example

D:\Python\extract>extract_ssl_certs.py -f d:\test\123.pcap
2015-10-30 15:56:20,644 52 DEBUG Extract: d:\test\123.pcap
2015-10-30 15:56:21,084 120 INFO 192.243.112.130.crt
2015-10-30 15:56:21,085 120 INFO 140.207.232.110.crt
2015-10-30 15:56:21,086 120 INFO 61.135.169.121.crt
2015-10-30 15:56:21,088 120 INFO 112.65.203.33.crt
2015-10-30 15:56:21,088 120 INFO 110.76.18.156.crt
2015-10-30 15:56:21,089 120 INFO 61.135.169.125.crt
2015-10-30 15:56:21,091 120 INFO 140.207.232.109.crt
2015-10-30 15:56:21,107 120 INFO 111.206.76.32.crt
2015-10-30 15:56:21,109 120 INFO 203.208.40.158.crt
2015-10-30 15:56:21,112 135 INFO Extract 9 crt files.

Runtime Env

  • Python 2.7.X
  • dpkt

Args

  • -f,--file Specifies a filename, from where this program extract ssl certificates.
  • -d,--dir Specifies a directory of a folder, from where, besides its sub folder, program extract ssl certificates.
  • -e,--exclude. Optional. Specifies a filename containing an ip list. Ips in this list will be skipped when extracting.

extract_ssl_certs's People

Contributors

master-13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.