Skip to content

Commit

Permalink
Merge pull request #34 from jemcek/gtk3ready
Browse files Browse the repository at this point in the history
Gtk3ready
  • Loading branch information
jemcek authored Oct 20, 2023
2 parents 9b43b49 + b44bd91 commit 7d0c98b
Show file tree
Hide file tree
Showing 53 changed files with 7,036 additions and 14,766 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ missing
packETH
src/*.o
src/.deps/*
src/pixmaps.[ch]
src/ui.[ch]
cli/*.o
stamp-h1
!configure.ac
40 changes: 28 additions & 12 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
bin_PROGRAMS=packETH

packETH_built_sources = \
src/pixmaps.c src/pixmaps.h \
src/ui.c src/ui.h

packETH_SOURCES= \
$(packETH_built_sources) \
src/main.c \
src/support.c src/support.h \
src/interface.c src/interface.h \
Expand All @@ -11,23 +17,18 @@ packETH_SOURCES= \
src/headers.h

pixmaps= \
src/pixmaps/pixmaps.gresource.xml \
src/pixmaps/Build.xpm \
src/pixmaps/donate.xpm \
src/pixmaps/future.xpm \
src/pixmaps/Gen.xpm \
src/pixmaps/interface.xpm \
src/pixmaps/load.xpm \
src/pixmaps/preference.xpm \
src/pixmaps/reset.xpm \
src/pixmaps/save.xpm \
src/pixmaps/save16.xpm \
src/pixmaps/send.xpm \
src/pixmaps/X.xpm

pixmapdir=$(pkgdatadir)/pixmaps
pixmap_DATA=$(pixmaps)

ui= \
ui/ui.gresource.xml \
ui/about_dialog.ui \
ui/error_dialog.ui \
ui/fileselection1.ui \
Expand All @@ -40,9 +41,6 @@ ui= \
ui/udp_payload_dialog.ui \
ui/window1.ui

uidir=$(pkgdatadir)/ui
ui_DATA=$(ui)

DEFS= \
-DPKGDATADIR=\"$(pkgdatadir)/\"

Expand All @@ -58,5 +56,23 @@ AM_CPPFLAGS = \
-Wl,--export-dynamic \
$(DEPS_CFLAGS)

# Include the dev and pixmaps in the distribution (make dist)
EXTRA_DIST=dev src/pixmaps $(ui)
# Include the pixmaps and ui in the distribution (make dist)
EXTRA_DIST=$(pixmaps) $(ui)

BUILT_SOURCES = \
$(packETH_built_sources)

CLEANFILES = \
$(packETH_built_sources)

src/pixmaps.c: $(pixmaps)
$(AM_V_GEN) glib-compile-resources --generate-source --sourcedir=src/pixmaps --target=$@ src/pixmaps/pixmaps.gresource.xml

src/pixmaps.h: $(pixmaps)
$(AM_V_GEN) glib-compile-resources --generate-header --sourcedir=src/pixmaps --target=$@ src/pixmaps/pixmaps.gresource.xml

src/ui.c: $(ui)
$(AM_V_GEN) glib-compile-resources --generate-source --sourcedir=ui --target=$@ ui/ui.gresource.xml

src/ui.h: $(ui)
$(AM_V_GEN) glib-compile-resources --generate-header --sourcedir=ui --target=$@ ui/ui.gresource.xml
71 changes: 44 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,79 @@

packETH is GUI and CLI packet generator tool for ethernet. It allows you to create and send any possible packet or sequence of packets on the ethernet link. It is very simple to use, powerful and supports many adjustments of parameters while sending packets. It runs on Linux.

With the GUI version (packETH) you can create and send packets. With the CLI version (packETHcli) you can only send already stored packets from pcap file. The CLI version also has a receiver mode, that can count packets and check if all packets that were sent were also received.
With the GUI version (packETH) you can create and send packets. With the CLI version (packETHcli) you can only send already stored packets from pcap file. The CLI version also has a receiver mode, that can count packets and check if all packets that were sent were also received.

More information about installation, usage, GUI and CLI version and FAQ can be found here:
Some more information about installation, usage, GUI and CLI version and FAQ can also be found [here](https://packeth.sourceforge.net/packeth/Home.html).

http://packeth.sourceforge.net/packeth/Home.html
[Blog](https://packeth.wordpress.com) with some use cases.

Blog with some use cases:
## NEWS

https://packeth.wordpress.com
### OCT 2023

- migrated to GTK3 (many thanks to @qarkai)

### JUL 2019

## NEWS JUL 2019:
- packETHcli added burst mode (-m -6)

## NEWS 27.11.2018:
### 27.11.2018

- packETHcli added receiver option (mode -m -9) to count received packets
- packETHcli added option to incluce pattern (predifined or custom) which can be checked by packETHcli in receiver mode if all packets that were sent were also correctly received at the receiver site
- packETHcli - nanoseconds support
- Receiver mode: https://packeth.wordpress.com/2018/12/05/reciver-mode-check-for-dropped-packets/
- CLI tips: https://packeth.wordpress.com/2018/11/12/packethcli-some-practical-tips-1/
- [Receiver mode](https://packeth.wordpress.com/2018/12/05/reciver-mode-check-for-dropped-packets/)
- [CLI tips](https://packeth.wordpress.com/2018/11/12/packethcli-some-practical-tips-1/)

## INSTALLATION

### GUI

git clone https://github.com/jemcek/packETH.git
```sh
git clone https://github.com/jemcek/packETH.git

cd packETH
./autogen.sh (you will need aclocal,autoconf,autoheader and automake installed to run this)
autoreconf -f -i (optional) - in case you get automake version mismatch, missing files etc...
./autogen.sh # you will need aclocal, autoconf, autoheader and automake installed to run this
autoreconf -f -i # optional - in case you get automake version mismatch, missing files etc...
./configure
make
make install (optional)
./packETH
make install # optional
./packETH
```

Depending on your Linux distribution and type of installation additional packages may be needed. For example:

#### Centos 7.4 (minimal):
#### Centos 7.4 (minimal)

```sh
yum groupinstall 'Development Tools'
yum install gtk2-devel.x86_64
yum install gtk3-devel.x86_64
```

#### Ubuntu 18.04 server

```sh
sudo apt-get install build-essential
sudo apt-get install autoconf
sudo apt-get install pkg-config
sudo apt-get install gtk+2.0
sudo apt-get install libgtk-3-dev
```

### CLI (you can also only compile cli version if you want)

```sh
cd cli
make
```

## USAGE

### GUI version
### GUI version

`./packETH` (or `packETH` if you did the `make install`)

./packETH (or packETH if you did the make install)
The usage of the program should be pretty straightforward. As you will see, there are 4 main windows (first four buttons from the left side). I call them:

The usage of the program should be pretty straightforward. As you will see, there are 4 main windows (first four buttons from the left side). I call them:
- Builder - the page where you build the packet and send it once
- Gen-b - generator for sending packet currently build inside Builder with many options how to send it
- Gen-s - generator that allows you to select up to 10 previosly built packets and send them in different manner
Expand All @@ -68,23 +83,25 @@ The usage of the program should be pretty straightforward. As you will see, ther
To send the packets you need the SuperUser rights.

### CLI version
Type ./packETHcli -h for available options.

Type `./packETHcli -h` for available options.

### RECEIVER mode

packETHcli also has a reveiver mode (-m 9). In this mode packEThcli counts packets and displays statistics. If you add a pattern into packets sent by packETH or packETHcli then only packets with valid pattern will be counted. See manual for more help.

## DONATIONS

If you would like to increase my motivation for further development, you can make a donation.
The amount is not important at all, it is just a sign for me, that time I spent for this project helps someone.
If you would like to increase my motivation for further development, you can make a donation.
The amount is not important at all, it is just a sign for me, that time I spent for this project helps someone.

[DONATE](https://www.paypal.com/donate/?token=BHZTfBAMBs5OPJB8ab3dF7sR25aftV-rsqcPH4uipHAUMgFaHWHm2ej4J_T_2TCIt6qHjWymXfvQWKRI&locale.x=SI)
https://www.paypal.com/donate/?business=FZ8CFZHYDW2RJ&no_recurring=0&currency_code=EUR

## AUTHORS & SUPPORT

If you get into problems, please feel free to contact me.
If you get into problems, please feel free to contact me.

Miha Jemec
[email protected]
packETH (C) 2003-2019 by Miha Jemec, <[email protected]>
<[email protected]>
packETH (C) 2003-2023 by Miha Jemec, <[email protected]>
Covered under the GPL.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_HEADERS([libintl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h unistd.h])

# We need GTK
pkg_modules="gtk+-2.0 >= 2.4 glib-2.0 >= 2.4 gthread-2.0 >= 2.4 gmodule-export-2.0 >= 2.4"
pkg_modules="gtk+-3.0 >= 3.16 glib-2.0 >= 2.4 gthread-2.0 >= 2.4 gmodule-export-2.0 >= 2.4"
PKG_CHECK_MODULES(DEPS, [$pkg_modules])

# Checks for library functions.
Expand Down
4 changes: 0 additions & 4 deletions dev/CORRECT_OPTION_MENU.sh

This file was deleted.

51 changes: 0 additions & 51 deletions dev/options-menu_diff

This file was deleted.

10 changes: 0 additions & 10 deletions dev/options-menu_diff-create_udp_payload_dialog

This file was deleted.

41 changes: 0 additions & 41 deletions dev/options-menu_diff-create_window1

This file was deleted.

Loading

0 comments on commit 7d0c98b

Please sign in to comment.