├── blocked_prefixes.txt
├── filter_down.sh
├── occupant-telnet-proxy-filter.sh
├── inner-pipe.sh
├── filter_up.sh
└── README.md
/blocked_prefixes.txt:
--------------------------------------------------------------------------------
1 | \W(R[A-Z]?|U[A-I0]|E[UVW])[0-9]
2 |
--------------------------------------------------------------------------------
/filter_down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | grep -Ev -f blocked_prefixes.txt
4 |
--------------------------------------------------------------------------------
/occupant-telnet-proxy-filter.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -eu
3 | socat -dd TCP-LISTEN:7300,reuseaddr,fork SYSTEM:'./inner-pipe.sh'
4 |
5 |
--------------------------------------------------------------------------------
/inner-pipe.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -eu
3 | stdbuf -i0 -o0 -e0 ./filter_up.sh \
4 | | socat -dd - TCP:127.0.0.1:7301,keepalive \
5 | | stdbuf -i0 -o0 -e0 ./filter_down.sh
6 |
7 |
--------------------------------------------------------------------------------
/filter_up.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | perl -CS -pe '
3 | binmode(STDIN); binmode(STDOUT);
4 | # DO NOT touch 0xFF IAC sequence: protection – replace only printable blocks
5 | s/forbidden/XXXX/g;
6 | $_ = "" if /totally_block_this/;
7 | '
8 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Telnet proxy filter
2 |
3 | **MITM Telnet proxy to filter occupants in a DX cluster**
4 |
5 | ## How to use on linux
6 | - Start the cw skimmer server in wine, for example: `wine /home/dan/.wine/drive_c/Program\ Files/Afreet/SkimSrv/SkimSrv.exe`
7 | - Change the port in skimmer server to **7301**
8 | - Copy the files from github into one directory `git clone git@github.com:ok1hra/Telnet-proxy-filter.git`
9 | - Set the permissions with the command `cd Telnet-proxy-filter && chmod 766 *.sh`
10 | - Install socat if not present, for example by command `sudo apt install socat`
11 | - Run proxy in terminal `./occupant-telnet-proxy-filter.sh`
12 | - Run `wine Aggregator_v6.4.exe` and setup.
13 |
14 |
15 | ---
16 |
17 |
18 |
19 | 
20 |
*This project was published symbolically on Day of Memory (August 21, 1968) – marking [the invasion and occupation that ended the Prague Spring,](https://en.wikipedia.org/wiki/Warsaw_Pact_invasion_of_Czechoslovakia) a pivotal moment in Czechoslovak history.*
21 |
--------------------------------------------------------------------------------