顯示具有 ip 標籤的文章。 顯示所有文章
顯示具有 ip 標籤的文章。 顯示所有文章

2026/06/01

如何找到某公司宣告的所有ip區段

直接使用網頁搜尋公司名稱

https://bgp.tools/


如果要用指令撈取

要找到 AS 號碼

使用whois 

whois -h whois.radb.net -- '-i origin AS62041' | grep '^route:' | awk '{print $2}' | sort -u

2018/10/26

https://www.nedi.ch/

這個工具看起來不錯
不過操作有點小複雜
官網上的 https://www.nedi.ch/pub/nebuntu.sh 安裝程序沒用
不要浪費時間
建議直接捉ova回來用
測了一下
真的可以捉到很多資訊
不過有一點
她竟然不是用ip當做唯一值

NeDi requires unique device names, since this is the primary key in the database

目前一堆設備都是用相同的名字
如果為了跑這個 還要全部去改
算了

不過nedi真的是好東西
有需求的可以玩玩

2016/11/21

因為有個單位是使用自行申請的ADSL
近來每天都打電話來說網路被鎖
在想說要不要寫個程式在user開机時把ip傳來同時在黑名單把ip刪掉
先找了一些資料

找出目前使用的ip

curl icanhazip.com

curl ipv4.icanhazip.com

wget -qO- icanhazip.com


在批次檔中使用ftp傳檔

ftp -s:upload.txt

upload.txt內容
open ftp.server.com
user@server.com
userpwd
prompt
cd ftp_upload
mput test.txt
bye


使用python拿到ip並寄出

import urllib2,smtplib,sys
response = urllib2.urlopen('http://icanhazip.com/')
html = response.read()
print html

sender = "test_from_hinet@hinet.net"
receipt = "abc@de.com"
smtp = smtplib.SMTP("168.95.4.10")
header = "Subject: ip \r\n\r\n"
msg = html
smtp.sendmail(sender, receipt, header+msg)
smtp.quit()


http://neochung.com/2015/01/pc/batch-file/windows%E4%B8%AD%E4%BD%BF%E7%94%A8%E6%89%B9%E6%AC%A1%E6%AA%94-bat-%E4%B8%8A%E5%82%B3ftp%E6%AA%94%E6%A1%88/

http://askubuntu.com/questions/95910/command-for-determining-my-public-ip

2015/10/21

今天在思考一個問題
要不要把google的ip全部設成白名單
但首先要取得google的全部ip
指令如下

nslookup -q=TXT _netblocks.google.com 8.8.8.8

目前得到的資料如下

nslookup -q=TXT _netblocks.google.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
_netblocks.google.com text = "v=spf1 ip4:64.18.0.0/20 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:207.126.144.0/20 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all"

http://itindex.net/detail/50310-google-ip-%E6%96%B9%E6%B3%95