|
|
@ -59,7 +59,7 @@ typedef struct LogFTPLogThread_ {
|
|
|
|
MemBuffer *buffer;
|
|
|
|
MemBuffer *buffer;
|
|
|
|
} LogFTPLogThread;
|
|
|
|
} LogFTPLogThread;
|
|
|
|
|
|
|
|
|
|
|
|
static void JsonFTPLogCommand(Flow *f, FTPTransaction *tx, JsonBuilder *jb)
|
|
|
|
static void EveFTPLogCommand(Flow *f, FTPTransaction *tx, JsonBuilder *jb)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* Preallocate array objects to simplify failure case */
|
|
|
|
/* Preallocate array objects to simplify failure case */
|
|
|
|
JsonBuilder *js_resplist = NULL;
|
|
|
|
JsonBuilder *js_resplist = NULL;
|
|
|
@ -173,9 +173,9 @@ static int JsonFTPLogger(ThreadVars *tv, void *thread_data,
|
|
|
|
EveAddCommonOptions(&ftp_ctx->cfg, p, f, jb);
|
|
|
|
EveAddCommonOptions(&ftp_ctx->cfg, p, f, jb);
|
|
|
|
jb_open_object(jb, event_type);
|
|
|
|
jb_open_object(jb, event_type);
|
|
|
|
if (f->alproto == ALPROTO_FTPDATA) {
|
|
|
|
if (f->alproto == ALPROTO_FTPDATA) {
|
|
|
|
JsonFTPDataAddMetadata(f, jb);
|
|
|
|
EveFTPDataAddMetadata(f, jb);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
JsonFTPLogCommand(f, tx, jb);
|
|
|
|
EveFTPLogCommand(f, tx, jb);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!jb_close(jb)) {
|
|
|
|
if (!jb_close(jb)) {
|
|
|
|