Skip to content

Commit

Permalink
Ci (#2)
Browse files Browse the repository at this point in the history
* Fixed steghide tests

* Add initial build / test script

* Update build script

* Restructured tests

* Added placeholder stegseek tests to play with CI

* Add prints

* Add test windows build

* fixed issue in package install step

* Add .deb packaging

* remove INSTALL from makefile

* fixed missing extension

* Updated README with .deb

* Update gitignore
  • Loading branch information
RickdeJager authored Nov 4, 2020
1 parent b07bf12 commit 4cefb85
Show file tree
Hide file tree
Showing 102 changed files with 209 additions and 229 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Test

on:
push:
pull_request:
branches: [ master ]

jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install build dependencies
run: sudo apt install -y libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev autoconf build-essential
- name: autoreconf
run: autoreconf -i
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: Run cracker tests
run: cd tests/stegseek && ./testCracker.sh && cd ../..
- name: Create a .deb package
run: bash package/package.sh
- name: Save the .deb as a build artifact
uses: actions/upload-artifact@v2
with:
name: stegseek-deb-package
path: stegseek*.deb
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ tests/data/Makefile.in

.vscode


# Test artifacts
tests/steghide/*.log
tests/steghide/*.trs
tests/steghide/unittests


### C++ ###
Expand Down
25 changes: 25 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build instructions
## Installing dependencies
Running the following command will install all required dependencies:

```bash
sudo apt install libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev git autoconf build-essential
```

## Building Stegseek

First, clone this repo by calling:
```
git clone https://github.com/RickdeJager/stegseek.git
```

Next, enter the following commands to build and install Stegseek:

```bash
cd stegseek
autoreconf -i
./configure
make
sudo make install
```

182 changes: 0 additions & 182 deletions INSTALL

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AUTOMAKE_OPTIONS = dist-bzip2 dist-zip
SUBDIRS = m4 src tests
SUBDIRS = m4 src tests/steghide
docdir = $(prefix)/share/doc/$(PACKAGE)
EXTRA_DIST = config.rpath mkinstalldirs BUGS CREDITS HISTORY depcomp
doc_DATA = BUGS COPYING CREDITS HISTORY INSTALL README.md
doc_DATA = BUGS COPYING CREDITS HISTORY README.md
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh missing mkinstalldirs steghide.doxygen steghide.spec

Expand Down
28 changes: 7 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,18 @@ Stegseek is a lightning fast steghide cracker, built as a fork of the original s
Skip ahead to [Performance](#chart_with_upwards_trend-performance) for some raw numbers.

# :wrench: Installation
At the moment, Stegseek can only be installed by building from source. The following steps will help you install Stegseek on Ubuntu.
If you'd rather use Docker, skip ahead to the [Docker section](#whale-docker).

## Installing dependencies
Running the following command will install all required dependencies:
The following instructions walk you through the installation process. Alternatively, you can run Stegseek in a Docker container. Skip ahead to [Docker](#whale-docker) for instructions.

```bash
sudo apt install libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev git autoconf build-essential
```
## Releases

## Building Stegseek
On Ubuntu-based systems, you can use the provided `.deb` package for installation:

First, clone this repo by calling:
```
git clone https://github.com/RickdeJager/stegseek.git
```
1. Download the latest [Stegseek release](https://github.com/RickdeJager/stegseek/releases)
1. Install the `.deb` file using `sudo apt install ./stegseek_0.1-1.deb`

Next, enter the following commands to build and install Stegseek:

```bash
cd stegseek
autoreconf -i
./configure
make
sudo make install
```
## Building from source
On other systems you will have to build Stegseek yourself. See [BUILD.md](BUILD.md) for more information.

# :arrow_forward: Using Stegseek

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ then
fi

dnl create Makefiles
AC_OUTPUT([Makefile src/Makefile tests/Makefile tests/data/Makefile m4/Makefile])
AC_OUTPUT([Makefile src/Makefile tests/steghide/Makefile tests/steghide/data/Makefile m4/Makefile])
8 changes: 8 additions & 0 deletions package/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: stegseek
Version: <<VERSION>>
Section: base
Priority: optional
Architecture: amd64
Depends: libmhash2, libmcrypt4, libjpeg8, zlib1g
Maintainer: Rick de Jager <rickdejager99@gmail.com>
Description: Fast steghide cracking utility
36 changes: 36 additions & 0 deletions package/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

##################################################
# Basic packaging script
##################################################
#
# Creates a very basic package, meant for Github releases
# It won't hold up to Debian/Ubuntu standards, but will still
# be useful as a release
#

NAME="stegseek"
VER="0.1"
REV="1"
VERSION="${VER}-${REV}"
PACKAGE="${NAME}_${VERSION}"
INSTALL_PATH="${PACKAGE}/usr/local/bin/"

# Create a relative root
mkdir -p ${INSTALL_PATH}
# Copy the binary over
cp "src/${NAME}" ${INSTALL_PATH}

# Create a DEBIAN directory
mkdir -p "${PACKAGE}/DEBIAN"

# Copy the control file over
cp package/control "${PACKAGE}/DEBIAN"
# Edit the version
sed -i "s/<<VERSION>>/${VERSION}/g" "${PACKAGE}/DEBIAN/control"

# Build the package
dpkg-deb --build ${PACKAGE}



2 changes: 1 addition & 1 deletion src/MHashPP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ std::string MHashPP::getAlgorithmName ()

std::string MHashPP::getAlgorithmName (hashid id)
{
char *name = mhash_get_hash_name (id) ;
char *name = (char*) mhash_get_hash_name (id) ;
std::string retval ;
if (name == NULL) {
retval = std::string ("<algorithm not found>") ;
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -fpermissive
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
bin_PROGRAMS = stegseek
noinst_HEADERS = \
AUtils.h Arg.h Arguments.h AssertionFailed.h AuData.h AuFile.h \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4cefb85

Please sign in to comment.