Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

全球国家指定IP范围的工具

 Share


Recommended Posts

搜索东西的时候,发现了一个可以获取全球国家指定IP范围的工具。感觉不错顺手就爬了然后发现可以利用这范围的IP干一些huai事(滑稽)

format,webp

正文


思路如下:

1.先抓取指定全球国家代号(图1)
2.随便点个国家可以看到全部IP范围,很直男(图2)
3.获取IP开始范围和结束范围,使用正则匹配IP的4个位置,然后生成IP范围列表(图3)
4.然后就是指定端口扫描
5.上网找个站爬了用来IP反查域名
6.调用shodan API来搜索IP
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

图1

AVGXb4.png
AVGXb4.png

图2

AVJkrD.png
AVJkrD.png

图3

AVJaR0.md.png
AVJaR0.md.png

生成IP范围的代码:

import re

start='1.1.1.1'
stop='255.255.255.255'
zz=re.findall('[0-255]{1,}',start)
zz_s=re.findall('[0-255]{1,}',stop)
for q in range(int(zz[0]),int(zz_s[0]),1):
    for b in range(int(zz[1]),int(zz_s[1]),1):
        for c in range(int(zz[2]),int(zz_s[2]),1):
            for r in range(int(zz[3]),int(zz_s[3]),1):
                ip='{}.{}.{}.{}'.format(q,b,c,r,)
                print(ip)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
AVJ5LD.png

测试结果:

AALA4e.md.gif

如果gif动不了的话就看:ipscan - 路过图床

仓库地址:GitHub - 422926799/Ipscan

Link to post
Link to comment
Share on other sites

 Share

discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...