python的arp扫描

from optparse import *
from scapy.all import *
parser = OptionParser()
parser.add_option("-p",action="store",dest="host",default=None,help="please imput a newwork")
(options,args)=parser.parse_args()
if options.host==None:
print "host is null"
else:
host=options.host
print host

import time,treading
balance=0
def change_it(n):
global balance
balance=balance+n
balance=balance-n
def run_thread(n):
for i in range(100000):
change_it(n)
t1=treading.Thread(target=run_thread,args=(5,))
t2=treading.Thread(target=run_thread,args=(8,))
t1.start()
t2.start()
t1.join()
t2.join()
print(balance)

from scapy.all import *
import sys
def worker():
for ipfix in range(1,100):
ip="211.70.4."+str(ipfix)
arpPKT=Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst=ip,hwdst="ff:ff:ff:ff:ff:ff")
res=srp1(arpPKT,timeout=1,verbose=False)
if res:
print"IP:"+res.psrc+" MAC:"+res.hwsrc
if _name_=="_main_"
worker()

python的arp扫描的更多相关文章

  1. Python编写的ARP扫描工具

    源码如下: rom scapy.all import * import threading import argparse import logging import re logging.getLo ...

  2. 用Python构造ARP请求、扫描、欺骗

    目录 0. ARP介绍 1. Scapy简述 2. Scapy简单演示 2.1 安装 2.2 构造包演示 2.2.1 进入kamene交互界面 2.2.2 查看以太网头部 2.2.3 查看 ICMP ...

  3. 「python」: arp脚本的两种方法

    「python」: arp脚本的两种方法 第一种是使用arping工具: #!/usr/bin/env python import subprocess import sys import re de ...

  4. Python 网站后台扫描脚本

    Python  网站后台扫描脚本 #!/usr/bin/python #coding=utf-8 import sys import urllib import time url = "ht ...

  5. 利用Python进行端口扫描

    利用Python进行端口扫描 - Dahlhin - 博客园 https://www.cnblogs.com/dachenzi/p/8676104.html Python实现对一个网络段扫描及端口扫描 ...

  6. ARP扫描工具arp-scan

    ARP扫描工具arp-scan   arp-scan是Kali Linux自带的一款ARP扫描工具.该工具可以进行单一目标扫描,也可以进行批量扫描.批量扫描的时候,用户可以通过CIDR.地址范围或者列 ...

  7. 利用Python3的dpkt库进行ARP扫描

    背景 正在学习网络协议,用Python写起来方便点,可以快速熟悉协议本身,也给自己补充一些Python库. 偶然看到这篇文章,讲的是Python发ARP包,发现是Python2的,这里改了一下,用Py ...

  8. python代码安全扫描工具

    python代码安全扫描工具:Coverity. Fortify.SecMissile(漏扫,对源代码提供基于语义的搜索和分析能力,实现已知安全漏洞的快速扫描)

  9. Python 网站后台扫描

    title date layout tags Python 网站后台扫描 2018-05-08 post Python #!/usr/bin/python # This was written for ...

随机推荐

  1. PyCharm:ModuleNotFoundError: No module named 'selenium'

    Mac安装PyCharm后,将已有工程导入,之前使用Mac终端执行脚本时正常,现在报错ModuleNotFoundError: No module named 'selenium',解决方法是在PyC ...

  2. java-ArrayList中去重复字符串或重复对象、LinkedList集合、泛型、增强for、静态导入、可变参数、asList()方法、集合嵌套

    1.去除ArrayList中重复字符串元素方式 * A:案例演示 * 需求:ArrayList去除集合中字符串的重复值(字符串的内容相同) * 思路:创建新集合方式 /** * A:案例演示 * 需求 ...

  3. codeforces 804A Find Amir 思维/水题

    A few years ago Sajjad left his school and register to another one due to security reasons. Now he w ...

  4. move UVs of a texture

    Go to the material options on the left, and use a Custom UV. Create a vector parameter, use it to sc ...

  5. 加载XML文件到系统中

    using System;using System.Data;using System.IO;using System.Xml;using System.Collections.Generic; na ...

  6. Django学习笔记之模板

    模板 模板介绍 在之前的章节中,视图函数只是直接返回文本,而在实际生产环境中其实很少这样用,因为实际的页面大多是带有样式的HTML代码,这可以让浏览器渲染出非常漂亮的页面. 目前市面上有非常多的模板系 ...

  7. zabbix图形化界面乱码(二)

      中文字体乱码,解决办法:   1:从Windos下拷贝字体到服务器,C:\Windows\Fonts,有很多,看着喜欢的拷贝   2:然后在zabbix 服务端,进入到zabbix web的工作目 ...

  8. 轻量应用服务器 访问jsp页面就直接下载的问题

    本地localhost 运行可以 用自己的ip不行.出现这个问题实质原因就是Tomcat服务器就没有起到作用,运行不了jsp文件.这个是核心.去排查错误!网上查了好几天了根本没有解决我的我的问题. 1 ...

  9. 解决双击excel文件打开多个excel.exe进程的问题

    解决双击excel文件打开多个excel.exe进程的问题有些时候,双击两个excel文件,会打开多个excel进程,不同进程之间不能复制粘贴公式,只能粘贴数值,很不方便.怎么样双击多个excel文件 ...

  10. oracle数据库报错ora-01653表空间扩展失败解决方案

    1)ora-01653错误截图: 可以看到有两张表的insert受到了影响,都是在USERS表空间里.用以下SQL查看表空间使用情况: "表空间大小(M)",(a.bytes &q ...