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

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

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

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

工具目录

分类

查看所有分类
Loading categories
LinkedInDumper — 用于从LinkedIn API转储/抓取/提取公司员工的Python 3脚本。 | Kitploit
工具/GitHubGitHub/l4rm4nd/linkedindumper
OSINT (开源情报)侦察信息收集电子邮件收集网络爬虫
GitHubl4rm4nd/linkedindumper

LinkedInDumper

用于从LinkedIn API转储/抓取/提取公司员工的Python 3脚本。

查看仓库
606611219天前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

LinkedInDumper

Python 3 脚本,用于从 LinkedIn API 转储公司员工信息





Buy Me A Coffee

💬 描述

LinkedInDumper 是一个 Python 3 脚本,用于从 LinkedIn 社交网络平台转储员工数据。

结果包含名字、姓氏、职位(头衔)、地点以及用户的个人资料链接。如果公司员工不超过 10 人,则只需 2 次 API 调用即可检索所有员工。否则,我们需要对 API 结果进行分页处理。通过 --email-format CLI 标志,可以定义一个 Python 字符串格式,根据检索到的名和姓自动生成电子邮件地址。

✨ 要求

LinkedInDumper 与非官方的 LinkedIn Voyager API 通信,这需要身份验证。因此,你必须拥有一个有效的 LinkedIn 用户账户。为简化操作,LinkedInDumper 只需你提供 cookie 值。通过这种方式,即使是受 2FA 保护的账户也能支持。此外,你需要提供一个 LinkedIn 公司 URL 来转储其员工信息。

获取 LinkedIn Cookie

  1. 登录 www.linkedin.com,并通过开发者工具等方式获取你的 li_at 会话 cookie 值
  2. 将 cookie 值持久化地写入 Python 脚本的变量 li_at 中,或在运行时通过 CLI 标志 --cookie 临时指定

获取 LinkedIn 公司 URL

  1. 在 Google 搜索或直接在 LinkedIn 上搜索目标公司
  2. LinkedIn 公司 URL 应类似这样:https://www.linkedin.com/company/apple

🎓 用法

root@kitploit:~
usage: linkedindumper.py [-h] --url <linkedin-url> [--cookie <cookie>] [--quiet] [--include-private-profiles] [--include-contact-infos] [--jitter] [--email-format <mail-format>] [--output-json <json-file>] [--output-csv <csv-file>]

options:
  -h, --help            显示此帮助信息并退出
  --url <linkedin-url>  LinkedIn 公司 URL - https://www.linkedin.com/company/<company>
  --cookie <cookie>     LinkedIn 的 'li_at' 会话 cookie
  --include-private-profiles
                        同时显示私密账户
  --include-contact-infos
                        逐个查询每位员工并检索联系信息
  --jitter              为 HTTP 请求添加随机抖动以绕过速率限制
  --email-format <mail-format>
                        用于电子邮件的 Python 字符串格式;例如:
                        --email-format '{0}.{1}@example.com' --> [email protected]
                        --email-format '{0[0]}.{1}@example.com' --> [email protected]
                        --email-format '{1}@example.com' --> [email protected]
                        --email-format '{0}@example.com' --> [email protected]
                        --email-format '{0[0]}{1[0]}@example.com' --> [email protected]
  --output-json <json-file>
                        将结果存储到 JSON 输出文件
  --output-csv <csv-file>
                        将结果存储到 CSV 输出文件

🐳 示例 1 - Docker 运行

root@kitploit:~
docker run --rm l4rm4nd/linkedindumper:latest --url 'https://www.linkedin.com/company/apple' --cookie '<cookie>' --email-format '{0}.{1}@apple.de'

🐍 示例 2 - 原生 Python

root@kitploit:~
# 安装依赖
pip install -r requirements.txt

python3 linkedindumper.py --url 'https://www.linkedin.com/company/apple' --cookie '<cookie>' --email-format '{0}.{1}@apple.de'

💎 输出

脚本将以分号分隔的值(类似 CSV)形式返回员工数据:

root@kitploit:~
 ██▓     ██▓ ███▄    █  ██ ▄█▀▓█████ ▓█████▄  ██▓ ███▄    █ ▓█████▄  █    ██  ███▄ ▄███▓ ██▓███  ▓█████  ██▀███  
▓██▒    ▓██▒ ██ ▀█   █  ██▄█▒ ▓█   ▀ ▒██▀ ██▌▓██▒ ██ ▀█   █ ▒██▀ ██▌ ██  ▓██▒▓██▒▀█▀ ██▒▓██░  ██▒▓█   ▀ ▓██ ▒ ██▒
▒██░    ▒██▒▓██  ▀█ ██▒▓███▄░ ▒███   ░██   █▌▒██▒▓██  ▀█ ██▒░██   █▌▓██  ▒██░▓██    ▓██░▓██░ ██▓▒▒███   ▓██ ░▄█ ▒
▒██░    ░██░▓██▒  ▐▌██▒▓██ █▄ ▒▓█  ▄ ░▓█▄   ▌░██░▓██▒  ▐▌██▒░▓█▄   ▌▓▓█  ░██░▒██    ▒██ ▒██▄█▓▒ ▒▒▓█  ▄ ▒██▀▀█▄  
░██████▒░██░▒██░   ▓██░▒██▒ █▄░▒████▒░▒████▓ ░██░▒██░   ▓██░░▒████▓ ▒▒█████▓ ▒██▒   ░██▒▒██▒ ░  ░░▒████▒░██▓ ▒██▒
░ ▒░▓  ░░▓  ░ ▒░   ▒ ▒ ▒ ▒▒ ▓▒░░ ▒░ ░ ▒▒▓  ▒ ░▓  ░ ▒░   ▒ ▒  ▒▒▓  ▒ ░▒▓▒ ▒ ▒ ░ ▒░   ░  ░▒▓▒░ ░  ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ░ ▒  ░ ▒ ░░ ░░   ░ ▒░░ ░▒ ▒░ ░ ░  ░ ░ ▒  ▒  ▒ ░░ ░░   ░ ▒░ ░ ▒  ▒ ░░▒░ ░ ░ ░  ░      ░░▒ ░      ░ ░  ░  ░▒ ░ ▒░
  ░ ░    ▒ ░   ░   ░ ░ ░ ░░ ░    ░    ░ ░  ░  ▒ ░   ░   ░ ░  ░ ░  ░  ░░░ ░ ░ ░      ░   ░░          ░     ░░   ░ 
    ░  ░ ░           ░ ░  ░      ░  ░   ░     ░           ░    ░       ░            ░               ░  ░   ░     
                                      ░                      ░                                         ░ by LRVT      

[i] 公司名称: apple
[i] 公司 X-ID: 162479
[i] LN 员工数: 找到 1000 名员工
[i] 转储日期: 17/10/2022 13:55:06
[i] 电子邮件格式: {0}.{1}@apple.de

姓氏;名字;电子邮件;职位;性别;地点;个人资料
Katrin;Honauer;[email protected];Software Engineer at Apple;N/A;Heidelberg;https://www.linkedin.com/in/katrin-honauer
Raymond;Chen;[email protected];Recruiting at Apple;N/A;Austin, Texas Metropolitan Area;https://www.linkedin.com/in/raytherecruiter

[i] 成功抓取到 2 名独特的 apple 员工。太好了 ^_-

可选地,你可以使用 CLI 参数 --output-json 和 --output-csv 将结果存储为 JSON 或 CSV 格式。

💥 限制

在收集联系信息时,LinkedIn 只允许返回前 1,000 条搜索结果。如果你的免费 LinkedIn 账户已达到访问个人资料的次数上限,你可能需要一个 LinkedIn 高级账户。

此外,并非所有员工资料都是公开的。结果取决于你所使用的 LinkedIn 账户以及你是否与要爬取的公司某些员工建立了好友关系。因此,有时无法检索到某些员工账户的名字、姓氏和个人资料链接。脚本将不会显示此类资料,因为它们包含默认值,例如名字为 "LinkedIn",姓氏为 "Member"。如果你想包含这些私密资料,请使用 CLI 标志 --include-private-profiles。尽管某些账户可能是私密的,但我们仍然可以获取这些账户的职位(头衔)和地点。对于私密的 LinkedIn 账户,只有名字、姓氏和个人资料链接被隐藏。

最后,LinkedIn 用户可以自由命名其个人资料。因此,账户名称可能包含各种内容,如称谓、缩写、表情符号、中间名等。我已尽力去除一些无意义的内容。但这并不是针对这一普遍问题的完整解决方案。请注意,我们并未使用官方 LinkedIn API。此脚本从“非官方”的 Voyager API 收集信息。

你可以使用实验性的 --include-contact-infos CLI 标志来获取用户联系信息中的其他详细信息(名字、姓氏、地址、电话、电子邮件、地址)。这将逐个查询每个枚举到的 LinkedIn 用户账户,并通过 GraphQL API 获取数据。它只返回 JSON 输出,且请求量很大。是否返回数据取决于用户的隐私设置以及你用于枚举的 LinkedIn 账户。

如果你遇到类似 maximum request exceeded 的错误消息,请尝试使用 --jitter CLI 参数,为自动 API 请求引入一些延迟。这可能会绕过 LinkedIn 实施的检测或速率限制。

🤖 仓库统计

Alt

下载工具