l4rm4nd/XingDumper

GitHub: l4rm4nd/XingDumper

XingDumper 是一个使用 Python 3 从 XING 抓取公司员工数据的工具,解决了通过非官方 API 批量获取公开联系人信息的需求。

Stars: 38 | Forks: 5

XingDumper

Python 3 script to dump company employees from XING API





Buy Me A Coffee

## 💬 描述 XingDumper 是一个用于从 XING 社交平台抓取员工数据的 Python 3 脚本。 结果包含名字、姓氏、职位、性别、位置以及用户个人资料链接。只需 2 次 API 调用即可获取所有员工信息。使用 `--email-format` 命令行标志,可以定义一个 Python 字符串格式,根据获取到的名字和姓氏自动生成电子邮件地址。 ## ✨ 要求 XingDumper 通过非官方的 XING API 进行通信,这需要身份验证。因此,你必须拥有一个有效的 XING 用户账户。为了简化操作,XingDumper 只需要你提供一个 Cookie 值。通过这种方式,即使启用了 2FA 的账户也支持。此外,你需要提供一个要抓取员工的公司 URL。 ### 获取 XING Cookie 1. 登录 www.xing.com,并通过开发者工具获取你的 ``login`` Cookie 值 2. 在 Python 脚本的变量 ``LOGIN_COOKIE`` 中指定你的 Cookie 值,或在运行时通过 CLI 参数 ``--cookie`` 临时指定 ### 获取 XING 公司 URL 1. 在 Google 搜索或直接在 XING 上搜索目标公司 2. Xing 公司 URL 应该类似于以下格式:https://www.xing.com/pages/appleretaildeutschlandgmbh ## 🎓 使用方法 ``` usage: xingdumper.py [-h] --url [--count ] [--cookie ] [--full] [--quiet] [--email-format ] [--output-json ] [--output-csv ] options: -h, --help show this help message and exit --url A XING company url - https://xing.com/pages/ --count Amount of employees to extract - max. 2999 --cookie XING 'login' cookie for authentication --full Dump additional contact details (slow) - email, phone, fax, mobile --email-format Python string format for emails; for example: --email-format '{0}.{1}@example.com' --> john.doe@example.com --email-format '{0[0]}.{1}@example.com' --> j.doe@example.com --email-format '{1}@example.com' --> doe@example.com --email-format '{0}@example.com' --> john@example.com --email-format '{0[0]}{1[0]}@example.com' --> jd@example.com --output-json Store results in json output file --output-csv Store results in csv output file ``` ### 🐳 示例 1 - Docker 运行 ``` docker run --rm l4rm4nd/xingdumper:latest --url https://www.xing.com/pages/audiag --cookie '' --email-format '{0}.{1}@apple.de' ``` ### 🐍 示例 2 - 原生 Python ``` # 安装依赖 pip install -r requirements.txt python3 xingdumper.py --url https://www.xing.com/pages/audiag --cookie '' --email-format '{0}.{1}@apple.de' ``` ## 💎 输出结果 脚本将以分号分隔的值(类似 CSV)返回员工数据: ``` ▒██ ██▒ ██▓ ███▄ █ ▄████ ▓█████▄ █ ██ ███▄ ▄███▓ ██▓███ ▓█████ ██▀███ ▒▒ █ █ ▒░▓██▒ ██ ▀█ █ ██▒ ▀█▒▒██▀ ██▌ ██ ▓██▒▓██▒▀█▀ ██▒▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒ ░░ █ ░▒██▒▓██ ▀█ ██▒▒██░▄▄▄░░██ █▌▓██ ▒██░▓██ ▓██░▓██░ ██▓▒▒███ ▓██ ░▄█ ▒ ░ █ █ ▒ ░██░▓██▒ ▐▌██▒░▓█ ██▓░▓█▄ ▌▓▓█ ░██░▒██ ▒██ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄ ▒██▒ ▒██▒░██░▒██░ ▓██░░▒▓███▀▒░▒████▓ ▒▒█████▓ ▒██▒ ░██▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒ ▒▒ ░ ░▓ ░░▓ ░ ▒░ ▒ ▒ ░▒ ▒ ▒▒▓ ▒ ░▒▓▒ ▒ ▒ ░ ▒░ ░ ░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░ ░░ ░▒ ░ ▒ ░░ ░░ ░ ▒░ ░ ░ ░ ▒ ▒ ░░▒░ ░ ░ ░ ░ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ by LRVT [i] Company Name: Apple [i] Company X-ID: 271572.8873b4 [i] Company Slug: appleretaildeutschlandgmbh [i] Dumping Date: 24/12/2021 13:37:00 [i] Email Format: {0}.{1}@apple.de Firstname;Lastname;Email;Position;Gender;Location;E-Mail;Fax;Mobile;Phone;Profile Mina;Abdallah;mina.abdallah@apple.de;RFIC Design Engineer;MALE;Unterhaching,Deutschland;None;None;None;None;https://www.xing.com/profile/Mina_Abdallah Isma;Abdan;isma.abdan@apple.de;Gabelstaplerfahrer;MALE;Huelva,Spanien;None;None;None;None;https://www.xing.com/profile/Isma_Abdan [i] Successfully crawled 2 Apple employees. Hurray ^_- ``` 可选地,你可以使用 CLI 参数 `--output-json` 和 `--output-csv` 将结果存储为 JSON 或 CSV 格式。 ## 💥 限制 通过 `--full` 获取的联系人详细信息通常为空。德国人似乎对隐私非常重视。 此外,这些详细信息可能只有在目标员工已将你加入其联系人列表时才可访问。虽然这种情况不太可能,但 XING 的默认隐私设置允许数据被检索,前提是数据已配置且未被目标员工更改隐私设置。 ## 🤖 仓库统计 ![Alt](https://repobeats.axiom.co/api/embed/cb3bbff6ff44db8f1aa645d442c4889c9c697073.svg "Repobeats 分析图像")
标签:API, BeEF, DNS解析, Docker, Dump, ESC4, LinkedIn, OSINT, Python, URL抓取, XING, 人才情报, 企业信息, 员工数据, 安全防御评估, 开源项目, 招聘, 数据抓取, 无后门, 爬虫, 社交网络, 网络调试, 职业社交, 脚本, 自动化, 请求拦截, 领英