All Projects → rcx → Tcpbin

rcx / Tcpbin

Very crude and poorly written HTTP(s) and SMTP bin

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tcpbin

Magma
The magma server daemon, is an encrypted email system with support for SMTP, POP, IMAP, HTTP and MOLTEN,. Additional support for DMTP and DMAP is currently in active development.
Stars: ✭ 1,740 (+1947.06%)
Mutual labels:  email, smtp, server
Mailinabox
Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
Stars: ✭ 10,649 (+12428.24%)
Mutual labels:  email, smtp, server
Actionhero
Actionhero is a realtime multi-transport nodejs API Server with integrated cluster capabilities and delayed tasks
Stars: ✭ 2,280 (+2582.35%)
Mutual labels:  server, tcp, https
Papercut Smtp
Papercut SMTP -- The Simple Desktop Email Server
Stars: ✭ 2,094 (+2363.53%)
Mutual labels:  email, smtp, server
Go Smtp
📤 An SMTP client & server library written in Go
Stars: ✭ 655 (+670.59%)
Mutual labels:  smtp, server
Mailcatcher
Catches mail and serves it through a dream.
Stars: ✭ 5,512 (+6384.71%)
Mutual labels:  smtp, server
Lettre
a mailer library for Rust
Stars: ✭ 713 (+738.82%)
Mutual labels:  email, smtp
Tinytcpserver
A small tcp server working under Mono or .NET (4.0) and provides hooks for handling data exchange with clients (works under mono and .net). Behaviour/protocol/reaction could be specified via custom C# script.
Stars: ✭ 14 (-83.53%)
Mutual labels:  server, tcp
Check If Email Exists
Check if an email address exists without sending any email, written in Rust.
Stars: ✭ 497 (+484.71%)
Mutual labels:  email, smtp
Beetlex
high performance dotnet core socket tcp communication components, support TLS, HTTP, HTTPS, WebSocket, RPC, Redis protocols, custom protocols and 1M connections problem solution
Stars: ✭ 802 (+843.53%)
Mutual labels:  tcp, https
Go Bootstrap
Easy way to bootstrap a web server in Go (Routing|Middleware|Https)
Stars: ✭ 27 (-68.24%)
Mutual labels:  server, https
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+590.59%)
Mutual labels:  tcp, https
Exim
Exim Mail Transport Agent - source, testsuite and documentation
Stars: ✭ 545 (+541.18%)
Mutual labels:  email, smtp
Agoo
A High Performance HTTP Server for Ruby
Stars: ✭ 679 (+698.82%)
Mutual labels:  server, https
Deltachat Desktop
Email-based instant messaging for Desktop.
Stars: ✭ 526 (+518.82%)
Mutual labels:  email, smtp
Skillbox Chat 08 19
Skillbox demo application for the Python course
Stars: ✭ 25 (-70.59%)
Mutual labels:  server, tcp
Emodbus
Modbus library for both RTU and TCP protocols. Primarily developed on and for ESP32 MCUs.
Stars: ✭ 29 (-65.88%)
Mutual labels:  server, tcp
Sendria
Sendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.
Stars: ✭ 30 (-64.71%)
Mutual labels:  email, smtp
Mailer
A lightweight PHP SMTP mail sender
Stars: ✭ 53 (-37.65%)
Mutual labels:  email, smtp
Zinc
Zinc HTTP Components is an open-source Smalltalk framework to deal with the HTTP networking protocol.
Stars: ✭ 60 (-29.41%)
Mutual labels:  server, https

tcpbin

It sets up TCP sockets on ports 80(http), 443(https), 25(smtp) to listen for incoming data. Then it dumps these to a log folder which can be viewed on port 8000(https).

You can configure everything intcpbin.py. See the "Additional Configuration" section below.

Try it online

There's a public instance available at tcpb.in. Logs are cleared regularly to prevent abuse, but feel free to use it to quickly share files with your friends, like transfer.sh or mixtape.moe. Just keep in mind anyone will be able to view your files. If you'd like a private instance, you can self-host this and set a password on it (see below for instructions). At tcpb.in:9999 there is also a service which echoes your IP address. At tcpb.in:5000 there is a webapp which can parse your dumped emails.

Quick start

git clone https://github.com/ecx86/tcpbin.git
cd tcpbin
ln -s /etc/example.com/cert.pem cert.pem
ln -s /etc/example.com/privkey.pem privkey.pem
nano motd.txt # optional motd
service apache2 stop # or nginx
systemctl disable apache2 # or nginx
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse # optional. avoid TIME_WAIT garbage
nohup python3 tcpbin.py > /var/log/tcpbin.log &

Even quicker start

curl https://raw.githubusercontent.com/ecx86/tcpbin/master/tcpbin.py | python3

Python 2 vs Python 3

This script has been updated to support Python 3. For the Python 2 version check out the git tag python2.

Advanced configuration

You can configure the following settings in tcpbin.py:

  • MOTD_FILE: filename. Will be copied to the log directory on each startup. This is because I am too lazy and incompetent to setup proper routes handlers in the log viewer http server.
  • LOG_DIR: filename. Will be created if it doesn't exist. All the logs get dumped to here and everything in the folder will be available to access on the log viewing server.
  • LOG_VIEWER_PORT: the port the log viewer will serve http(s) on. Don't choose a conflicting port with the actual dumping servers (i.e 80,443,25,53,etc).
  • LOG_VIEWER_HTTPS: whether the log viewing server will serve https rather than http.
  • AUTHKEY: optional. If not empty, make it in the format username=password. It specifies basic auth credentials for the log viewing server so people can't so easily steal your email confirmation links or ip address (lol)
  • CERTFILE: filename. SSL certificate file for serving https.
  • KEYFILE: filename. SSL private key file for serving https.
  • ANON: boolean. If True, all logs will be anonymised (IP will be hidden)
  • FQDN: domain name. This will be the domain name the smtp dumper will reply to HELOs as. This should be your domain name.
  • FILENAME_TEMPLATE: filename format string. The logs for a connection will be saved here. Parameters are: timestamp, conn_id, local_port, remote_host, time.
  • TIMESTAMP_TEMPLATE: timestamp format string. Used for strftime for log filename.
  • LOG_DIR_TEMPLATE: python expression. gets evaluated by eval to choose the directory for the log. You can nest multiple directories; if the path doesn't exist it is created.
  • LOG_VIEWER_RENDERER: request handler for log viewer. this defaults to SimpleHTTPServer so the script works fine standalone, but if ComplexHTTPServer is available, it uses that. If None, then the server is disabled and you can use Apache or nginx to serve it.

Lastly, if it exists, settings.py is executed last, meaning you can override all of the defaults in there cleanly.

You can select and deselect ports to serve on at the bottom of the file in main. You can also choose to use nginx or Apache to serve the logs; in fact, this is probably preferable. Simply comment out the server line in main for port 8000.

Why?

The other http(s)bins are annoying to use when you're doing some kind of web exploitation or something low-level. Some of them, for example, reject payloads that are too large. Some even refuse connections if the wrong host header is provided. Others don't support https which is a dealbreaker if there's a CSP in use. This script is also designed to be stupid simple and hassle-free to setup on any server: no Docker, no Vagrant, no Python package dependencies etc. Simply wget the script and run it.

Closing remarks and thanks

As I hope you can see this software is a piece of crap and I wrote it so I can dump some verification emails and to solve some CTF challenges or temporary security engagements. In other words if you use this in production please contact me so we can celebrate and get some drinks together.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].