⚝
One Hat Cyber Team
⚝
Your IP:
18.223.97.46
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
fm-agent
/
library
/
__pycache__
/
View File Name :
pickle_database.cpython-39.pyc
a � �f � @ s, d dl Z d dlZd dlZG dd� de�ZdS )� Nc @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�PickleDatabasez� This object is a wrapper to access and handle our local pickle file. We'll use this pickle file as a sort of database for storing schedules and other info for the agent.c C sv || _ zt�t|d��| _W nT typ t�| jj �}|� d�| j �� i | _t| j d� |�d| j � Y n0 d S )N�rbz1Unable to open database {}, creating an empty one�wbzDatabase created: %s) � file_path�pickle�load�open�data� Exception�logging� getLogger� __class__�__name__�warn�format�info)�selfr �log� r �,/usr/lib/fm-agent/library/pickle_database.py�__init__ s zPickleDatabase.__init__c C s t �| jt| jd�� d S )Nr )r �dumpr r r �r r r r �save s zPickleDatabase.savec C s | j | S �N�r �r �keyr r r �__getitem__ s zPickleDatabase.__getitem__c C s || j |<