<commit_before>DDoS Attack Visualization System (DAVS)
====

![](https://raw.githubusercontent.com/fridary/davs/master/screen.png)

Script that shows traffic on TCP server. Written on C using libpcap to handle incoming packets and JavaScript to visualize. WebSockets are used to send data from server to browser. Acts like tcpdump on web.

How to use
----------
#### Backend
You need root permissions to run program on your server. Connect to your server via terminal, upload files from backend folder and compile `main.c`
```
gcc main.c -o main -pthread -lpcap
```
Then execute program with any port
```
./main 8088
```

#### Frontend
Open `frontend/js/diagram.js` and modify host and port
```
var host = "127.0.0.1",
	ws = new WebSocket("ws://" + host + ":8088/echo");
```<commit_msg>edited screen<commit_after>DDoS Attack Visualization System (DAVS)
====

![](https://raw.githubusercontent.com/fridary/davs/master/screen.png)

Script that shows traffic on TCP server. Written on C using libpcap to handle incoming packets and JavaScript to visualize. WebSockets are used to send data from server to browser. System shows TCP state diagram, logs (tcpdump) and states (number of connections and ips on each state).

How to use
----------
#### Backend
You need root permissions to run program on your server. Connect to your server via terminal, upload files from backend folder and compile `main.c`
```
gcc main.c -o main -pthread -lpcap
```
Then execute program with any port
```
./main 8088
```

#### Frontend
Open `frontend/js/diagram.js` and modify host and port
```
var host = "127.0.0.1",
	ws = new WebSocket("ws://" + host + ":8088/echo");
```
{'fraction_non_alphanumeric': 0.1265899454875833, 'fraction_numerical': 0.016959418534221685, 'mean_word_length': 4.036585365853658, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4055724', 'n_tokens_mistral': 521, 'n_tokens_neox': 475, 'n_words': 211}