summaryrefslogtreecommitdiff
path: root/src/main/java/com/it_jaros/jscanner/scan/domain/ScanResult.java
blob: e18e75d53554d335246bff9f7e66cf62729b3678 (plain) (blame)
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
package com.it_jaros.jscanner.scan.domain;

import com.it_jaros.jscanner.scan.service.ServiceType;

import java.util.BitSet;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public record ScanResult(
        String host,
        PortList openPorts,
        PortList filteredPorts,
        Map<Integer, ServiceType> bannerRecognition,
        List<ScanFailure> errors
) {
    public static ScanResult empty(String host) {
        return new ScanResult(
                host,
                new PortList(new BitSet(PortRange.MAX_PORT)),
                new PortList(new BitSet(PortRange.MAX_PORT)),
                Collections.emptyMap(),
                Collections.emptyList()
        );
    }
}