$vi cmd __EOF__
#!/bin/bash
while IFS= read -r ip; do
if [[ -n "$ip" ]]; then
# whois コマンドで CustName を取得
cust_name=$(whois "$ip" | grep -i 'CustName' | awk -F: '{print $2}' | xargs)
# CustName が見つからない場合、OrgName を試す
if [[ -z "$cust_name" ]]; then
cust_name=$(whois "$ip" | grep -i 'OrgName' | awk -F: '{print $2}' | xargs)
fi
# CustName が見つからない場合、descr を試す
if [[ -z "$cust_name" ]]; then
cust_name=$(whois "$ip" | grep -i 'descr' | head -n 1 | awk -F: '{print $2}' | xargs)
fi
echo "$ip, $cust_name"
fi
done
__EOF__
chmod a+x cmd
cat /var/log/httpd/access_log* |grep "GET /office/cti"|cut -d" " -f 1|sort|uniq||.cmd
2025年1月20日月曜日
IPアドレスからプロバイダ検索
登録:
コメントの投稿 (Atom)
Rocky linux9.7 に最新版のgimpをインストール
標準版のgimp を削除して、最新版のgimpをインストールする。 sudo dnf install flatpak sudo flatpak remote-delete --force flathub sudo flatpak remote-add --if-not-exis...
-
■Rocky Linux8 ORACLE RPM インストール # curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/ap...
-
Permission denied: [client 127.0.0.1:33562] mod_wsgi (pid=5683): Unable to connect to WSGI daemon process 'analyze' on '/etc/htt...
-
【タイムゾーンと日本語】 $ sudo timedatectl set-timezone Asia/Tokyo $ sudo timedatectl $ sudo localectl set-locale LANG=ja_JP.utf8 $ sudo localectl 【プロキ...
0 件のコメント:
コメントを投稿