Commit d24ca624 authored by Jens Getreu's avatar Jens Getreu

doc: update build-scripts and links

parent 748ff686
......@@ -36,7 +36,7 @@ When invoked with `stringsext -e ascii` **stringsext** can be used
as *GNU strings* replacement.
### Screenshot
## Screenshot
```
stringsext -tx -e utf-8 -e utf-16le -e utf-16be \
......@@ -58,20 +58,25 @@ stringsext -tx -e utf-8 -e utf-16le -e utf-16be \
```
### Documentation
## Documentation
User documentation
* [Manual page](https://blog.getreu.net/projects/stringsext/stringsext--man.html)
* [Manual page (html)](https://blog.getreu.net/projects/stringsext/stringsext--manpage.html)
* [Manual page (pdf)](https://blog.getreu.net/_downloads/stringsext--manpage.pdf)
* [Blogposts about Stringsext](https://blog.getreu.net/tags/stringsext/)
* [Paper about Stringsext](https://commons.erau.edu/jdfsl/vol14/iss2/4)
Developer documentation
* [API documentation](https://blog.getreu.net/projects/stringsext/stringsext/index.html)
* [Forensic Tool Development with Rust](https://blog.getreu.net/projects/forensic-tool-development-with-rust)
* [API documentation](https://blog.getreu.net/projects/stringsext/stringsext/index.html)
* [Forensic Tool Development with Rust](https://blog.getreu.net/projects/forensic-tool-development-with-rust)
### Source code
## Source code
Repository
......@@ -79,22 +84,63 @@ Repository
* [Stringsext on Gitlab](https://gitlab.com/getreu/stringsext)
### Distribution
## Distribution
* Binaries for latest release (Linux, Windows, iOS)
1. Open: [Releases · getreu/stringsext](https://github.com/getreu/stringsext/releases)
2. Open the latest release.
3. Open *assets*.
4. Download the packed executable for your operating system.
5. Installation: see below.
* Binaries and packages (usually built from lastest commit):
- Executable for Windows:
[x86_64-pc-windows-gnu/release/stringsext.exe](https://blog.getreu.net/projects/stringsext/_downloads/x86_64-pc-windows-gnu/release/stringsext.exe)
- Binary for Linux:
Binaries
[x86_64-unknown-linux-gnu/release/stringsext](https://blog.getreu.net/projects/stringsext/_downloads/x86_64-unknown-linux-gnu/release/stringsext)
* [Download](https://blog.getreu.net/projects/stringsext/_downloads/)
[x86_64-unknown-linux-musl/release/stringsext](https://blog.getreu.net/projects/stringsext/_downloads/x86_64-unknown-linux-musl/release/stringsext)
Manual page download
[i686-unknown-linux-gnu/release/stringsext](https://blog.getreu.net/projects/stringsext/_downloads/i686-unknown-linux-gnu/release/stringsext)
* [stringsext.1.gz](https://blog.getreu.net/projects/stringsext/_downloads/stringsext.1.gz),
[i686-unknown-linux-musl/release/stringsext](https://blog.getreu.net/projects/stringsext/_downloads/i686-unknown-linux-musl/release/stringsext)
### Building and installing
- Package for Debian and Ubuntu:
[x86_64-unknown-linux-gnu/debian/stringsext_2.2.0_amd64.deb](https://blog.getreu.net/projects/stringsext/_downloads/x86_64-unknown-linux-gnu/debian/stringsext_2.2.0_amd64.deb)
[i686-unknown-linux-gnu/debian/stringsext_2.2.0_i386.deb](https://blog.getreu.net/projects/stringsext/_downloads/i686-unknown-linux-gnu/debian/stringsext_2.2.0_i386.deb)
* Installable Unix man-page:
- [stringsext.1.gz](https://blog.getreu.net/projects/stringsext/_downloads/stringsext.1.gz)
* Zipfile with all binaries and documentation:
- [stringsext all](https://blog.getreu.net/_downloads/stringsext.zip)
## Building and installing
1. Install *Rust* with [rustup](https://www.rustup.rs/):
curl https://sh.rustup.rs -sSf | sh
The fast-track procedure:
cargo install stringsext
sudo cp ~/.cargo/bin/stringsext /usr/local/bin
2. Download [stringsext](#stringsext):
git clone [email protected]:getreu/stringsext.git
......@@ -127,7 +173,11 @@ Manual page download
Copy the binary `target/release/stringsext.exe` in a directory
listed in your `PATH` environment variable.
# About
This project follows [Semantic Versioning](https://semver.org/).
## About
Author
......
#!/bin/sh
rm -r ./build
./make--index
./make--stringsext--manpage
./make--rustdoc-link
#!/bin/sh
mkdir --parents ./build/html
mkdir --parents ./build/html/_downloads
mkdir --parents ./build/man/man1
cp ../README.md ./source/index.md
sed -i 's/http.*\.getreu\.net//g' ./source/index.md
./md2docbook2html ./source/index.md ./build/html/index.html
#rm index.md
......@@ -4,17 +4,6 @@ mkdir --parents ./build/html
mkdir --parents ./build/html/_downloads
mkdir --parents ./build/man/man1
# Man page
pandoc -f markdown -t html --include-in-header=./source/docutils_basic.css\
./source/stringsext--man.md -o ./build/html/stringsext--man.html
pandoc -s ./source/stringsext--man.md -t man \
-o ./build/man/man1/stringsext.1
gzip -f ./build/man/man1/stringsext.1
# Readme page
pandoc -f markdown -t html --include-in-header=./source/docutils_basic.css\
./source/README.md -o ./build/html/index.html
cd ./build/html/_downloads
ln -sf ../../../../target/* .
ln -sf ../../../build/man/man1/stringsext.1.gz .
......
#!/bin/sh
mkdir --parents ./build/html
mkdir --parents ./build/html/_downloads
mkdir --parents ./build/man/man1
# Html page
./md2man ./source/stringsext--manpage.md ./build/man/man1/stringsext.1
./md2docbook2pdf ./source/stringsext--manpage.md ./build/pdf/stringsext--manpage.pdf
./md2docbook2html ./source/stringsext--manpage.md ./build/html/stringsext--manpage.html
#!/bin/bash
# Author: Jens Getreu
# apt install pandoc docbook-xsl-ns xsltproc
render () {
### parse args
#set -x
InPath="$1"
InFile="${InPath##*/}"
InBase="${InFile%.*}"
InDir="${InPath%/*}"
if [ "$InDir" = "$InPath" ] ; then
InDir="."
fi
OutPath="$2"
OutFile="${OutPath##*/}"
OutBase="${OutFile%.*}"
OutDir="${OutPath%/*}"
if [ "$OutDir" = "$OutPath" ] ; then
OutDir="."
fi
### Prepare
XmlPath="$OutDir/$OutBase.xml"
HtmlPath="$OutDir/$OutBase.html"
TemplatePath="$OutDir/template.db"
mkdir -p "$OutDir"
### Generate XML
# unfortunately the chain does not honor --number-section yet
pandoc -s -t docbook5 -o "$XmlPath" "$InPath"
# this is only needed for html output
cp -r "$InDir/images/" "$OutDir"
cp "$InDir/docutils_basic.css" "$OutDir"
### Generate HTML
# Xsltproc also take parameters e.g. --stringparam use.extensions 0\
# Schema 1.79.1 does not render figure references correctly:
# /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/html/docbook.xsl\
# Use snapshot with UTF-8 in docbook.xsl instead
xsltproc --stringparam html.stylesheet docutils_basic.css --output "$HtmlPath" \
/usr/local/share/xml/dokbook/stylesheet/docbook-xsl-snapshot/html/docbook.xsl\
"$XmlPath" && \
rm "$XmlPath"
}
#/usr/local/share/xml/dokbook/stylesheet/docbook-xsl-1.79.2/html/docbook.xsl\
### Main
# usage:
# render FILE [FILE]
# render report.md ./rendition/report.html
if [[ -n "${2/[ ]*\n/}" ]] ; then
OutPath="$2"
else
OutPath="${1%.*}.html" # $2 is empty
fi
render "$1" "$OutPath"
#!/bin/bash
# Author: Jens Getreu
# apt install pandoc asciidoctor-fopub
FOPUB_PATH="/usr/local/java-deployment/asciidoctor-fopub/bin/"
render () {
### parse args
#set -x
InPath="$1"
InFile="${InPath##*/}"
InBase="${InFile%.*}"
InDir="${InPath%/*}"
if [ "$InDir" = "$InPath" ] ; then
InDir="."
fi
OutPath="$2"
OutFile="${OutPath##*/}"
OutBase="${OutFile%.*}"
OutDir="${OutPath%/*}"
if [ "$OutDir" = "$OutPath" ] ; then
OutDir="."
fi
### Prepare
XmlPath="$OutDir/$OutBase.xml"
PdfPath="$OutDir/$OutBase.pdf"
TemplatePath="$OutDir/template.db"
mkdir -p "$OutDir"
### Make docbook-template
# quoting EOF means parameter substitution turned off
cat << "EOF" > "$TemplatePath"
<?xml version="1.0" encoding="utf-8" ?>
<?asciidoc-toc?>
<?asciidoc-numbered?>
EOF
# Strip off first line of the docbook5 default template and append it
pandoc -D docbook5 | tail -n +2 >> "$TemplatePath"
### Generate XML
# unfortunately the chain does not honor --number-section yet
pandoc --template "$TemplatePath" -s -t docbook5 -o "$XmlPath" "$InPath"
# this is only needed for html and xml output
cp -r "$InDir/images/" "$OutDir"
### Generate PDF
"$FOPUB_PATH/fopub" -H "$XmlPath" && \
rm "$XmlPath" && \
rm "$TemplatePath" && \
rm -f -r "$OutDir/images/"
}
### Main
# usage:
# render FILE [FILE]
# render report.md ./rendition/report.pdf
if [[ -n "${2/[ ]*\n/}" ]] ; then
OutPath="$2"
else
OutPath="${1%.*}.pdf" # $2 is empty
fi
render "$1" "$OutPath"
#!/bin/bash
# Author: Jens Getreu
# sudo apt install pandoc
# parse args
render () {
#set -x
InPath="$1"
InFile="${InPath##*/}"
InBase="${InFile%.*}"
InDir="${InPath%/*}"
if [ "$InDir" = "$InPath" ] ; then
InDir="."
fi
OutPath="$2"
OutFile="${OutPath##*/}"
OutBase="${OutFile%.*}"
OutDir="${OutPath%/*}"
if [ "$OutDir" = "$OutPath" ] ; then
OutDir="."
fi
# process
ManFile="$OutBase.1"
mkdir -p "$OutDir"
pandoc -s -t man -o "$OutDir/$ManFile" "$InPath"
gzip -f "$OutDir/$ManFile"
}
### Main
# usage:
# render FILE [FILE]
# render report.md ./rendition/report.1
if [[ -n "${2/[ ]*\n/}" ]] ; then
OutPath="$2"
else
OutPath="${1%.*}.html" # $2 is empty
fi
render "$1" "$OutPath"
../../README.md
\ No newline at end of file
---
title: stringsext - search for multi-byte encoded strings in binary data
---
**stringsext** is a Unicode enhancement of the *GNU strings* tool with
additional functionalities: **stringsext** recognizes Cyrillic, Arabic, CJKV
characters and other scripts in all supported multi-byte-encodings, while
*GNU strings* fails in finding any of these scripts in UTF-16 and many other
encodings.
**stringsext** prints all graphic character sequences in *FILE* or
*stdin* that are at least *MIN* bytes long.
Unlike *GNU strings* **stringsext** can be configured to search for
valid characters not only in ASCII but also in many other input
encodings, e.g.: UTF-8, UTF-16BE, UTF-16LE, BIG5-2003, EUC-JP, KOI8-R
and many others. The option **\--list-encodings** shows a list of valid
encoding names based on the WHATWG Encoding Standard. When more than one
encoding is specified, the scan is performed in different threads
simultaneously.
When searching for UTF-16 encoded strings, 96% of all possible two byte
sequences, interpreted as UTF-16 code unit, relate directly to Unicode
codepoints. As a result, the probability of encountering valid Unicode
characters in a random byte stream, interpreted as UTF-16, is also 96%.
In order to reduce this big number of false positives, **stringsext**
provides a parametrizable Unicode-block-filter. See **\--encodings**
option in the manual page for more details.
**stringsext** is mainly useful for extracting Unicode content out of
non-text files.
When invoked with `stringsext -e ascii` **stringsext** can be used
as *GNU strings* replacement.
## Screenshot
```
stringsext -tx -e utf-8 -e utf-16le -e utf-16be \
-n 10 -a None -u African /dev/disk/by-uuid/567a8410
3de2fff0+ (b UTF-16LE) ݒݓݔݕݖݗݙݪ
3de30000+ (b UTF-16LE) ݫݱݶݷݸݹݺ
<3de36528 (a UTF-8) فيأنمامعكلأورديافىهولملكاولهبسالإنهيأيقدهلثمبهلوليبلايبكشيام
>3de36528+ (a UTF-8) أمنتبيلنحبهممشوش
<3de3a708 (a UTF-8) علىإلىهذاآخرعددالىهذهصورغيركانولابينعرضذلكهنايومقالعليانالكن
>3de3a708+ (a UTF-8) حتىقبلوحةاخرفقطعبدركنإذاكمااحدإلافيهبعضكيفبح
3de3a780+ (a UTF-8) ثومنوهوأناجدالهاسلمعندليسعبرصلىمنذبهاأنهمثلكنتالاحيثمصرشرححو
3de3a7f8+ (a UTF-8) لوفياذالكلمرةانتالفأبوخاصأنتانهاليعضووقدابنخيربنتلكمشاءوهياب
3de3a870+ (a UTF-8) وقصصومارقمأحدنحنعدمرأياحةكتبدونيجبمنهتحتجهةسنةيتمكرةغزةنفسبي
3de3a8e8+ (a UTF-8) تللهلناتلكقلبلماعنهأولشيءنورأمافيكبكلذاترتببأنهمسانكبيعفقدحس
3de3a960+ (a UTF-8) نلهمشعرأهلشهرقطرطلب
3df4cca8 (c UTF-16BE) փօև։֋֍֏֑֛֚֓֕֗֙֜֝֞׹
<3df4cd20 (c UTF-16BE) ־ֿ׀ׁׂ׃ׅׄ׆ׇ׈׉׊׋
```
## Documentation
User documentation
* [Manual page (html)](/projects/stringsext/stringsext--manpage.html)
* [Manual page (pdf)](/_downloads/stringsext--manpage.pdf)
* [Blogposts about Stringsext](/tags/stringsext/)
* [Paper about Stringsext](https://commons.erau.edu/jdfsl/vol14/iss2/4)
Developer documentation
* [API documentation](/projects/stringsext/stringsext/index.html)
* [Forensic Tool Development with Rust](/projects/forensic-tool-development-with-rust)
## Source code
Repository
* [Stringsext on Github](https://github.com/getreu/stringsext)
* [Stringsext on Gitlab](https://gitlab.com/getreu/stringsext)
## Distribution
* Binaries for latest release (Linux, Windows, iOS)
1. Open: [Releases · getreu/stringsext](https://github.com/getreu/stringsext/releases)
2. Open the latest release.
3. Open *assets*.
4. Download the packed executable for your operating system.
5. Installation: see below.
* Binaries and packages (usually built from lastest commit):
- Executable for Windows:
[x86_64-pc-windows-gnu/release/stringsext.exe](/projects/stringsext/_downloads/x86_64-pc-windows-gnu/release/stringsext.exe)
- Binary for Linux:
[x86_64-unknown-linux-gnu/release/stringsext](/projects/stringsext/_downloads/x86_64-unknown-linux-gnu/release/stringsext)
[x86_64-unknown-linux-musl/release/stringsext](/projects/stringsext/_downloads/x86_64-unknown-linux-musl/release/stringsext)
[i686-unknown-linux-gnu/release/stringsext](/projects/stringsext/_downloads/i686-unknown-linux-gnu/release/stringsext)
[i686-unknown-linux-musl/release/stringsext](/projects/stringsext/_downloads/i686-unknown-linux-musl/release/stringsext)
- Package for Debian and Ubuntu:
[x86_64-unknown-linux-gnu/debian/stringsext_2.2.0_amd64.deb](/projects/stringsext/_downloads/x86_64-unknown-linux-gnu/debian/stringsext_2.2.0_amd64.deb)
[i686-unknown-linux-gnu/debian/stringsext_2.2.0_i386.deb](/projects/stringsext/_downloads/i686-unknown-linux-gnu/debian/stringsext_2.2.0_i386.deb)
* Installable Unix man-page:
- [stringsext.1.gz](/projects/stringsext/_downloads/stringsext.1.gz)
* Zipfile with all binaries and documentation:
- [stringsext all](/_downloads/stringsext.zip)
## Building and installing
1. Install *Rust* with [rustup](https://www.rustup.rs/):
curl https://sh.rustup.rs -sSf | sh
The fast-track procedure:
cargo install stringsext
sudo cp ~/.cargo/bin/stringsext /usr/local/bin
2. Download [stringsext](#stringsext):
git clone [email protected]:getreu/stringsext.git
3. Build
Enter the *Stringsext* directory where the file `Cargo.toml`
resides:
cd stringsext
Then execute:
cargo build --release
./doc/make-doc
4. Install
a. Linux:
# install binary
sudo cp target/release/stringsext /usr/local/bin/
# install man-page
sudo cp man/stringsext.1.gz /usr/local/man/man1/
sudo dpkg-reconfigure man-db # e.g. Debian, Ubuntu
b. Windows
Copy the binary `target/release/stringsext.exe` in a directory
listed in your `PATH` environment variable.
This project follows [Semantic Versioning](https://semver.org/).
## About
Author
* Jens Getreu
Copyright
* Apache 2 license or MIT license
Build status
* ![status](https://travis-ci.org/getreu/stringsext.svg?branch=master)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment