Skip to content

Commit f59c390

Browse files
authored
Merge pull request #2 from stark4n6/working
Minor Fixes
2 parents f756902 + 2ef0022 commit f59c390

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

SQLiteWalker.exe

97 Bytes
Binary file not shown.

SQLiteWalker.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
| (----`| | | | | | | | `---| |----`| |__
1515
\ \ | | | | | | | | | | | __|
1616
.----) | | `--' '--.| `----.| | | | | |____
17-
|_______/ \_____\_____\_______||__| |__| |_______|
17+
|_______/ \_____\_____\_______||__| |__| |_______|
1818
____ __ ____ ___ __ __ ___ _______ .______
1919
\ \ / \ / / / \ | | | |/ / | ____|| _ \
2020
\ \/ \/ / / ^ \ | | | ' / | |__ | |_) |
2121
\ / / /_\ \ | | | < | __| | /
2222
\ /\ / / _____ \ | `----.| . \ | |____ | |\ \----.
2323
\__/ \__/ /__/ \__\ |_______||__|\__\ |_______|| _| `._____|
2424
25-
SQLiteWalker v0.0.2
25+
SQLiteWalker v0.0.3
2626
https://github.com/stark4n6/SQLiteWalker
2727
@KevinPagano3 | @stark4n6 | startme.stark4n6.com
2828
'''
@@ -52,7 +52,8 @@ def main():
5252
data_headers = ('File Name','Export Path','Tables')
5353
error_headers = ('File Name','Export Path','Error')
5454
count = 0
55-
error_count = 0
55+
error_count = 0
56+
splitter = ''
5657

5758
start_time = time.time()
5859

@@ -124,8 +125,9 @@ def main():
124125
file_name = file.rsplit("/",1)
125126
if file.endswith(('-shm','-wal')):
126127
my_zip.extract(file,(out_folder + splitter + 'db_out'))
127-
128-
new_path = out_folder + splitter + 'db_out' + file
128+
if file.startswith('/'):
129+
file = file[1:]
130+
new_path = out_folder + splitter + 'db_out' + splitter + file
129131
if platform:
130132
new_path = new_path.replace('/','\\')
131133

@@ -136,11 +138,13 @@ def main():
136138
if header.startswith(b'\x53\x51\x4c\x69\x74\x65\x20\x66\x6f\x72\x6d\x61\x74\x20\x33\x00'):
137139
my_zip.extract(file,(out_folder + splitter + 'db_out'))
138140
try:
139-
new_path = out_folder + splitter + 'db_out' + file
141+
if file.startswith('/'):
142+
file = file[1:]
143+
new_path = out_folder + splitter + 'db_out' + splitter + file
144+
140145
if platform:
141146
new_path = new_path.replace('/','\\')
142-
143-
db_connect = sqlite3.connect(new_path)
147+
db_connect = open_sqlite_db_readonly(new_path)
144148

145149
sql_query = """SELECT name FROM sqlite_master
146150
WHERE type='table';"""
@@ -172,6 +176,7 @@ def main():
172176
finally:
173177
if db_connect:
174178
db_connect.close()
179+
175180
else:
176181
print('File is not a .zip, please try again. Exiting......')
177182
sys.exit()

0 commit comments

Comments
 (0)