network/mitmproxy-bin: Added (interactive HTTPS proxy).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-01-27 11:24:38 -05:00 committed by Willy Sudiarto Raharjo
parent d17bca972e
commit 328784b294
No known key found for this signature in database
GPG key ID: 3F617144D7238786
6 changed files with 269 additions and 0 deletions

View file

@ -0,0 +1,15 @@
mitmproxy-bin (free and open source interactive HTTPS proxy)
mitmproxy-bin is your swiss-army knife for debugging, testing, privacy
measurements, and penetration testing. It can be used to intercept,
inspect, modify and replay web traffic such as HTTP/1, HTTP/2,
WebSockets, or any other SSL/TLS-protected protocols. You can prettify
and decode a variety of message types ranging from HTML to Protobuf,
intercept specific messages on-the-fly, modify them before they reach
their destination, and replay them to a client or server later on.
This is just a repack of the prebuilt binaries from the mitmproxy
site, with some documentation added. Since upstream only releases
x86_64 binaries, this will *not* work on 32-bit x86 (or ARM, etc)
Slackware... although you can build an x86_64 package on a 32-bit host
and install it on a 64-bit one, if you like.

View file

@ -0,0 +1,96 @@
#!/bin/bash
# Slackware build script for mitmproxy-bin
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# I was gonna package this up from source, but it just has too many
# dependencies, many of which aren't on SBo already. I'd have to add
# at least 15 or 20 python modules, and I just won't. The official
# binary release is "frozen" executables with no external Python
# dependencies (just shared libs that are part of Slackware already).
# This is mostly just a binary repack of the official build. Which
# is only for x86_64 Linux (sorry, 32-bit users).
# I named this with the -bin suffix so that someday someone (other
# than me!) can do a proper build-from-source mitmproxy SlackBuild,
# with tons of dependencies in REQUIRES...
# There's *nothing* in the Linux tarball besides the executables, so
# I've also included some docs from the source tarball, but not the
# complete API docs (again, to avoid a long dependency chain of the
# stuff needed to build them). Use https://docs.mitmproxy.org/stable/
# for that.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mitmproxy-bin
SRCNAM=mitmproxy
VERSION=${VERSION:-7.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Binary repack, only supports:
ARCH=x86_64
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# If the user's trying to build this on a non-x86_64 box, it's
# almost certainly a mistake on the user's part... but maybe not,
# for smart users. So warn and pause, but allow it to happen.
M="$(uname -m)"
if [ "$M" != "x86_64" ]; then
W="* WARNING: cross-building x86_64 package on $M host. *"
H="$( echo "$W" | sed 's,.,*,g' )"
echo -e "$H\\n$W\\n$H\\n"
cat <<EOF
You're about to build a 64-bit (x86_64) package, which will work fine
if you install it on an x86_64 Slackware64 system... but not on *this*
system, because it's $M, not x86_64.
Press Enter or wait 5 seconds to continue. Or, press ^C to abort.
EOF
read -p "> " -t 5
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
mkdir -p $SRCNAM-$VERSION
cd $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION-linux.tar.gz
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# Already stripped.
mkdir -p $PKG/usr/bin
install -m0755 $SRCNAM mitmdump mitmweb $PKG/usr/bin
# Stub man page. Just stuff copied from the README and a pointer to the
# actual docs on the web.
mkdir -p $PKG/usr/man/man1
gzip -9c < $CWD/$SRCNAM.1 > $PKG/usr/man/man1/$SRCNAM.1.gz
ln -s $SRCNAM.1.gz $PKG/usr/man/man1/mitmdump.1.gz
ln -s $SRCNAM.1.gz $PKG/usr/man/man1/mitmweb.1.gz
# Include README, etc from source tarball.
cd $SRCNAM-$VERSION
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,12 @@
PRGNAM="mitmproxy-bin"
VERSION="7.0.4"
HOMEPAGE="https://mitmproxy.org/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz \
https://github.com/mitmproxy/mitmproxy/archive/v7.0.4/mitmproxy-7.0.4.tar.gz"
MD5SUM_x86_64="38d1298b356081aaa5ffd69e2f5ba2e5 \
acbe2f24300c7a30479b0ad65ce319b9"
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

View file

@ -0,0 +1,70 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "MITMPROXY" 1 "2022-01-27" "7.0.4" "SlackBuilds.org"
.SH NAME
mitmproxy \- man-in-the-middle SSL/TLS intercepting proxy
.\" RST source for mitmproxy(1) man page. Convert with:
.
.\" rst2man.py mitmproxy.rst > mitmproxy.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH DESCRIPTION
.sp
This man page just provides links to the actual documentation.
.sp
\fBmitmproxy\fP is an interactive, SSL/TLS\-capable intercepting proxy with a console
(curses\-style) interface for HTTP/1, HTTP/2, and WebSockets.
.sp
\fBmitmdump\fP is the command\-line version of \fBmitmproxy\fP\&. Think \fBtcpdump\fP for HTTP(S).
.sp
\fBmitmweb\fP is a web\-based interface for \fBmitmproxy\fP\&.
.sp
These commands have lots of options; each one can be run with
\fB\-\-help\fP for a full list.
.sp
Full documentation is available at: \fI\%https://docs.mitmproxy.org/stable/\fP
.sp
Quite a few example scripts for \fBmitmproxy\fP are installed in
/usr/doc/mitmproxy\-7.0.4/examples/
.SH COPYRIGHT
.sp
See the file /usr/doc/mitmproxy\-7.0.4/LICENSE for license information.
.SH AUTHORS
.sp
\fBmitmproxy\fP was written by Aldo Cortesi.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
The mitmproxy homepage: \fI\%http://www.mitmproxy.org/\fP
.\" Generated by docutils manpage writer.
.

View file

@ -0,0 +1,57 @@
.. RST source for mitmproxy(1) man page. Convert with:
.. rst2man.py mitmproxy.rst > mitmproxy.1
.. rst2man.py comes from the SBo development/docutils package.
.. |version| replace:: 7.0.4
.. |date| date::
=========
mitmproxy
=========
--------------------------------------------
man-in-the-middle SSL/TLS intercepting proxy
--------------------------------------------
:Manual section: 1
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
DESCRIPTION
===========
This man page just provides links to the actual documentation.
**mitmproxy** is an interactive, SSL/TLS-capable intercepting proxy with a console
(curses-style) interface for HTTP/1, HTTP/2, and WebSockets.
**mitmdump** is the command-line version of **mitmproxy**. Think **tcpdump** for HTTP(S).
**mitmweb** is a web-based interface for **mitmproxy**.
These commands have lots of options; each one can be run with
**--help** for a full list.
Full documentation is available at: https://docs.mitmproxy.org/stable/
Quite a few example scripts for **mitmproxy** are installed in
/usr/doc/mitmproxy-|version|/examples/
COPYRIGHT
=========
See the file /usr/doc/mitmproxy-|version|/LICENSE for license information.
AUTHORS
=======
**mitmproxy** was written by Aldo Cortesi.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
The mitmproxy homepage: http://www.mitmproxy.org/

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
mitmproxy-bin: mitmproxy-bin (free and open source interactive HTTPS proxy)
mitmproxy-bin:
mitmproxy-bin: mitmproxy is your swiss-army knife for debugging, testing, privacy
mitmproxy-bin: measurements, and penetration testing. It can be used to intercept,
mitmproxy-bin: inspect, modify and replay web traffic such as HTTP/1, HTTP/2,
mitmproxy-bin: WebSockets, or any other SSL/TLS-protected protocols. You can prettify
mitmproxy-bin: and decode a variety of message types ranging from HTML to Protobuf,
mitmproxy-bin: intercept specific messages on-the-fly, modify them before they reach
mitmproxy-bin: their destination, and replay them to a client or server later on.
mitmproxy-bin:
mitmproxy-bin: