简体   繁体   English

在Linux中使用Macchanger时如何选择供应商

[英]How to select vendor when using macchanger in linux

Currently, I am using this command to spoof my MAC address: 目前,我正在使用此命令来欺骗我的MAC地址:

macchanger eth0 -A macchanger eth0 -A

However, I want to be able to select which vendor I use. 但是,我希望能够选择我使用的供应商。 I know that the switch -l displays a list of all available vendors, but say I want to use one from Cisco, what command do I use to actually use that specific vendor rather than the system choosing a random vendor for me each time? 我知道开关-l显示所有可用供应商的列表,但是说我想使用思科提供的一个,我使用什么命令实际使用该特定供应商,而不是系统每次为我选择一个随机供应商?

You could add a function like this to .bashrc Then you can: macspoof Apple eth0 您可以在.bashrc中添加这样的功能,然后可以:macspoof Apple eth0

macspoof () {
  Vendor=$(macchanger -l | grep $1 | shuf -n 1 | awk '{print $3}')
  Tail=$(echo $RANDOM | md5sum | sed 's/.\{2\}/&:/g' | cut -c 1-8)
  Mac="$Vendor:$Tail"
  sudo macchanger -m $Mac $2
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM