We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c148c6 commit a79680aCopy full SHA for a79680a
1 file changed
nxc/modules/putty.py
@@ -1,3 +1,4 @@
1
+from datetime import datetime
2
from io import BytesIO
3
import traceback
4
from urllib.parse import unquote
@@ -154,7 +155,7 @@ def extract_session(self, sessions):
154
155
makedirs(f"{NXC_PATH}/modules/PuTTY", exist_ok=True)
156
share = session["private_key_path"].split(":")[0] + "$"
157
file_path = session["private_key_path"].split(":")[1]
- download_path = f"{NXC_PATH}/modules/PuTTY/putty_{session['user']}_{session['session_name']}.sec"
158
+ download_path = f"{NXC_PATH}/modules/PuTTY/putty_{session['user']}_{session['session_name']}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}.sec".replace(":", "-")
159
160
buf = BytesIO()
161
with open(download_path, "wb") as file:
0 commit comments