-
Notifications
You must be signed in to change notification settings - Fork 0
/
Volume_NTFS.h
65 lines (56 loc) · 1.91 KB
/
Volume_NTFS.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __VOLUME_NTFS_H__
#define __VOLUME_NTFS_H__
#include<iostream>
#include<iomanip>
#include<vector>
#include<string>
#include"Helper.h"
class NTFS{
private:
Helper *helper;
uint32_t pos_begin_LBA;
char jump_instruction[3];
char OEM_ID[8];
uint16_t bytes_per_sector;
uint8_t sectors_per_cluster;
uint16_t reserved_sector;
uint8_t media_descripter;
uint16_t sectors_per_track;
uint16_t number_of_heads;
uint32_t hidden_sectors;
long long total_sectors;
long long logical_cluster_number_MFT;
long long logical_cluster_number_MFTMirr;
uint32_t clusters_per_file_record_segment;
uint8_t cluster_per_index_buffer;
long long volume_serial_number;
char checksum[4];
uint16_t end_sector_marker;
public:
NTFS();
~NTFS();
NTFS(const NTFS &ntfs);
NTFS(const std::vector<uint8_t> &ntfs_boot_data);
NTFS(std::ifstream &f, const uint32_t &pos_LBA);
NTFS& operator=(const NTFS &ntfs);
public:
std::string get_OEMID();
uint32_t get_pos_begin_LBA();
uint16_t get_bytes_per_sector();
uint8_t get_sectors_per_cluster();
uint16_t get_reserved_sector();
uint8_t get_media_descripter();
uint16_t get_sectors_per_track();
uint16_t get_number_of_heads();
uint32_t get_hidden_sectors();
long long get_total_sectors();
long long get_logical_cluster_number_MFT();
long long get_logical_cluster_number_MFTMirr();
uint32_t get_clusters_per_file_record_segment();
uint8_t get_cluster_per_index_buffer();
long long get_volume_serial_number();
uint16_t get_end_sector_marker();
void show_volume_info();
void set_attrs_from_boot_sector(const std::vector<uint8_t> &boot_sector);
};
#endif // !__VOLUME_NTFS_H__