プライベートIPaddress 検索

こんにちは、tangoです。
自宅NW以外で、ラズベリーパイに構築したNASやファイルサーバを利用したい時に、割り振られたプライベートIPアドレスを検索したいと思い、作成しました。


機器情報とソースコード

◇機器

・ノートPC(Windows10 & Python3.11.5を導入済み)
・ファイルサーバ(Raspberry Pi 3 model B)

◇ソースコード(Python)

Github:https://github.com/tango3304/privateip_scraping
※2023/09/26 改修
 
クラスA~Cの正規表現を追加

◇プログラミング実行ソースコード(batファイル)

※OSがWindowsの為、batファイルを用いてプログラムを実行

@echo off

rem {Character Code:UTF-8}
chcp 65001

rem {Variables}
set CurrentDirectory=%~dp0
set Module=localip_scraping\ipaddress_scraping_0.0.py
set AbsolutePath=%CurrentDirectory%%Module%

rem {Execute Private IPaddress Scraping program}
py %AbsolutePath%
cmd /k

検証

◇スクレイピングする場合

スクレイピングを実行した結果

◇スクレイピングしない場合

スクレイピングを実行しない結果