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
|
/*
** The Sleuth Kit
**
** Brian Carrier [carrier <at> sleuthkit [dot] org]
** Copyright (c) 2010-2019 Brian Carrier. All Rights reserved
**
** This software is distributed under the Common Public License 1.0
**
*/
/**
* \file RegFileInfo.h
* Contains the class definitions for Registry File Info.
*/
#pragma once
#include <string>
#include "tsk/auto/tsk_auto.h"
#include "RegParser.h"
#include "RegHiveType.h"
class RegFileInfo {
public:
RegFileInfo(std::string &aName, std::string &aPath, RegHiveType::Enum a_hiveType, TSK_OFF_T aOff, TSK_INUM_T aMetaAddr, RegParser *a_regParser);
~RegFileInfo();
static RegHiveType::Enum hiveNameToType(const std::string &aName);
std::string getName() const { return m_name; };
std::string getPath() const { return m_path; };
TSK_OFF_T getOffset() const { return m_off; };
TSK_INUM_T getMetaAddr() const { return m_metaAddr; };
RegHiveType::Enum getHiveType() const { return m_hiveType; };
std::string getPathName() const { return m_path + "/" + m_name; };
std::string getUserName() const { return m_userName; };
void setUserAccountName(const std::string & a_name) { m_userName = a_name; };
void setUserSID(const std::string & a_sid) { m_userSID = a_sid; };
RegParser &getRegParser() const { return *m_regParser; };
private:
std::string m_name;
std::string m_path;
TSK_OFF_T m_off;
TSK_INUM_T m_metaAddr;
RegHiveType::Enum m_hiveType;
RegParser *m_regParser;
std::string m_userName;
std::string m_userSID;
};
class CompareRegfileType {
public:
bool operator()(RegFileInfo *lhs, RegFileInfo *rhs) { return lhs->getHiveType() < rhs->getHiveType(); }
};
|