mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-09 16:24:59 +01:00
WIP
This commit is contained in:
parent
483fcc0163
commit
f4934192ae
9 changed files with 303 additions and 389 deletions
7
utils.py
7
utils.py
|
|
@ -17,7 +17,7 @@ import csv
|
|||
import json
|
||||
import os
|
||||
import shutil
|
||||
from io import StringIO
|
||||
from io import StringIO, BytesIO
|
||||
import sys
|
||||
import glob
|
||||
|
||||
|
|
@ -102,3 +102,8 @@ def read_file_to_list(filename):
|
|||
def read_file_to_str(filename):
|
||||
"""Returns a str."""
|
||||
return "".join(read_file_to_list(filename))
|
||||
|
||||
def read_binary_file_as_stream(filename):
|
||||
"""Returns binary file content."""
|
||||
with open(filename, "rb",) as infile:
|
||||
return BytesIO(infile.read())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue