Skip to content

Commit

Permalink
feat(probes): dummy probe
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjeneer committed Mar 27, 2023
1 parent 86f8200 commit aecdb84
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/service/scan/scanService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class ScanService implements IScanService {
notification: false,
target: scanRequest.target,
periodicity: scanRequest.periodicity,
user_id: scanRequest.user_id
userId: scanRequest.user_id
})
console.log(`[REQUEST][${newScanId}] Scan start data saved !`)

Expand Down
2 changes: 1 addition & 1 deletion src/service/scan/types/startData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export type ScanStartData = {
notification: boolean;
target: string;
periodicity: string;
user_id: string;
userId: string;
}

export type ProbeStartData = {
Expand Down
11 changes: 10 additions & 1 deletion src/service/server/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const setupRoutes = (server: Server) => {
})

server.getFastify().get('/probes', async (req, res) => {
return [{
const probes = [{
name: 'probe-nmap',
description: 'Cette sonde va tenter d’dentifier tous les services ouverts sur le serveur cible, et de trouver des vulnérabilités connues associées à leur version.',
type: 'Passive'
Expand All @@ -29,5 +29,14 @@ export const setupRoutes = (server: Server) => {
description: 'Cette sonde va tenter de trouver les sous-domaines sensibles les plus connus, attachés au domaine cible.',
type: 'Passive'
}]

if (process.env.NODE_ENV === "dev") {
probes.push({
name: 'probe-dummy',
description: 'Dummy probe for dev',
type: 'Passive'
})
}
return probes
})
}

0 comments on commit aecdb84

Please sign in to comment.