TkN 2.1
Toolkit for Nuclei
tksystem Class Reference

Interface to the system (tested on linux and mac os) More...

Detailed Description

Interface to the system (tested on linux and mac os)

Definition at line 50 of file tksystem.h.

#include <tksystem.h>

Public Member Functions

 tksystem ()
 
virtual ~tksystem ()=default
 
int download_file (const tkstring &_filename, const tkstring &_outputdir="", bool _replace_existing=false, bool _use_filename=false)
 
bool exists (tkstring _file_name)
 
std::vector< tkstringget_list_of_files (const tkstring &_dir, const tkstring &_pattern="*")
 
tkstring get_system_command_output (tkstring command)
 
int getdir (tkstring _dir, std::vector< tkstring > &_files)
 
void list_files (const tkstring &_dir, const tkstring &_pattern)
 
int ls_dir (const tkstring &_dirname, tkstring _option="-l")
 
int make_dir (const tkstring &_dirname, bool _recursive=true)
 
int move (const tkstring &_from, const tkstring &_to)
 
int remove_dir (const tkstring &_dirname, bool _force=false)
 
int remove_file (const tkstring &_filename, bool _force=false)
 
int unzip_file (const tkstring &_filename, tkstring _outputdir="")
 

Static Public Member Functions

static tksystemthe_tksystem ()
 db_manager is a singleton More...
 

Constructor & Destructor Documentation

◆ tksystem()

tksystem ( )
inline

Definition at line 57 of file tksystem.h.

◆ ~tksystem()

virtual ~tksystem ( )
virtualdefault

Member Function Documentation

◆ download_file()

int download_file ( const tkstring _filename,
const tkstring _outputdir = "",
bool  _replace_existing = false,
bool  _use_filename = false 
)

Definition at line 173 of file tksystem.cpp.

◆ exists()

bool exists ( tkstring  _file_name)

Definition at line 90 of file tksystem.cpp.

◆ get_list_of_files()

std::vector< tkstring > get_list_of_files ( const tkstring _dir,
const tkstring _pattern = "*" 
)

Definition at line 127 of file tksystem.cpp.

◆ get_system_command_output()

tkstring get_system_command_output ( tkstring  command)

Definition at line 187 of file tksystem.cpp.

◆ getdir()

int getdir ( tkstring  _dir,
std::vector< tkstring > &  _files 
)

Definition at line 68 of file tksystem.cpp.

◆ list_files()

void list_files ( const tkstring _dir,
const tkstring _pattern 
)

Definition at line 119 of file tksystem.cpp.

◆ ls_dir()

int ls_dir ( const tkstring _dirname,
tkstring  _option = "-l" 
)

Definition at line 168 of file tksystem.cpp.

◆ make_dir()

int make_dir ( const tkstring _dirname,
bool  _recursive = true 
)

Definition at line 151 of file tksystem.cpp.

◆ move()

int move ( const tkstring _from,
const tkstring _to 
)

Definition at line 157 of file tksystem.cpp.

◆ remove_dir()

int remove_dir ( const tkstring _dirname,
bool  _force = false 
)

Definition at line 139 of file tksystem.cpp.

◆ remove_file()

int remove_file ( const tkstring _filename,
bool  _force = false 
)

Definition at line 145 of file tksystem.cpp.

◆ the_tksystem()

tksystem * the_tksystem ( )
static

db_manager is a singleton

Definition at line 59 of file tksystem.cpp.

◆ unzip_file()

int unzip_file ( const tkstring _filename,
tkstring  _outputdir = "" 
)

Definition at line 162 of file tksystem.cpp.


The documentation for this class was generated from the following files: