1
0
Fork
You've already forked PacketQ
0
forked from DNS-OARC/PacketQ
A tool that provides a basic SQL-frontend to PCAP-files
  • JavaScript 48.4%
  • C++ 38.9%
  • CSS 3.7%
  • Shell 2.5%
  • HTML 2.4%
  • Other 4.1%
2026年03月22日 11:02:05 +01:00
.builds CI updates 2025年09月10日 10:51:03 +02:00
.forgejo/workflows actions 2026年03月22日 10:59:02 +01:00
collector_sample Added pcap. to filename 2011年05月04日 11:46:18 -07:00
debian Migrate to Codeberg 2025年09月02日 12:48:43 +02:00
html moved files up 2011年05月02日 10:04:24 +02:00
html_NG Added our extended GUI 2013年01月21日 16:38:04 +01:00
m4 Coverage 2020年08月13日 11:35:53 +02:00
pcap New option to escape DNS names 2021年10月19日 09:14:27 +02:00
rpm Migrate to Codeberg 2025年09月02日 12:48:43 +02:00
src QTYPE/RCODE 2026年02月11日 14:46:07 +01:00
.clang-format Update code format and move Murmur into it's own dir 2017年08月17日 09:53:17 +02:00
.gitignore Release 1.7.3 2024年09月04日 14:48:54 +02:00
autogen.sh Copyright 2024年08月29日 10:32:17 +02:00
CHANGES Release 1.7.3 2024年09月04日 14:48:54 +02:00
configure.ac Migrate to Codeberg 2025年09月02日 12:48:43 +02:00
COPYING Cleanup and license change 2017年05月15日 17:00:39 +02:00
FAQ.md Move wiki documentation into the repository 2017年05月19日 09:12:22 +02:00
FIELDS.md Couting labels 2022年04月05日 10:20:48 +02:00
fmt.sh Code format 2021年10月19日 09:18:17 +02:00
FUNCTIONS.md MaxMind DB 2022年04月04日 13:25:52 +02:00
Makefile.am Copyright 2024年08月29日 10:32:17 +02:00
README.md Migrate to Codeberg 2025年09月02日 12:48:43 +02:00
sonar-project.properties.local Documentation, sonar 2020年06月16日 14:16:03 +02:00

PacketQ

Bugs Security Rating

packetq is a command line tool to run SQL queries directly on PCAP files, the results can be outputted as JSON (default), formatted/compact CSV and XML. It also contain a very simplistic web-server in order to inspect PCAP files remotely. PacketQ was previously known as DNS2db but was renamed in 2011 when it was rebuilt and could handle protocols other than DNS among other things.

More information is provided in our FAQ, functions, and fields documentation.

A short demo-video of PacketQ's capabilities is available on http://www.youtube.com/watch?v=70wJmWZE9tY

Features

  • Super-fast native decoding of PCAP-files (even gzipped) and dirt-quick in-memory sorting algorithms.
  • A extensible protocol decoding design with build in support for ICMP and DNS from start.
  • Support for grouping, sorting, counting and most other important SQL-functions.
  • Only dependent on zlib, no other hard-to-find libs needed. Compiles on everything.
  • Build-in web-server, JSON API and a simple JQuery-based GUI concept application with graphs.
  • Can be designed to cache queries by pre-processing PCAPs into static JSON-files that can be used to make queries again.
  • Built in DNS-resolver function (used by GUI).
  • Support for sampling. Helps when making queries to large, uniform PCAP-files.
  • Can convert flags in packet-headers to text on the fly.
  • Can make multiple queries towards the same data in memory.

More information may be found here:

Issues should be reported here:

General support and discussion:

Dependencies

PacketQ requires a couple of libraries beside a normal C++ compiling environment with autoconf, automake, libtool and pkgconfig.

PacketQ has an optional dependency on the MaxMindDB library (for the CC() and ASN() functions).

To install the dependencies under Debian/Ubuntu:

apt-get install -y zlib1g-dev libmaxminddb-dev

To install the dependencies under CentOS (with EPEL/PowerTools enabled):

yum install -y zlib-devel libmaxminddb-devel

Build from GitHub

git clone https://codeberg.org/DNS-OARC/PacketQ.git
cd PacketQ
./autogen.sh
./configure [options]
make
make install

Building from source tarball

The source tarball from DNS-OARC comes prepared with configure:

tar zxvf packetq-version.tar.gz
cd packetq-version
./configure [options]
make
make install

Usage example

Retrieves the 10 first packets containing DNS information from the file sample.pcap:

packetq -s "select * from dns limit 10" sample.pcap

Starts a web-server on port 8080 (-p8080) as a daemon (-d) serving files from the directory html/ (-w html/) and PCAP files from the directory pcap/ (-r pcap/):

packetq -d -p8080 -w html/ -r pcap/

Author(s)

Contributor(s)

See also the full list of contributors.

Copyright (c) 2017-2024 OARC, Inc.

Copyright (c) 2011-2017, IIS - The Internet Foundation in Sweden

All rights reserved.

This file is part of PacketQ.
PacketQ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PacketQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PacketQ. If not, see <http://www.gnu.org/licenses/>.