This commit is contained in:
crusader 2018-06-07 15:42:32 +09:00
parent 4fdd27859d
commit 7512d74474
75 changed files with 198 additions and 174 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

6
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"git.ignoreLimitWarning": true
}

2
src/core/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './model';
export * from './type';

View File

@ -0,0 +1,6 @@
export interface PageParams {
pageNo: number;
countPerPage: number;
sortCol: string;
sortDirection: string;
}

2
src/core/model/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './Page';
export * from './PageParams';

2
src/core/type/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './CryptoType';
export * from './PortType';

View File

@ -0,0 +1,2 @@
export * from './core';
export * from './model';

View File

@ -1,4 +1,4 @@
export interface Alert {
created: string;
msg: string;
created: string;
msg: string;
}

View File

@ -1,5 +1,5 @@
import {Alert} from './Alert';
import { Alert } from './Alert';
export interface AlertMetric extends Alert {
status: string;
}
status: string;
}

View File

@ -1,5 +1,5 @@
import {Alert} from './Alert';
import { Alert } from './Alert';
export interface AlertSystem extends Alert {
status?: string; // test
}
status?: string; // test
}

View File

@ -1,8 +1,8 @@
import {Domain} from '../domain';
import { Domain } from '../domain';
export interface ApiKey {
id?: number;
apiKey?: string;
createDate?: Date;
domain?: Domain;
id?: number;
apiKey?: string;
createDate?: Date;
domain?: Domain;
}

View File

@ -0,0 +1 @@
export * from './ApiKey';

View File

@ -2,9 +2,9 @@ import { Target } from '../target';
import { MetaCrawler } from '../meta';
export interface AuthCrawler {
id?: number;
metaCrawler?: MetaCrawler;
target?: Target;
authJson?: string;
createDate?: Date;
id?: number;
metaCrawler?: MetaCrawler;
target?: Target;
authJson?: string;
createDate?: Date;
}

1
src/model/auth/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './AuthCrawler';

View File

@ -1,6 +0,0 @@
export interface PageParams {
pageNo: number;
countPerPage: number;
sortCol: string;
sortDirection: string;
}

View File

@ -1,6 +1,5 @@
import { DiscoverPort } from "./DiscoverPort";
export interface DiscoverHost {
firstScanRangev4?: string;
lastScanRangev4?: string;

View File

@ -3,4 +3,4 @@ import { DiscoverHost } from "./DiscoverHost";
export interface DiscoverZone {
excludePatterns?: string[];
discoverHost?: DiscoverHost;
}
}

View File

@ -1,11 +0,0 @@
export interface DiscoveryStartInfo {
startIpv4?: string;
endIPv4?: string;
excludeIpv4?: string;
startIpv6?: string;
endIPv6?: string;
excludeIpv6?: string;
startPort?: string;
endPort?: string;
services?: string[];
}

View File

@ -2,15 +2,15 @@ import { Zone } from './Zone';
import { Port } from './Port';
export interface Host {
id?: number;
ipv4?: string;
ipv6?: string;
mac?: string;
os?: string;
discoveredDate?: Date;
zone?: Zone;
target?: boolean;
id?: number;
ipv4?: string;
ipv6?: string;
mac?: string;
os?: string;
discoveredDate?: Date;
zone?: Zone;
target?: boolean;
ports?: Map<number, Port> | null;
portList?: Port[] | null;
ports?: Map<number, Port> | null;
portList?: Port[] | null;
}

View File

@ -1,15 +1,15 @@
import { Host } from './Host';
import { PortType } from './PortType';
import { Service } from './Service';
import { PortType } from '../../core/type';
export interface Port {
id?: number;
portType?: PortType;
portNumber?: number;
discoveredDate?: Date;
host?: Host;
target?: boolean;
id?: number;
portType?: PortType;
portNumber?: number;
discoveredDate?: Date;
host?: Host;
target?: boolean;
services?: Map<string, Service> | null;
serviceList?: Service[] | null;
services?: Map<string, Service> | null;
serviceList?: Service[] | null;
}

View File

@ -1,11 +1,11 @@
import { Port } from './Port';
import { CryptoType } from './CryptoType';
import { CryptoType } from '../../core/type';
export interface Service {
id?: number;
cryptoType?: CryptoType;
serviceName?: string;
discoveredDate?: Date;
port?: Port;
target?: boolean;
id?: number;
cryptoType?: CryptoType;
serviceName?: string;
discoveredDate?: Date;
port?: Port;
target?: boolean;
}

View File

@ -2,10 +2,8 @@ export * from './DiscoverHost';
export * from './DiscoverPort';
export * from './DiscoverService';
export * from './DiscoverZone';
export * from './DiscoveryStartInfo';
export * from './Host';
export * from './Port';
export * from './PortType';
export * from './Service';
export * from './Zone';

View File

@ -3,4 +3,4 @@ export interface Domain {
id?: number;
name?: string;
createDate?: Date;
}
}

View File

@ -1,5 +1,5 @@
import { Domain } from './Domain';
import {Member} from '../member';
import { Member } from '../member';
export interface DomainMember {
id?: number;

View File

@ -1,9 +1,9 @@
import {Member} from '../member';
import { Member } from '../member';
export interface EmailAuth {
id?: number;
emailAuthKey?: string;
createDate?: Date;
authConfirmDate?: Date;
member?: Member;
}
id?: number;
emailAuthKey?: string;
createDate?: Date;
authConfirmDate?: Date;
member?: Member;
}

1
src/model/email/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './EmailAuth';

View File

@ -4,11 +4,11 @@ import { Member } from '../member';
import { Domain } from '../domain';
export interface History {
id?: number;
createDate?: Date;
metaHistoryType?: MetaHistoryType;
message?: string;
probe?: Probe;
member?: Member;
domain?: Domain;
id?: number;
createDate?: Date;
metaHistoryType?: MetaHistoryType;
message?: string;
probe?: Probe;
member?: Member;
domain?: Domain;
}

View File

@ -0,0 +1 @@
export * from './History';

16
src/model/index.ts Normal file
View File

@ -0,0 +1,16 @@
export * from './alert';
export * from './apikey';
export * from './auth';
export * from './discovery';
export * from './domain';
export * from './email';
export * from './history';
export * from './infra';
export * from './member';
export * from './meta';
export * from './noauth';
export * from './notification';
export * from './probe';
export * from './sensor';
export * from './sensor-item';
export * from './target';

View File

@ -3,9 +3,9 @@ import { Probe } from '../probe';
import { Target } from '../target';
export interface Infra {
id?: number;
metaInfraType?: MetaInfraType;
createDate?: Date;
probe?: Probe;
target?: Target;
id?: number;
metaInfraType?: MetaInfraType;
createDate?: Date;
probe?: Probe;
target?: Target;
}

View File

@ -2,8 +2,8 @@ import { InfraOS } from './InfraOS';
import { Infra } from './Infra';
export interface InfraHost extends Infra {
infraOS?: InfraOS;
ipv4?: string;
ipv6?: string;
mac?: string;
infraOS?: InfraOS;
ipv4?: string;
ipv6?: string;
mac?: string;
}

View File

@ -1,6 +1,5 @@
import { Infra } from './Infra';
export interface InfraMachine extends Infra {
meta?: string;
meta?: string;
}

View File

@ -3,7 +3,7 @@ import { Infra } from './Infra';
import { MetaInfraVendor } from '../meta';
export interface InfraOS extends Infra {
infraMachine?: InfraMachine;
meta?: string;
metaInfraVendor?: MetaInfraVendor;
infraMachine?: InfraMachine;
meta?: string;
metaInfraVendor?: MetaInfraVendor;
}

View File

@ -2,6 +2,6 @@ import { InfraOS } from './InfraOS';
import { Infra } from './Infra';
export interface InfraOSApplication extends Infra {
infraOS?: InfraOS;
name?: string;
infraOS?: InfraOS;
name?: string;
}

View File

@ -2,6 +2,6 @@ import { InfraOS } from './InfraOS';
import { Infra } from './Infra';
export interface InfraOSDaemon extends Infra {
infraOS?: InfraOS;
name?: string;
infraOS?: InfraOS;
name?: string;
}

View File

@ -3,9 +3,9 @@ import { Infra } from './Infra';
import { MetaInfraVendor } from '../meta';
export interface InfraOSPort extends Infra {
infraOS?: InfraOS;
port?: number;
portType?: string;
metaInfraVendor?: MetaInfraVendor;
tlsType?: boolean;
infraOS?: InfraOS;
port?: number;
portType?: string;
metaInfraVendor?: MetaInfraVendor;
tlsType?: boolean;
}

View File

@ -3,9 +3,9 @@ import { Infra } from './Infra';
import { MetaInfraVendor } from '../meta';
export interface InfraService extends Infra {
infraHost?: InfraHost;
portType?: string;
port?: number;
metaInfraVendor?: MetaInfraVendor;
tlsType?: boolean;
infraHost?: InfraHost;
portType?: string;
port?: number;
metaInfraVendor?: MetaInfraVendor;
tlsType?: boolean;
}

View File

@ -1,8 +1,8 @@
export * from './Infra';
export * from './InfraHost';
export * from './InfraMachine';
export * from './InfraOS';
export * from './InfraOSApplication';
export * from './InfraOSDaemon';
export * from './InfraOSPort';
export * from './InfraOS';
export * from './InfraService';
export * from './Infra';

View File

@ -11,4 +11,4 @@ export interface Member {
metaMemberStatus?: MetaMemberStatus;
signinFailCount?: number;
totpType?: boolean;
}
}

View File

@ -1,6 +0,0 @@
export enum MemberStatus {
NOAUTH = 1,
NORMAL = 2,
DORMANCY = 3,
WITHDRAWAL = 4,
}

View File

@ -1,4 +1,4 @@
import {Member} from './Member';
import { Member } from './Member';
export interface MemberTotp {
id?: number;
@ -7,4 +7,4 @@ export interface MemberTotp {
createDate?: Date;
updateDate?: Date;
otpAuth?: string;
}
}

View File

@ -1,2 +1,2 @@
export * from './Member';
export * from './MemberTotp';
export * from './MemberTotp';

View File

@ -5,7 +5,7 @@ export interface MetaCrawler {
description?: string;
}
export enum MetaCrawler_ID {
export enum MetaCrawlerEnum {
ACTIVEDIRECTORY_CRAWLER = 1,
CASSANDRA_CRAWLER = 2,
DHCP_CRAWLER = 3,

View File

@ -13,4 +13,4 @@ export interface MetaCrawlerInputItem {
pattern?: string;
keyName?: string;
keyValue?: string;
}
}

View File

@ -4,7 +4,7 @@ export interface MetaHistoryType {
createDate?: Date;
}
export enum MetaHistoryType_ID {
export enum MetaHistoryTypeEnum {
Member = 1,
Probe = 2,
Discovery = 3,

View File

@ -5,7 +5,7 @@ export interface MetaInfraType {
}
export enum MetaInfraType_ID {
export enum MetaInfraTypeEnum {
MACHINE = 1,
HOST = 2,
OS = 3,

View File

@ -4,7 +4,7 @@ export interface MetaMemberStatus {
name?: string;
}
export enum MetaMemberStatus_ID {
export enum MetaMemberStatusEnum {
NOAUTH = 1,
NORMAL = 2,
DIAPAUSE = 3,

View File

@ -4,7 +4,7 @@ export interface MetaNoAuthProbeStatus {
name?: string;
}
export enum MetaNoAuthProbeStatus_ID {
export enum MetaNoAuthProbeStatusEnum {
ACCEPT = 1,
DENY = 2,
PROCESS = 3,

View File

@ -4,4 +4,4 @@ export interface MetaNotification {
createDate?: Date;
name?: string;
description?: string;
}
}

View File

@ -5,7 +5,6 @@ export interface MetaProbeArchitecture {
createDate?: Date;
}
export enum MetaProbeArchitecture_ID {
export enum MetaProbeArchitectureEnum {
x86_64bit = 1,
}

View File

@ -5,7 +5,7 @@ export interface MetaProbeOs {
createDate?: Date;
}
export enum MetaProbeOs_ID {
export enum MetaProbeOsEnum {
Windows = 1,
Debian = 2,
Ubuntu = 3,

View File

@ -8,4 +8,4 @@ export interface MetaProbePackage {
metaProbeOs?: MetaProbeOs;
metaProbeArchitecture?: MetaProbeArchitecture;
createDate?: Date;
}
}

View File

@ -4,7 +4,7 @@ export interface MetaProbeStatus {
name?: string;
}
export enum MetaProbeStatus_ID {
export enum MetaProbeStatusEnum {
INITIAL = 1,
NORMAL = 2,
}

View File

@ -3,4 +3,4 @@ export interface MetaProbeVersion {
id?: number;
version?: string;
createDate?: Date;
}
}

View File

@ -4,13 +4,13 @@ import { MetaSensorItemType } from './MetaSensorItemType';
export interface MetaSensorDisplayItem {
id?: number;
key?: string;
displayName?: string;
description?: string;
metaCrawler?: MetaCrawler;
metaSensorItemUnit?: MetaSensorItemUnit;
createDate?: Date;
metaSensorItemType?: MetaSensorItemType;
default?: boolean;
}
id?: number;
key?: string;
displayName?: string;
description?: string;
metaCrawler?: MetaCrawler;
metaSensorItemUnit?: MetaSensorItemUnit;
createDate?: Date;
metaSensorItemType?: MetaSensorItemType;
default?: boolean;
}

View File

@ -2,7 +2,7 @@ import { MetaSensorDisplayItem } from './MetaSensorDisplayItem';
import { MetaSensorItemKey } from './MetaSensorItemKey';
export interface MetaSensorDisplayMapping {
id?: number;
metaSensorDisplayItem?: MetaSensorDisplayItem;
metaSensorItemKey?: MetaSensorItemKey;
}
id?: number;
metaSensorDisplayItem?: MetaSensorDisplayItem;
metaSensorItemKey?: MetaSensorItemKey;
}

View File

@ -4,4 +4,4 @@ export interface MetaSensorItem {
key?: string;
name?: string;
createDate?: Date;
}
}

View File

@ -11,4 +11,4 @@ export interface MetaSensorItemKey {
metaCrawler?: MetaCrawler;
createDate?: Date;
metaSensorItemUnit?: MetaSensorItemUnit;
}
}

View File

@ -4,4 +4,4 @@ export interface MetaSensorItemType {
name?: string;
description?: string;
createDate?: Date;
}
}

View File

@ -4,4 +4,4 @@ export interface MetaSensorItemUnit {
unit?: string;
createDate?: Date;
mark?: string;
}
}

View File

@ -4,7 +4,7 @@ export interface MetaSensorStatus {
name?: string;
}
export enum MetaSensorStatus_ID {
export enum MetaSensorStatusEnum {
RUNNING = 1,
STOPPED = 2,
}

View File

@ -22,4 +22,3 @@ export * from './MetaSensorItemUnit';
export * from './MetaSensorStatus';
export * from './MetaVendorCrawler';
export * from './MetaVendorCrawlerSensorItem';

View File

@ -15,4 +15,4 @@ export interface NoAuthProbe {
probe?: Probe;
connectAddress?: string;
connectDate?: Date;
}
}

View File

@ -4,4 +4,4 @@ import { NoAuthProbeDescriptionNetwork } from './NoAuthProbeDescriptionNetwork';
export interface NoAuthProbeDescription {
host?: NoAuthProbeDescriptionHost;
network?: NoAuthProbeDescriptionNetwork
}
}

View File

@ -6,4 +6,4 @@ export interface NoAuthProbeDescriptionHost {
platformVersion?: string;
kernelVersion?: string;
hostID?: string;
}
}

View File

@ -3,4 +3,4 @@ export interface NoAuthProbeDescriptionNetwork {
address?: string;
gateway?: string;
macAddress?: string;
}
}

View File

@ -1,11 +1,11 @@
import {Member} from '../member';
import { Member } from '../member';
export interface Notification {
id?: number;
createDate?: Date;
title?: string;
message?: string;
member?: Member;
confirmDate?: Date;
url?: string;
id?: number;
createDate?: Date;
title?: string;
message?: string;
member?: Member;
confirmDate?: Date;
url?: string;
}

View File

@ -17,4 +17,4 @@ export interface Probe {
targetCount?: number;
connectDate?: Date;
connectAddress?: string;
}
}

View File

@ -1,8 +1,8 @@
import { Probe } from './Probe';
import {InfraHost} from '../infra';
import { InfraHost } from '../infra';
export interface ProbeHost {
id?: number;
probe?: Probe;
infraHost?: InfraHost;
}
}

View File

@ -11,4 +11,4 @@ export interface ProbeTask {
startDate?: Date;
endDate?: Date;
succeed?: boolean;
}
}

View File

@ -10,4 +10,4 @@ export interface Sensor {
metaCrawler?: MetaCrawler;
crawlerInputItems?: string;
itemCount?: number;
}
}

View File

@ -1,4 +1,4 @@
import {Sensor} from '../sensor';
import { Sensor } from '../sensor';
export interface Target {
id?: number;
@ -6,4 +6,4 @@ export interface Target {
displayName?: string;
description?: string;
sensors?: Sensor[];
}
}