Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protonVPN.py] - Included VPN Connection History #289

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Properly closed protonvpn_log
  • Loading branch information
nxb1t authored Sep 6, 2022
commit 9150f82dfb7773ac07096126a4cef7dd70c2f774
9 changes: 6 additions & 3 deletions scripts/artifacts/protonVPN.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ def get_protonVPN(files_found, report_folder, seeker, wrap_text):

data_list = []

protonvpn_log = open(file_found).readlines()
protonvpn_log = open(file_found, 'r')
log_entries = protonvpn_log.readlines()
protonvpn_log.close()

regex = re.compile(r"node.+\.protonvpn\.net")
for entry in protonvpn_log:
for entry in log_entries:
initial_connect = entry.find('to:')
if initial_connect != -1:
timestamp = entry[:entry.find('|')-1].split('.')[0].replace('T', ' ')
Expand Down Expand Up @@ -140,4 +143,4 @@ def get_protonVPN(files_found, report_folder, seeker, wrap_text):
"ProtonVPN",
('**/ch.protonvpn.android/databases/db', '**/ch.protonvpn.android/shared_prefs/ServerListUpdater.xml', '**/ch.protonvpn.android/log/Data.log'), get_protonVPN
)
}
}