This commit is contained in:
crusader 2018-09-17 23:19:16 +09:00
parent 6259921329
commit b893dcbebc
6 changed files with 45 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import { Zone } from './Zone';
// import { Port } from './Port';
import { MetaIPType } from '../meta';
import { MetaIPType, MetaDiscovererType } from '../meta';
export const defaultOsType = 'UNKNOWN';
export const defaultHostType = 'HOST';
@ -20,7 +20,7 @@ export interface Host {
hostModel?: string;
meta?: Map<string, Map<string, string>>;
discoveredBy?: string[];
discoveredBy?: MetaDiscovererType[];
discoveredDate?: Date;
zone?: Zone;

View File

@ -1,12 +1,12 @@
import { Host } from './Host';
import { MetaPortType } from '../meta';
import { MetaPortType, MetaDiscovererType } from '../meta';
export interface Port {
metaPortType?: MetaPortType;
portNumber?: number;
meta?: Map<string, Map<string, string>>;
discoveredBy?: string[];
discoveredBy?: MetaDiscovererType[];
discoveredDate?: Date;
host?: Host;

View File

@ -1,5 +1,5 @@
import { Port } from './Port';
import { MetaCryptoType } from '../meta';
import { MetaCryptoType, MetaDiscovererType } from '../meta';
export const defaultServiceType = 'ETC';
export const defaultServiceVendor = 'UNKNOWN';
@ -16,7 +16,7 @@ export interface Service {
serviceVersion?: string;
meta?: Map<string, Map<string, string>>;
discoveredBy?: string[];
discoveredBy?: MetaDiscovererType[];
discoveredDate?: Date;
port?: Port;

View File

@ -1,4 +1,4 @@
import { MetaIPType } from '../meta';
import { MetaIPType, MetaDiscovererType } from '../meta';
export interface Zone {
network?: string;
@ -8,7 +8,7 @@ export interface Zone {
mac?: string;
meta?: Map<string, Map<string, string>>;
discoveredBy?: string[];
discoveredBy?: MetaDiscovererType[];
discoveredDate?: Date;
hostList?: any[];

View File

@ -0,0 +1,35 @@
export interface MetaDiscovererType {
id?: number;
name?: string;
key?: string;
createDate?: Date;
}
export enum MetaDiscovererTypeEnum {
UNKNOWN = 'UNKNOWN',
ARP = 'ARP',
ICMP = 'ICMP',
MDNS = 'MDNS',
NDP = 'NDP',
SNMP = 'SNMP',
TCPACK = 'TCPACK',
TCPFIN = 'TCPFIN',
TCPNULL = 'TCPNULL',
TCPXmas = 'TCPXmas',
TCPSyn = 'TCPSyn',
TCPConnection = 'TCPConnection',
TCPMatcher = 'TCPMatcher',
UDPConnection = 'UDPConnection',
UDPMatcher = 'UDPMatcher',
UPnP = 'UPnP',
}
export const toMetaDiscovererTypeEnum = (v: MetaDiscovererType): MetaDiscovererTypeEnum => {
return MetaDiscovererTypeEnum[v.key];
};
export const toMetaDiscovererType = (v: MetaDiscovererTypeEnum): MetaDiscovererType => {
return {
key: v,
};
};

View File

@ -1,7 +1,9 @@
export * from './MetaCrawler';
export * from './MetaCrawlerInputItem';
export * from './MetaCrawlerMapping';
export * from './MetaCredentialType';
export * from './MetaCryptoType';
export * from './MetaDiscovererType';
export * from './MetaEmailType';
export * from './MetaHistoryType';
export * from './MetaInfraType';