如何使用Instagram-Py测试你的Instagram账号安全
2023-5-4 19:6:46 Author: FreeBuf(查看原文) 阅读量:15 收藏

 关于Instagram-Py 

Instagram-Py是一款针对Instagram账号安全的Python脚本,在该工具的帮助下,广大研究人员可以轻松对目标Instagram账号执行基于爆破的密码安全与账号安全测试。

该脚本可以绕过Instagram部署的错误密码登录限制,因此基本上可以测试无限数量的密码。

该脚本可以模仿官方Instagram Android端应用程序的合法活动,并通过Tor发送请求,这样就提升了测试的安全性。

经过测试,Instagram-Py能够针对单个Instagram账号测试超过六百万个密码,并且资源消耗量非常小。

 工具依赖 

Python 3

Tor

requests包

requests[socks]

stem

 工具安装 

由于该工具基于Python 3开发,因此我们首先需要在本地设备上安装并配置好Python 3.6+环境。接下来,我们可以通过下列两种方法来安装Instagram-Py。

使用pip安装

注意:请先确保安装好了最新版本的pip(>=9.0,Python >= 3.6):

$ sudo easy_install3 -U pip
$ sudo pip3 install requests --upgrade
$ sudo pip3 install requests[socks]
$ sudo pip3 install stem
$ sudo pip3 install instagram-py
$ instagram-py # installed successfully
$ wget -O ~/instapy-config.json "https://git.io/v5DGy"

(向右滑动,查看更多)

源码获取

除此之外,广大研究人员还可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/getsecnow/instagram-py.git

(向右滑动,查看更多)

 工具配置 

打开工具的配置文件,路径地址为“~/instapy-config.json”:

$ vim ~/instapy-config.json

配置文件内容大致如下所示:

{
"api-url" : "https://i.instagram.com/api/v1/",
"user-agent" : "Instagram 10.26.0 Android (18/4.3; 320dp..... ",
"ig-sig-key" : "4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178",
"ig-sig-version" : "4",
"tor" : {
"server" : "127.0.0.1",
"port" : "9050",
"protocol" : "socks5",
"control" : {
"password" : "",
"port" : "9051"
}
  }
}

(向右滑动,查看更多)

配置参数解释

api-url:要使用的API地址;

user-agent:要使用的用户代理;

ig-sig_key:该参数可以从instagram apk文件中提取;

tor:tor服务器配置信息;

 Tor服务器配置 

打开tor配置文件,路径地址为“/etc/tor/torrc”:

$ sudo vim /etc/tor/torrc

搜索指定的配置字段,并完成端口配置即可。

 工具使用 

配置完成后,我们就可以开始使用Instagram-Py了:

$ instagram-py your_account_username path_to_password_list

(向右滑动,查看更多)

 项目地址 

Instagram-Py:https://github.com/getsecnow/instagram-py

精彩推荐


文章来源: http://mp.weixin.qq.com/s?__biz=MjM5NjA0NjgyMA==&mid=2651223709&idx=4&sn=2e591970d12dbd2fc5648b82e3280045&chksm=bd1de4168a6a6d00511fc66d8f7f18810de27baca552fc7fb59a571f25947c8af9a16f7b9845#rd
如有侵权请联系:admin#unsafe.sh