You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-76Lines changed: 72 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,41 @@
2
2
(Very) simple and rudimentary C++ program that reads /var/log/syslog, filters out endlessh logs and determines basic stats, such as unique IDs, total accepted and closed connections.
3
3
4
4
# Building
5
-
As a one-file project, I didn't see the need to create a Makefile. <br >
6
5
This will only work on Linux systems.
7
6
8
7
```bash
9
-
g++ -std=c++17 -o endlessh-report main.cpp
8
+
# build docs
9
+
make docs
10
+
11
+
# build debug
12
+
make debug
13
+
14
+
# build release
15
+
make
16
+
17
+
# build all
18
+
make all
19
+
20
+
# clean repo
21
+
make clean
10
22
```
11
23
12
24
# Installing
13
25
After building the software, either move or copy it to /usr/local/bin, or add the build path to your local $PATH environment variable.
14
26
27
+
## System-wide installation
28
+
```bash
29
+
# install to /usr/local/bin
30
+
sudo make install
31
+
```
32
+
33
+
## User-specific install
15
34
```bash
16
-
sudo cp endlessh-report /usr/local/bin/endlessh-report # copy to global path
17
-
sudo mv endlessh-report /usr/local/bin/endlessh-report # move to global path
35
+
# ensure local bin-dir exists
36
+
mkdir -p ~/.local/bin ||>&2echo"Failed to create local bin dir!"
37
+
cp -v endlessh-report ~/.local/bin/
18
38
19
-
# in ~/.bashrc:
20
-
export PATH="/path/to/repo:$PATH"
39
+
echo"export PATH=\"$(realpath ~)/.local/bin:\$PATH\""| tee -a ~/.bashrc
21
40
```
22
41
23
42
# Usage
@@ -26,6 +45,8 @@ After building, simply call:
26
45
27
46
```bash
28
47
./endlessh-report
48
+
# or
49
+
endlessh-report
29
50
```
30
51
31
52
## Arguments
@@ -41,6 +62,7 @@ Switches:
41
62
--stdin Read logs from stdin
42
63
--abuse-ipdb, -a Enable AbuseIPDB-compatible CSV output
218.92.0.206,"18,14,22,15",2022-06-14T21:40:58Z,"218.92.0.206 fell into Endlessh tarpit; opened 3561, closed 3569 connections. Total time wasted: 2.21585e+06s. Total bytes sent by tarpit: 269973303B (Report generated by Endlessh Report Generator)"
156
+
61.177.172.108,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.172.108 fell into Endlessh tarpit; opened 8, closed 8 connections. Total time wasted: 5282.83s. Total bytes sent by tarpit: 669662B (Report generated by Endlessh Report Generator)"
157
+
61.177.173.46,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.173.46 fell into Endlessh tarpit; opened 8, closed 8 connections. Total time wasted: 7328.23s. Total bytes sent by tarpit: 931388B (Report generated by Endlessh Report Generator)"
158
+
136.144.41.181,"18,14,22,15",2022-06-14T21:40:58Z,"136.144.41.181 fell into Endlessh tarpit; opened 1, closed 1 connections. Total time wasted: 116.022s. Total bytes sent by tarpit: 13799B (Report generated by Endlessh Report Generator)"
159
+
61.177.173.50,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.173.50 fell into Endlessh tarpit; opened 12, closed 12 connections. Total time wasted: 9732.31s. Total bytes sent by tarpit: 1255507B (Report generated by Endlessh Report Generator)"
160
+
45.61.188.110,"18,14,22,15",2022-06-14T21:40:58Z,"45.61.188.110 fell into Endlessh tarpit; opened 5, closed 5 connections. Total time wasted: 15.004s. Total bytes sent by tarpit: 1154B (Report generated by Endlessh Report Generator)"
161
+
61.177.173.35,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.173.35 fell into Endlessh tarpit; opened 10, closed 10 connections. Total time wasted: 6529.89s. Total bytes sent by tarpit: 831889B (Report generated by Endlessh Report Generator)"
162
+
61.177.172.98,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.172.98 fell into Endlessh tarpit; opened 9, closed 9 connections. Total time wasted: 4610.36s. Total bytes sent by tarpit: 592071B (Report generated by Endlessh Report Generator)"
163
+
223.71.167.164,"18,14,22,15",2022-06-14T21:40:58Z,"223.71.167.164 fell into Endlessh tarpit; opened 3, closed 3 connections. Total time wasted: 8.001s. Total bytes sent by tarpit: 598B (Report generated by Endlessh Report Generator)"
164
+
45.61.185.160,"18,14,22,15",2022-06-14T21:40:58Z,"45.61.185.160 fell into Endlessh tarpit; opened 3, closed 3 connections. Total time wasted: 9.004s. Total bytes sent by tarpit: 955B (Report generated by Endlessh Report Generator)"
165
+
78.142.18.204,"18,14,22,15",2022-06-14T21:40:58Z,"78.142.18.204 fell into Endlessh tarpit; opened 28, closed 28 connections. Total time wasted: 103.027s. Total bytes sent by tarpit: 9708B (Report generated by Endlessh Report Generator)"
166
+
61.177.173.51,"18,14,22,15",2022-06-14T21:40:58Z,"61.177.173.51 fell into Endlessh tarpit; opened 7, closed 7 connections. Total time wasted: 3609.56s. Total bytes sent by tarpit: 463135B (Report generated by Endlessh Report Generator)"
167
+
67.207.83.91,"18,14,22,15",2022-06-14T21:40:58Z,"67.207.83.91 fell into Endlessh tarpit; opened 1, closed 1 connections. Total time wasted: 6.002s. Total bytes sent by tarpit: 644B (Report generated by Endlessh Report Generator)"
168
+
45.61.184.111,"18,14,22,15",2022-06-14T21:40:58Z,"45.61.184.111 fell into Endlessh tarpit; opened 7, closed 7 connections. Total time wasted: 21.004s. Total bytes sent by tarpit: 2096B (Report generated by Endlessh Report Generator)"
0 commit comments