OpenVAS Scanner
6.0.1
|
OpenVAS Transfer Protocol handling. More...
#include "ntp.h"
#include "../misc/network.h"
#include "comm.h"
#include "hosts.h"
#include "otp.h"
#include "utils.h"
#include <glib.h>
#include <gvm/base/prefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Macros | |
#define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
#define | G_LOG_DOMAIN "sd main" |
GLib log domain. More... | |
Functions | |
static int | ntp_read_prefs (int soc) |
Reads in "server" prefs sent by client. More... | |
static int | ntp_long_attack (int) |
static int | ntp_recv_file (struct scan_globals *globals) |
Receive a file sent by the client. More... | |
int | ntp_parse_input (struct scan_globals *globals, char *input) |
Parses the input sent by the client before the NEW_ATTACK message. More... | |
static void | files_add_translation (struct scan_globals *globals, const char *remotename, char *contents) |
Adds a 'translation' entry for a file sent by the client. More... | |
static void | files_add_size_translation (struct scan_globals *globals, const char *remotename, const long filesize) |
Adds a 'content size' entry for a file sent by the client. More... | |
static int | __ntp_timestamp_scan (int soc, char *msg) |
static int | __ntp_timestamp_scan_host (int soc, kb_t kb, char *msg, char *host) |
int | ntp_timestamp_scan_starts (int soc) |
int | ntp_timestamp_scan_ends (int soc) |
int | ntp_timestamp_host_scan_starts (int soc, kb_t kb, char *host) |
int | ntp_timestamp_host_scan_ends (int soc, kb_t kb, char *host) |
OpenVAS Transfer Protocol handling.
#define G_LOG_DOMAIN "sd main" |
GLib log domain.
#define MIN | ( | x, | |
y | |||
) | ((x) < (y) ? (x) : (y)) |
|
static |
|
static |
|
static |
Adds a 'content size' entry for a file sent by the client.
Files sent by the client are stored in memory on the server side. Because they may be binary we need to store the size of the uploaded file as well. This function sets up a mapping from the original name sent by the client to the file size.
globals | Global struct. |
remotename | Name of the file as referenced by the client. |
filesize | Size of the file in bytes. |
|
static |
Adds a 'translation' entry for a file sent by the client.
Files sent by the client are stored in memory on the server side. In order to access these files, their original name ('local' to the client) can be 'translated' into the file contents of the in-memory copy of the file on the server side.
globals | Global struct. |
remotename | Name of the file as referenced by the client. |
contents | Contents of the file. |
|
static |
int ntp_parse_input | ( | struct scan_globals * | globals, |
char * | input | ||
) |
Parses the input sent by the client before the NEW_ATTACK message.
|
static |
Reads in "server" prefs sent by client.
soc | Socket to read from. |
|
static |
Receive a file sent by the client.
int ntp_timestamp_host_scan_ends | ( | int | soc, |
kb_t | kb, | ||
char * | host | ||
) |
int ntp_timestamp_host_scan_starts | ( | int | soc, |
kb_t | kb, | ||
char * | host | ||
) |
int ntp_timestamp_scan_ends | ( | int | soc | ) |
int ntp_timestamp_scan_starts | ( | int | soc | ) |