You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Joshua Collins 8f0cb0b7b6 added delete agent function 4 years ago
app added delete agent function 4 years ago
test initial commit 4 years ago
.gitignore initial commit 4 years ago
README.md added readme 4 years ago
index.js initial commit 4 years ago
package-lock.json initial commit 4 years ago
package.json initial commit 4 years ago

README.md

Redirector

API Routes

Agents

GET /api/agents

RESPONSE 200 (No Agents)
[]
RESPONSE 200 (Agents)
[
  {
    "id": 1,
    "os": "windows",
    "ip": "192.168.1.10",
    "profile: "g1",
    ...
  },
  ...
]
GET /api/agents/:agentId

RESPONSE 200
{
  "id": 1,
  "os": "windows",
  "ip": "192.168.1.10",
  "profile: "g1",
}
RESPONSE 404 (Invalid Agent)
{
  "message": "agent does not exist"
}
PUT /api/agents/:agentId/status

RESPONSE 200
GET /api/agents/:agentId/tasks

RESPONSE 200 (No Tasks)
[]
RESPONSE 200 (Tasks)
[
  {
    "id" 1,
    "agentId": 1,
    "command": "Z2V0LWhvc3Q=".
    ...
  },
  ...
]
RESPONSE 404 (Invalid Agent)
{
  "message": "agent does not exist"
}

Tasks

POST /api/tasks
{
  "command": "Z2V0LWhvc3Q=",
  "agentId": 1
}

RESPONSE 200
{
  "taskId": 1,
  "agentId: 1
}
GET /api/tasks

RESPONSE 200 (No Tasks)
[]
RESPONSE 200 (Tasks)
[
  {
    "id" 1,
    "agentId": 1,
    "command": "Z2V0LWhvc3Q=".
    ...
  },
  ...
]
GET /api/tasks/:taskId

RESPONSE 200
{
  "id" 1,
  "agentId": 1,
  "command": "Z2V0LWhvc3Q=".
  ...
}
RESPONSE (Invalid Task)
{
  "message": "task does not exist"
}