NETWORK ATTACKS FRAMEWORK  1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
NA_Utils Class Reference

Utility class. More...

#include <NA_Utils.h>

List of all members.

Static Public Member Functions

static std::string currentDateTime ()
 Get current date/time, format is YYYY-MM-DD.HH:mm:ss.

Detailed Description

Utility class.

Class that provide several utility methods for MA framework

Author:
Roberto Magán Carrión, gmacia@ugr.es
Date:
01/22/2013

Definition at line 42 of file NA_Utils.h.


Member Function Documentation

std::string NA_Utils::currentDateTime ( ) [static]

Get current date/time, format is YYYY-MM-DD.HH:mm:ss.

Returns:
string time in the specific format

Definition at line 33 of file NA_Utils.cc.

                                    {
    time_t now = time(0);
    struct tm tstruct;
    char buf[80];
    tstruct = *localtime(&now);
    // Visit http://www.cplusplus.com/reference/clibrary/ctime/strftime/
    // for more information about date/time format
    strftime(buf, sizeof(buf), "%X", &tstruct);

    return buf;
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerator Defines