Skip to content

Commit

Permalink
v2023.12.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Beercow committed Dec 13, 2023
1 parent 842d297 commit 1953d61
Show file tree
Hide file tree
Showing 145 changed files with 2,602 additions and 8,977 deletions.
24 changes: 24 additions & 0 deletions Docs/OneDriveExplorerManual.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
2023-03-10 Rev. 3 - Updated for v2023.03.10
2023-05-05 Rev. 4 - Updated for v2023.05.05
2023-09-07 Rev. 5 - Updated for v2023.09.07
2023-12-13 Rev. 5 - Updated for v2023.12.13

## OneDriveExplorer GUI Introduction
OneDriveExplorer GUI is used to view the contents of \<UserCid>.dat files. It can load multiple settings, logs, and $Recycle.bin files at once. Search across all settings files, view OneDrive logs and much more.
Expand All @@ -27,6 +28,12 @@ On the left-hand side of the window is the navigation pane. This pane displays t
#### File/Folder Pane
The file/folder pane shows the contents of the folder selected in the navigation pane along with it's OneDrive status. Once a file/folder has been loaded and a folder has been selected, a context menu is available by right clicking on the file/folder. Context menu options will be discussed later.

##### Status
File folder statu is a s follows:
![](.\Manual\blog2.png)

<span style="color:red">*Note: Not Synced and Not Linked do not exist on the endpoint. These are artifacts of syncing and linking libraries.</span>

#### Details
The Details pane shows detailed information about the folder/file selected. Information includes name, type, path, parentid, driveitemid, etag, and number of children.

Expand Down Expand Up @@ -318,6 +325,23 @@ A user registry hive can be supplied with the `-r` argument. This will resolve s
# Creating CStructs

# Version changes
## v2023.12.13
### Added
#### GUI/commandline
* Media data
* spoPermissions
### Fixed
#### GUI
* Increased sash size
* File/Folder status
#### GUI/commandline
* Proper nesting of files/folders
* json format
* Code cleanup
## v2023.09.22
### Fixed
#### GUI/commandline
* updated odl parser for version 3
## v2023.09.07
### Added
#### GUI/commandline
Expand Down
Binary file added Docs/manual/blog2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed OneDriveExplorer/Images/available_file.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/available_shared_file.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/excluded_directory.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/excluded_file.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/excluded_shared_file.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/file_yellow_big.png
Binary file not shown.
Binary file removed OneDriveExplorer/Images/file_yellow_delete_big.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes
Binary file added OneDriveExplorer/Images/files/not_link_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/files/not_sync_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/folders/67.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/folders/not_link_folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/folders/sync_directory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/gui/Icon109.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/gui/Icon114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OneDriveExplorer/Images/gui/Icon59.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed OneDriveExplorer/Images/online_directory.png
Diff not rendered.
Binary file removed OneDriveExplorer/Images/online_file.png
Diff not rendered.
Binary file removed OneDriveExplorer/Images/online_shared_directory.png
Diff not rendered.
Binary file removed OneDriveExplorer/Images/online_shared_file.png
Diff not rendered.
File renamed without changes.
File renamed without changes
File renamed without changes
Binary file added OneDriveExplorer/Images/remove/Icon100.ico
Binary file not shown.
Binary file added OneDriveExplorer/Images/remove/Icon100.png
Binary file added OneDriveExplorer/Images/remove/Icon144.png
Binary file added OneDriveExplorer/Images/remove/Icon67.png
Binary file added OneDriveExplorer/Images/remove/Icon67_new.png
Binary file added OneDriveExplorer/Images/remove/Icon91.ico
Binary file not shown.
Binary file added OneDriveExplorer/Images/remove/Icon92.ico
Binary file not shown.
Binary file added OneDriveExplorer/Images/remove/Icon99.ico
Binary file not shown.
File renamed without changes
Binary file added OneDriveExplorer/Images/remove/link_file.png
Binary file added OneDriveExplorer/Images/remove/not_sync.png
File renamed without changes
Binary file added OneDriveExplorer/Images/search/Icon111.png
Binary file added OneDriveExplorer/Images/search/Icon116.png
Binary file added OneDriveExplorer/Images/search/Icon56.png
Binary file added OneDriveExplorer/Images/search/Icon7.png
Binary file added OneDriveExplorer/Images/search/Icon98.png
Binary file added OneDriveExplorer/Images/search/available_big.png
Binary file added OneDriveExplorer/Images/search/directory_big.png
Binary file added OneDriveExplorer/Images/search/excluded_big.png
Binary file added OneDriveExplorer/Images/search/hdd.png
Binary file added OneDriveExplorer/Images/search/locked_big.png
Binary file added OneDriveExplorer/Images/search/lync2_big.png
Binary file added OneDriveExplorer/Images/search/lync_big.png
Binary file added OneDriveExplorer/Images/search/not_lync_big.png
Binary file added OneDriveExplorer/Images/search/not_sync_big.png
Binary file added OneDriveExplorer/Images/search/online_big.png
Binary file added OneDriveExplorer/Images/search/r_locked_big.png
Binary file added OneDriveExplorer/Images/search/shared_big.png
Binary file added OneDriveExplorer/Images/search/sync_big.png
Binary file removed OneDriveExplorer/Images/shared_file.png
Diff not rendered.
Binary file modified OneDriveExplorer/Images/splashv.png
File renamed without changes
File renamed without changes
Binary file added OneDriveExplorer/Images/status/not_link_share.png
Binary file added OneDriveExplorer/Images/status/not_sync_share.png
File renamed without changes
Binary file added OneDriveExplorer/Images/status/online-link.png
File renamed without changes
Binary file added OneDriveExplorer/Images/status/online_not_link.png
Binary file added OneDriveExplorer/Images/status/online_not_sync.png
Binary file added OneDriveExplorer/Images/status/online_sync.png
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 53 additions & 15 deletions OneDriveExplorer/OneDriveExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from ode.renderers.json import print_json
from ode.renderers.csv_file import print_csv
from ode.renderers.html import print_html
from ode.parsers.dat_new import parse_dat
from ode.parsers.onedrive import parse_onedrive
import ode.parsers.dat as dat_parser
import ode.parsers.onedrive as onedrive_parser
from ode.parsers.odl import parse_odl, load_cparser
from ode.parsers.sqlite_db import parse_sql
import ode.parsers.sqlite_db as sqlite_parser
from ode.utils import update_from_repo

logging.basicConfig(level=logging.INFO,
Expand All @@ -20,10 +20,12 @@
)

__author__ = "Brian Maloney"
__version__ = "2023.09.22"
__version__ = "2023.12.13"
__email__ = "[email protected]"
rbin = []

DATParser = dat_parser.DATParser()
OneDriveParser = onedrive_parser.OneDriveParser()
SQLiteParser = sqlite_parser.SQLiteParser()

def spinning_cursor():
while True:
Expand Down Expand Up @@ -53,7 +55,8 @@ def output():
if ((args.csv or args.html) and args.json) or (not args.csv and not args.html):
if not args.json:
args.json = '.'
print_json(df, rbin_df, name, args.pretty, args.json)
# print_json(df, rbin_df, name, args.pretty, args.json)
print_json(cache, name, args.pretty, args.json)

try:
file_count = df.Type.value_counts()['File']
Expand All @@ -62,7 +65,8 @@ def output():
file_count = 0

try:
del_count = rbin_df.Type.value_counts()['File - deleted']
# del_count = rbin_df.Type.value_counts()['File - deleted']
del_count = len(rbin_df)
except (KeyError, AttributeError):
logging.warning("KeyError: 'File - deleted'")
del_count = 0
Expand Down Expand Up @@ -169,13 +173,37 @@ def output():
name = f'{sql_find[0][0]}_{sql_find[0][1]}'
except Exception:
name = 'SQLite_DB'
df, rbin_df = parse_sql(args.sql, args.reghive)
output()
df, rbin_df, df_scope, scopeID, account = SQLiteParser.parse_sql(args.sql)

if not df.empty:
cache, rbin_df = OneDriveParser.parse_onedrive(df, df_scope, scopeID, args.sql, rbin_df, account, args.reghive, args.RECYCLE_BIN)

if df.empty:
print(f'Unable to parse {name} sqlite database.')
logging.warning(f'Unable to parse {name} sqlite database.')
else:
output()

rootDir = args.logs
if rootDir is None:
sys.exit()
if rootDir is not True:
load_cparser(args.cstructs)
odl = parse_odl(rootDir)
if not args.csv:
args.csv = '.'
log_output = f'{args.csv}/ODL_logs.csv'
odl.to_csv(log_output, index=False)

if args.file:
account = os.path.dirname(args.file.replace('/', '\\')).rsplit('\\', 1)[-1]
df, name = parse_dat(args.file, args.reghive, args.RECYCLE_BIN, start, account)
df, rbin_df = parse_onedrive(df, account, args.reghive, args.RECYCLE_BIN)
name = os.path.split(args.file)[1]

df, rbin_df, df_scope, scopeID = DATParser.parse_dat(args.file, account)

if not df.empty:
cache, rbin_df = OneDriveParser.parse_onedrive(df, df_scope, scopeID, args.file, rbin_df, account, args.reghive, args.RECYCLE_BIN)

if df.empty:
filename = args.file.replace('/', '\\')
print(f'Unable to parse {filename}.')
Expand Down Expand Up @@ -237,7 +265,7 @@ def output():
if sql_find:
d.setdefault(sql_find[0][0], {})
d[sql_find[0][0]].setdefault('sql', {})[f'{sql_find[0][1]}'] = path
print(d)

for key, value in d.items():
filenames = []
for k, v in value.items():
Expand All @@ -251,8 +279,13 @@ def output():
print(f'\n\nParsing {key} OneDrive\n')
for filename in filenames:
account = os.path.dirname(filename.replace('/', '\\')).rsplit('\\', 1)[-1]
df, name = parse_dat(filename, args.reghive, args.RECYCLE_BIN, start, account)
df, rbin_df = parse_onedrive(df, account, args.reghive, args.RECYCLE_BIN)
name = os.path.split(filename)[1]

df, rbin_df, df_scope, scopeID = DATParser.parse_dat(filename, account)

if not df.empty:
cache, rbin_df = OneDriveParser.parse_onedrive(df, df_scope, scopeID, filename, rbin_df, account, args.reghive, args.RECYCLE_BIN)

if df.empty:
filename = filename.replace('/', '\\')
print(f'Unable to parse {filename}.')
Expand All @@ -264,7 +297,12 @@ def output():
print(f'\n\nParsing {key} OneDrive\n')
for account, sql_dir in v.items():
name = f'{key}_{account}'
df, rbin_df = parse_sql(sql_dir, args.reghive)

df, rbin_df, df_scope, scopeID, account = SQLiteParser.parse_sql(sql_dir)

if not df.empty:
cache, rbin_df = OneDriveParser.parse_onedrive(df, df_scope, scopeID, sql_dir, rbin_df, account, args.reghive, args.RECYCLE_BIN)

if df.empty:
print(f'Unable to parse {name} sqlite database.')
logging.warning(f'Unable to parse {name} sqlite database.')
Expand Down
Loading

0 comments on commit 1953d61

Please sign in to comment.