首页 \ 问答 \ linux如何通过链接发送我的mac地址?(How does linux pull my mac address to send over the link?)

linux如何通过链接发送我的mac地址?(How does linux pull my mac address to send over the link?)

我想构建一个MAC地址欺骗器,每次我的计算机启动时都会吐出一个随机化的mac地址。 我的问题是我的所有计算机程序如何以及从何处提取我的MAC地址。 我知道我的wi-fi网络驱动程序负责告诉我的网卡要发送什么,但是该驱动程序从哪里获取我的MAC地址? 我也知道MAC地址被称为硬件地址,但是因为它可以欺骗MAC地址,所以它只能意味着在发送信息时不必使用我的网卡上的MAC地址。 我想知道如何做到这一点。

此外,当随机化我的MAC地址时,这应该适用于所有其他程序,例如我的网络浏览器和我使用的任何其他程序,这应该不是问题,因为那真的是一个应用程序层...而不是链接层

谢谢


I want to build a MAC address spoofer that spits out a randomize mac address everytime my computer boots up. My question is how and from where do all my computer programs in linux pull up my MAC address. I know that my wi-fi network driver is responsible for telling my network card what to send, but from where does that driver get my MAC address? I also know that a MAC address is called a hardware address, however since it is possible to spoof MAC addresses, then it must only mean that the MAC address on my network card doesn't have to be used when sending information. I would like to know how this can be done as well.

Also when randomizing my MAC address this ought to work with all other programs such as my web-browser and whatever else that I use, which shouldn't be a problem since thats really an application layer ... not link layer

Thanks


原文:https://stackoverflow.com/questions/10823432
更新时间:2022-04-04 18:04

最满意答案

除了更改当前行之外,如您所注意到的那样, \r将无效。 解决方案是将终端设置为不同的模式,以便进行更多控制。 然而,手工操作很痛苦。 幸运的是,有些库可以让它变得简单。 一个非常着名的是ncurses

对Go来说, GoCUI看起来很棒。 它应该通过一个漂亮的界面为您提供所需的所有功能。


To do anything more than changing the current line, as you noticed, \r won't work. The solution is to set your terminal in a different mode which allow more control. However, this is painful to do by hand. Luckily, there are libraries out there that makes it easy. A very famous one is ncurses.

For Go, GoCUI looks great. It should give you all the power you need with a nice interface.

相关问答

更多
  • 除了更改当前行之外,如您所注意到的那样, \r将无效。 解决方案是将终端设置为不同的模式,以便进行更多控制。 然而,手工操作很痛苦。 幸运的是,有些库可以让它变得简单。 一个非常着名的是ncurses 。 对Go来说, GoCUI看起来很棒。 它应该通过一个漂亮的界面为您提供所需的所有功能。 To do anything more than changing the current line, as you noticed, \r won't work. The solution is to set you ...
  • 使用数据文件Data.csv : 0 0.00000 1 1.00000 2 1.41421 3 1.73205 4 2.00000 5 2.23607 你可以做一个线性拟合: f(x) = a*x + b fit f(x) 'Data.csv' u 1:2 via a, b 你可以使用我认为叫做gnuplot中的一个宏来设置标识函数f(x)的图例中的标题 title_f(a,b) = sprintf('f(x) = %.2fx + %.2f', a, b) 现在为了用回归函 ...
  • 您可以打印消息,这将自动添加换行符: print("Choose an action") choice = int(input()) - 1 或者在输入消息的末尾手动包含换行符( \n ): choice = int(input("Choose an action\n")) - 1 You can either print the message, which will automatically add a newline: print("Choose an action") choice = int ...
  • 在第一次print使用end="" , end默认值是一个new line但您可以通过传递自己的值来更改它: print("Downloading...",end="") #your code here print("Done!") 输出 : Downloading...Done! 帮助print : In [3]: print? Type: builtin_function_or_method String Form: Namespace: ...
  • 在Core Graphics中,逻辑图形元素被添加到上下文中然后绘制。 我看到你添加一个上下文的路径,例如CGContextAddLineToPoint(context, 310.0, 20.0); 这会在内存中创建路径,但要将其合成到屏幕,您需要填充或描述上下文的路径。 尝试添加CGContextStrokePath(context); 之后才真正开出路径。 So, for now i've applied an alternate solution. I would still love to know ...
  • 因为你的行以'\ n'字符结尾并且print添加了另一个'\ n'。 有多种方法可以解决这个问题。 我喜欢使用Python 3 print功能。 from __future__ import print_function f = open('test.txt', 'r') print("oldCourses are:") for rCourse in f: print(rCourse, end='') Because your lines end with the '\n' character ...
  • Telnet.read_very_eager的文档对于 Telnet.read_very_eager不是很清楚,但是它提到它为其他方法读取和写入bytes 。 type(s)可能是bytes 。 使用bytes.decode获取字符串: print(s.decode('ascii')) (使用适当的编码) 注意:这适用于Python 3。 The documentation for telnetlib isn't very clear about Telnet.read_very_eager, but it ...
  • 窗口函数通常会从第一个两个坐标像素创建一个窗口,即在您的示例中(5,0)到下一个2坐标指向的像素。 所以你的程序应该工作 尝试一下,否则使用gotoxy() window function will generally create a window from the 1st two coordinates pixel i.e, in your example (5,0) to the pixel pointed by next 2 coordinates. so your program should w ...
  • Jonathan建议在每行末尾使用CR。 你可以通过传递一个额外的参数来print : candies = 0 while True: print('You have', candies, 'candies!', end='\r') time.sleep(1) candies += 1 通常, print使用NL( \n )字符,这意味着“跳到下一行”。 但是在这里,我们告诉它使用CR( \r )代替,这意味着“回到当前行的开头”。 这就是我们想要的。 不幸的是,这种技术仅适用于命 ...
  • 我添加了这行代码,使其打印出来。 我见过人们通常使用1000次迭代: clf=svm.SVC(kernel='linear',max_iter=100) I added this line of code which makes it print something. I have seen people using 1000 iterations normally: clf=svm.SVC(kernel='linear',max_iter=100)

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)