TargetCreator
This commit is contained in:
		
							parent
							
								
									db1b98f8b3
								
							
						
					
					
						commit
						67c7a8fcb9
					
				
							
								
								
									
										45
									
								
								src/ts/components/TargetCreate.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								src/ts/components/TargetCreate.tsx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,45 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var obj: any;
 | 
			
		||||
 | 
			
		||||
obj = {
 | 
			
		||||
    "ip": "192.168.1.106",
 | 
			
		||||
    "port": "80",
 | 
			
		||||
    "portType": "TCP",
 | 
			
		||||
    // "targetType":"",
 | 
			
		||||
    "vendorName": "HTTP",
 | 
			
		||||
    // "kinds":"",
 | 
			
		||||
    // "version":"",
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var objArray: any[];
 | 
			
		||||
objArray.push(obj);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export class TargetCreator {
 | 
			
		||||
 | 
			
		||||
    list: any[];
 | 
			
		||||
 | 
			
		||||
    public Add(ip: number, port: number, portType: string, vendorName: string) {
 | 
			
		||||
        let obj: any;
 | 
			
		||||
 | 
			
		||||
        obj = {
 | 
			
		||||
            "ip": ip,
 | 
			
		||||
            "port": port,
 | 
			
		||||
            "portType": portType,
 | 
			
		||||
            // "targetType":"",
 | 
			
		||||
            "vendorName": vendorName,
 | 
			
		||||
            // "kinds":"",
 | 
			
		||||
            // "version":"",
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.list.push(obj);
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public toString() :string {
 | 
			
		||||
        return JSON.stringify(this.list);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user