Coder Social home page Coder Social logo

kanika2296 / extract-features-pcap-sqllite Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 375 KB

Extract network features from pcap files using python pyshark and storing them in SQL LITE DB

Python 100.00%
pcap pcap-analyzer pcap-files pyshark tshark python3 python sqllite3 database network pcap-features network-fratures

extract-features-pcap-sqllite's Introduction

#Extract network features from pcap files using python pyshark and storing them in SQL LITE DB

Features

  1. session_ttl_min : return min ttl value. ttl is extracted using pkt.ip.ttl as ttl is part of ip header
  2. session_packets : returns total number of packets in that session.
  3. session_packet_size_avg : returns avg length of packets in that session . Calculate using pkt.length (part of frame) of each packet added divided by total packets (using feature 2)
  4. session_tcp_analysis_retransmission : returns number of retransmission packets per session. retramission is property of tcp analysis thus is calculated by finding number of packets with "analysis_retransmission" in pkt.tcp.field_names
  5. session_tcp_analysis_duplicate_ack : returns number of duplicate ack packets per session. duplicate ack is also property of tcp analysis thus is calculated by finding number of packets with "analysis_duplicate_ack" in pkt.tcp.field_names

Files used

  1. iot1_new.pcap : number of packets 5000 :329 session
  2. iot2_new.pcap : number of packets 5000 : 275 session

Libraries used numpy, pandas, pyshark (tshark's python wrapper), splite3( for sql lite db), statistics, os, nest_asyncia

Functions

  1. create_connection(db_file) : to create a db
  2. create_table(conn, table) : to create db table
  3. create_entry(conn,task) : to insert data values in db

extract-features-pcap-sqllite's People

Contributors

kanika2296 avatar

Watchers

 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.