Skip to main content

Generates IP logs compatible with Turkey 5651 law from dhcpd.leases format.

Project description

btklog

Build Status CodeFactor PyPI

ISC DHCP sunucu IP dağıtım dosyalarından T.C. 5651 nolu yasaya uyumlu IP dağıtım kaydı üreten bir Python komut satırı programı.

Örnek dhcpd.leases dosyası

# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.4-P2

server-duid "\000\001\000\001& eS\000\014)U\267\275";

lease 10.0.0.2 {
  starts 5 2020/04/10 08:27:36;
  ends 5 2020/04/10 10:57:36;
  cltt 5 2020/04/10 08:27:36;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:50:56:3e:87:44;
  uid "\001\000PV>\207D";
}
lease 10.0.0.3 {
  starts 5 2020/04/10 08:27:39;
  ends 5 2020/04/10 10:57:39;
  cltt 5 2020/04/10 08:27:39;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:0c:29:b6:53:f1;
  uid "\001\000\014)\266S\361";
}

btklog tarafından oluşturulmuş 5651 nolu yasa uyumlu kaydı

IP Adresi           Kullanıma Başlama Zamanı     Kullanım Bitiş Zamanı      MAC Adresi
10.0.0.2            10.04.2020-08:27:36          10.04.2020-10:57:36        00-50-56-3e-87-44
10.0.0.3            10.04.2020-08:27:39          10.04.2020-10:57:39        00-0c-29-b6-53-f1

Kurulum

pip ile kurulum

pip install btklog

Yardım menüsünü görüntüle

btklog --help

Ayarlar

-k, --kaynak PATH - ISC DHCP sunucu uyumlu(dhcpd.leases) IP dağıtım dosyası.

  • BTKLOG_KAYNAK ortam değişkeniyle de ayarlanabilir.
  • Belirtilmezse, varsayılan olarak '/var/dhcpd/var/db/dhcpd.leases' dosyasını açmayı dener.

-h, --hedef PATH - 5651 uyumlu IP dağıtım kaydının oluşturulacağı dizin.

  • BTKLOG_HEDEF ortam değişkeniyle de ayarlanabilir.
  • Belirtilmezse, kayıt dosyası varsayılan olarak mevcut dizine oluşturulur.

Örnekler

Mevcut dizindeki dhcpd.leases dosyasından /tmp dizinine kayıt oluştur.

btklog -k dhcpd.leases -h /tmp

Aynı örneği ortam değişkenlerini kullanarak yap. (Betikler için daha uygun)

#/bin/sh

export BTKLOG_KAYNAK=dhcpd.leases
export BTKLOG_HEDEF=/tmp

btklog

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

btklog-1.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

btklog-1.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file btklog-1.0.2.tar.gz.

File metadata

  • Download URL: btklog-1.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for btklog-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2c3873cf3cc81d482cde25f7c14a4481e12a4048cba93ade38d77f4b6390fdf3
MD5 05df8c827ecdfe385a978e8ff7167c41
BLAKE2b-256 4866816a6adfdfb6e5946a5e34cb823887af5e61b0e405a8e9099af1819ec474

See more details on using hashes here.

File details

Details for the file btklog-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: btklog-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for btklog-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 985a1d5089768ff49a3d39761dfd1d5f0a0748e4177bf76adb23a3e2de5d3d79
MD5 debed432a0f845c9dd50d4c89e626fef
BLAKE2b-256 fae95416a350d9f12e6efe0b0b1b20c1d20e83f00e6bc7a44b8d7e38cc227406

See more details on using hashes here.

Supported by

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