Skip to main content

Output of OS commands to str-convertible list for assignment to variables.

Project description

README.md

Warning (bug not fixed): The LogManagemet package exports the terminal log in an unencrypted last_log.txt file, so it is exposed to plaintext in cases of forensic data recovery.

Designed to create variables with results that you can obtain by filtering the log that your terminal gives you by OS commands.

Instalation: pip install OSLogManagement

>>> from LogManagement import os_commands_regex
>>> ip_adress = os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='IP Address.+: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})')
>>> print(ip_adress)
['192.168.0.101']

# convert list to string:
>>> ip =''.join(ip_adress)
>>> print(ip)
192.168.0.101

show_last_log() """summary It is useful for copying special characters (which do not load in your text editor) and using them in regex parameters. example:

>>> from LogManagement import show_last_log
>>> show_last_log()
INFO:root:
Configuraci¢n IP de Windows

Adaptador de LAN inal mbrica Wi-Fi:

   Sufijo DNS espec¡fico para la conexi¢n. . : home
   Direcci¢n IPv6 . . . . . . . . . . : 444:444:444:4444:4444:4444:4444:4444
   Direcci¢n IPv6 . . . . . . . . . . : 333:333:333::3
   Direcci¢n IPv6 . . . . . . . . . . : 333:333:333::3
   V¡nculo: direcci¢n IPv6 local. . . : 222::222:222:222:222%2
   Direcci¢n IPv4. . . . . . . . . . . . . . : 192.168.1.2
   M scara de subred . . . . . . . . . . . . : 111.111.111.111
   Puerta de enlace predeterminada . . . . . : 1111:1111:d1::a11f:c11a
                                       

>>>>>> ip_adress = os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='Direcci¢n IPv4.+: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})')
>>> print(ip_adress)
['192.168.1.2']
"""

Warning (bug not fixed): The LogManagemet package exports the terminal log in an unencrypted last_log.txt file, so it is exposed to plaintext in cases of forensic data recovery.

Useful content:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

OSLogManagement-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file OSLogManagement-0.0.1.tar.gz.

File metadata

  • Download URL: OSLogManagement-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for OSLogManagement-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1782292f0147699fffc03188f2cb60db73fd866275a3b87d02424729f9f8f8d0
MD5 4c937e27902da03a30815b67edbeb33c
BLAKE2b-256 96be3a5dbfa9b6e7036ea6c5f63818787ef914ca478669d4d7859a0b43efd60b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page