File size: 556 Bytes
5e4a461
 
4431575
c3e6acc
4431575
5b93dcc
4431575
 
5b93dcc
 
 
4431575
c3e6acc
 
4431575
 
 
 
 
 
 
 
 
8b31a5c
 
 
4431575
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import random
random.seed(42)
from env.env import DeceptionEnv
from env.attacker import brute_force, port_scan, credential_stuffing


def run():

    env = DeceptionEnv()
    env.reset()

    brute_force()
    port_scan()
    credential_stuffing()

    total_reward = 0

    _, r, _, _ = env.step("detect_attack")
    total_reward += r

    _, r, _, _ = env.step("deploy_honeypot")
    total_reward += r

    _, r, _, _ = env.step("fake_database")
    total_reward += r

    _, r, _, _ = env.step("block_ip")
    total_reward += r

    return total_reward