airodump

编程入门 行业动态 更新时间:2024-10-15 18:26:37
本文介绍了airodump-ng输出与python子进程.Popen coummunicate方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试从 airodump-ng mon0

因此,我试图在使用Popenmunicate一段时间后读取 airodump-ng mon0 的输出,但仍然无法获取任何内容.

For that reason I was trying to read the output of airodump-ng mon0 after certain time with Popenmunicate but still cannot get anything.

import subprocess airodump = subprocess.Popen(['airodump-ng', 'mon0'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) try: o_airodump, unused_stderr = airodumpmunicate(timeout=15) except subprocess.TimeoutExpired as e: airodump.kill() o_airodump, unused_stderr = airodumpmunicate() print(o_airodump) print(unused_stderr)

当我运行它时,它卡在:

When I run this it gets stuck at:

o_airodump, unused_stderr = airodumpmunicate()

我现在完全被困住了.并且无法找到任何其他方式.请帮忙.

I am totally stuck now. And unable to find any other ways. Please help.

推荐答案

60秒后,我使用以下代码检索了可用的wifi网络列表:

I used the following code to retreive the list of avaible wifi networks after 60 seconds:

def find_wifi(interface): table = '' stdout = [] timeout = 60 table_start = repile('\sCH') start_time = time.time() airodump = subprocess.Popen(['airodump-ng', interface], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, bufsize=1) while time.time() < start_time + timeout: line = airodump.stdout.readline() if table_start.match(line): table = ''.join(stdout) stdout = [] stdout.append(line) airodump.terminate() print(table)

更多推荐

airodump

本文发布于:2023-08-05 02:06:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1301656.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:airodump

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!