折腾校园网记录 - yunfanfan/Notes GitHub Wiki
折腾校园网记录
查询校园网登录记录http://i.cqu.edu.cn/new/indexShell.html
想要弄清楚执行drcom.py脚本时,登录ip是执行脚本的机器设置的ip还是脚本内部ip
不是脚本内设置的ip,而是机器ip
问:23日早晨在Mac上面执行脚本结果登录ip显示是172.22.112.184,不是17楼局域网ip,为什么?
答:登录mac显示2E6E5C5DA930,应该是我的iphone手机,应该是连接学校wifi的时候自动登录。
路由器上设置的ip是172.20.53.160,MAC地址A8206610AD0F
准备在Mac上面网络开发
准备brew
Mac OSX下常用的网络诊断命令如arping, arp-scan,需要借助HomeBrew安装。
但是我的brew命令update非常慢,约等于无法update。我首先想到的就是源的问题,然后就去百度发现自己以前有收藏一篇brew update 长时间没反应解决办法或长时间卡在Updating Homebrew..._小猪佩奇工作室-CSDN博客_brew update没反应,用brew config
看了一下自己的镜像以前都改过了。
索性就一直等着它update,过了一会报错fatal: unable to access
,根据如何在mac中安装HomeBrew - 知乎,需要修改host文件(/etc/hosts),顺便发现了我居然无法ping通github.com,根据无法ping通github但是能能上网 - 知乎,需要去别的ip网站查一下ip,然后写到hosts文件里面。修改完之后再执行
sudo killall -HUP mDNSResponder
然后再执行ping github.com
发现可以成功了,接着继续brew update
,虽然还是有点慢,不过可以成功了。
安装arp-scan
brew install arp-scan
出现了报错:
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
These commands may take a few minutes to run due to the large size of the repositories.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
依次执行这两条命令就可以解决:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
现在已经可以顺利安装arp-scan了
172.20.53.178 04:42:1a:29:35:1e
ethernets:
enp4s0:
dhcp4: no
addresses:
- 172.20.53.178/24
gateway4: 172.20.53.1
nameservers:
addresses: [114.114.114.114]