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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { MetaIPType } from '../meta'; import { MetaIPType, MetaDiscovererType } from '../meta';
export interface Zone { export interface Zone {
network?: string; network?: string;
@ -8,7 +8,7 @@ export interface Zone {
mac?: string; mac?: string;
meta?: Map<string, Map<string, string>>; meta?: Map<string, Map<string, string>>;
discoveredBy?: string[]; discoveredBy?: MetaDiscovererType[];
discoveredDate?: Date; discoveredDate?: Date;
hostList?: any[]; 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 './MetaCrawler';
export * from './MetaCrawlerInputItem'; export * from './MetaCrawlerInputItem';
export * from './MetaCrawlerMapping'; export * from './MetaCrawlerMapping';
export * from './MetaCredentialType';
export * from './MetaCryptoType'; export * from './MetaCryptoType';
export * from './MetaDiscovererType';
export * from './MetaEmailType'; export * from './MetaEmailType';
export * from './MetaHistoryType'; export * from './MetaHistoryType';
export * from './MetaInfraType'; export * from './MetaInfraType';