Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
instaloctrack — 一个Instagram OSINT工具,用于收集Instagram个人资料上所有带有地理标记的位置,以便在地图上绘制它们,并将其转储为JSON格式。 | Kitploit
工具/GitHubGitHub/bernsteining/instaloctrack
OSINT (开源情报)侦察信息收集社会工程学网络爬虫Archived
GitHubbernsteining/instaloctrack

instaloctrack

一个Instagram OSINT工具,用于收集Instagram个人资料上所有带有地理标记的位置,以便在地图上绘制它们,并将其转储为JSON格式。

查看仓库
320616年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

instaloctrack

TL;DR : ascineema, 项目视频

一个用于从Instagram个人资料中抓取地理标记位置的工具。输出为JSON和交互式地图。

要求

root@kitploit:~
sudo apt install chromium-chromedriver && chmod a+x /usr/bin/chromedriver

🛠️ 安装

root@kitploit:~
git clone https://github.com/bernsteining/instaloctrack
cd instaloctrack
pip3 install .

或使用Docker:

root@kitploit:~
sudo docker build -t instaloctrack -f Dockerfile .

使用方法

root@kitploit:~
instaloctrack -h
usage: instaloctrack [-h] [-t TARGET_ACCOUNT] [-l LOGIN] [-p PASSWORD] [-v]

Instagram location data gathering tool. Usage: python3 instaloctrack.py -t <target_account>

optional arguments:
  -h, --help            show this help message and exit
  -t TARGET_ACCOUNT, --target TARGET_ACCOUNT
                        Instagram profile to investigate
  -l LOGIN, --login LOGIN
                        Instagram profile to connect to, in order to access
                        the instagram posts of the target account
  -p PASSWORD, --password PASSWORD
                        Password of the Instagram profile to connect to
  -v, --visual          Spawns Chromium GUI, otherwise Chromium is headless

例如:

root@kitploit:~
instaloctrack -t <target_account>

如果目标账户是私密的,并且你有一个关注了目标账户的账号,你可以通过登录会话抓取数据:

root@kitploit:~
instaloctrack -t <target_account> -l <your_account> -p <your_password>

或使用Docker:

root@kitploit:~
sudo docker run -v /tmp/output:/tmp/output instaloctrack -t <target_account> -o /tmp/output

⚙️ 工作原理

首先,我们通过滚动整个Instagram个人资料,利用selenium的webdriver检索该账户的所有图片链接。

然后,我们异步(asyncio)处理每个图片链接,检查图片描述中是否包含位置信息,若存在则提取位置数据和时间戳。

  • 注意: 自2018年起,Instagram弃用了其位置API,无法再获取图片的GPS坐标,我们只能获取位置名称。(如果你能证明我错了,请告诉我!)

由于Instagram不提供GPS坐标,我们只能获得地点名称,因此需要进行地理编码(即从地点名称获取GPS坐标)。

为此,我使用了Nominatim的优秀API,它基于OpenStreetMap。对于我们的用途,不需要API密钥,并且我们每秒请求一次GPS坐标,以遵守Nominatim的使用政策。

最终,当获取到所有GPS坐标后,我们生成一个嵌入JavaScript的HTML文件(借助jinja2模板),利用Leaflet库在OpenStreetMap上标记所有位置。同样,这一步也无需API密钥。

此外,脚本收集的数据(位置名称、时间戳、GPS坐标、错误)会转储到一个JSON文件中,以便重复使用。

示例

以下是对法国前总统Instagram账户@fhollande的输出示例:

@fhollande 在Instagram上的位置地图

热力图:

@fhollande 在Instagram上的位置热力图

点击标记时可查看的信息:

点击标记时显示的数据

关于位置数据的统计:

位置数据统计

JSON数据转储(仅截取部分以展示某一位置的格式):

root@kitploit:~
{
    "link": "https://www.instagram.com/p/-Q_9EvR9eu",
    "place": {
      "id": "290297",
      "name": "Musée du quai Branly - Jacques Chirac",
      "slug": "musee-du-quai-branly-jacques-chirac",
      "street_address": " 37 quai Branly",
      " zip_code": " 75007",
      " city_name": " Paris",
      " region_name": " ",
      " country_code": " FR"
    },
    "timestamp": "2015-11-19",
    "gps": {
      "lat": "48.8566969",
      "lon": "2.3514616"
    }
  }

可能的改进

  • 代码更整洁:D
  • 重构地理编码函数,目前过于冗长且晦涩
  • 使用BeautifulSoup替代正则解析
  • 移除由进度条引起的奇怪空白
  • 当Nominatim失败时,使用其他地理编码工具(例如https://geo.api.gouv.fr/adresse)?(指定参数?)
    • 使用geopy?
    • 使用Overpass替代Nominatim?
  • 添加参数以仅选择部分图片(按日期或排序选择)
  • 关于脚本运行时长的时间信息
下载工具