Projekt

Obecné

Profil

Stáhnout (2.69 KB) Statistiky
| Větev: | Tag: | Revize:
1 b6744c04 silhavyj
# Automatic detection and documentation of connected USB devices - Client - Bug Thugs
2 e49db721 silhavyj
3 b6744c04 silhavyj
---
4
5
- [Description](#description)
6
- [Requirements](#requirements)
7
  * [Windows](#windows)
8
- [Build](#build)
9
- [Execution](#execution)
10
11
---
12
13
## Description
14
15
This client application periodically scans all USB devices connected to the computer. For each device, it tries to retrieve its **vendor id**, **product id**, and **serial number**, which is believed to be unique for all devices from the same vendor. This data, along with a timestamp and computer-related information, is sent to the server (API). If the application fails to send the data, it will store the payload in a disk-based cache. The client then periodically accesses the cache in order to resend the failed payloads to the server.   
16
17
## Requirements
18
19
As required, the application was written in Python. In order to successfully run the application, the user needs to have Python 3 installed on their machine. Furthermore, they are required to run the following command to install all dependencies the application takes advantage of.
20
21
```
22
pip install -r requirements.txt
23
```
24
25
### Windows
26
27 75a5e12e silhavyj
For the Windows operating system, the user also needs to install the LibUSB-Win32 library. The installer can be found over at: https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe
28 b6744c04 silhavyj
29 75a5e12e silhavyj
Upon successful installation of this library, the following file should be created`C:\WINDOWS\system32\libusb0.dll`. The application uses this dynamic library to scan USB devices connected to the PC. The default installation folder of this library is `C:\Program Files\LibUSB-Win32\`. 
30
31
Before the very first start of the application, the user is required to execute following command as an administrator in order to give the client access to all USB devices of the same vendor id and product id.
32
33
```
34
install-filter.exe install --device=USB\Vid_064f.Pid_2af9.Rev_0100
35
```
36
37
Vector Keyman: vendor id = **064f**, product id = **2af9**
38
39
The `install-filter.exe` executable file can be found in the default LibUSB-Win32 installation folder in sub-folder `bin`, or it can be downloaded from the following link https://sourceforge.net/projects/libusb-win32/. 
40 b6744c04 silhavyj
41
42
## Build
43
44
In order to create an executable file of the application, the user can use the `build.bat` file located in the root directory of the project structure. If everything goes well, a file called `licence_detector.exe` should be created in the same location. This file represents the executable file of the application.
45
46
## Execution
47
48
49 75a5e12e silhavyj
After everything is successfully setup, you can simply run the application by running the following command from the terminal.
50 b6744c04 silhavyj
51
```
52
licence_detector.exe --help
53
```