-
Notifications
You must be signed in to change notification settings - Fork 0
/
Renew_key.py
32 lines (25 loc) · 864 Bytes
/
Renew_key.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Script para usar con SecureCRT.
# GITHUB: https://github.com/kentron2019/SecureCRT_Integration_Keepass.git
# Version = 1.3
# Author = Karim Zin El Abidine El Alaoui.
# correo: kentron.dna@gmail.com
import sys
import os
import keepasshttp
from keepasshttp import KeePassHTTP
from pathlib import Path
Fichero = Path("./keepasshttp_key")
if Fichero.is_file():
# file exists
print("Fichero keepasshttp_key existe")
os.remove("./keepasshttp_key")
print("Fichero:keepasshttp_key, borrado para renovar la llave")
else:
print("Fichero keepasshttp_key no existe, se genera una nueva llave")
kph = KeePassHTTP(
#Genera la llave en la primera conexión hay que validar desde KeePass Password Safe
storage="./keepasshttp_key",
url="http://localhost:19455")
hey = kph.get( "192.168.1.1" )