socialscan


Namesocialscan JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/iojw/socialscan
SummaryOpen-source intelligence tool for checking email address and username usage on online platforms
upload_time2024-01-21 06:02:23
maintainer
docs_urlNone
authorIsaac Ong
requires_python>=3.6
license
keywords email email-checker username username-checker social-media
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # socialscan
[![Build Status](https://travis-ci.com/iojw/socialscan.svg?token=4yLRbSuqAQqrjanbzeXs&branch=master)](https://travis-ci.com/iojw/socialscan)
[![Downloads](https://pepy.tech/badge/socialscan)](https://pepy.tech/project/socialscan/)
[![MPL 2.0 license](https://img.shields.io/badge/License-MPL%202.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)
[![Python 3.6+](https://img.shields.io/badge/python-3.6+-green.svg)](https://www.python.org/downloads/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

socialscan offers **accurate** and **fast** checks for email address and username usage on online platforms.  

Given an email address or username, socialscan returns whether it is available, taken or invalid on online platforms. 

Features that differentiate socialscan from similar tools (e.g. knowem.com, Namechk, and Sherlock):

1. **100% accuracy**: socialscan's query method eliminates the false positives and negatives that often occur in similar tools, ensuring that results are always accurate.

2. **Speed**: socialscan uses [asyncio](https://docs.python.org/3/library/asyncio.html) along with [aiohttp](https://aiohttp.readthedocs.io/en/stable/) to conduct all queries concurrently, providing fast searches even with bulk queries involving hundreds of usernames and email addresses. On a test computer with average specs and Internet speed, 100 queries were executed in ~4 seconds.

3. **Library / CLI**: socialscan can be executed through a CLI, or imported as a Python library to be used with existing code.

4. **Email support**: socialscan supports queries for both email addresses and usernames.

The following platforms are currently supported:   

|           | Username | Email |
|:---------:|:--------:|:--------:|
| Instagram |     ✔️    |   ✔️   |
| Twitter   |     ✔️    |   ✔️   |
|  GitHub   |     ✔️    |   ✔️   |
|   Tumblr  |     ✔️    |   ✔️   |
|  Lastfm   |     ✔️    |   ✔️   |
|  Snapchat |     ✔️    |        |
| GitLab    |     ✔️    |        |
| Reddit    |     ✔️    |        |
|  Yahoo    |     ✔️    |        |
| Pinterest |            |   ✔️  |
|  Firefox  |            |   ✔️  |

![](https://github.com/iojw/socialscan/raw/master/demo/demo.gif)
![](https://github.com/iojw/socialscan/raw/master/demo/demo100.gif)

## Background

Other similar tools check username availability by requesting the profile page of the username in question and based on information like the HTTP status code or error text on the requested page, determine whether a username is already taken. This is a naive approach that fails in the following cases:

- Reserved keywords: Most platforms have a set of keywords that they don't allow to be used in usernames  
(A simple test: try checking reserved words like 'admin' or 'home' or 'root' and see if other services mark them as available)

- Deleted/banned accounts: Deleted/banned account usernames tend to be unavailable even though the profile pages might not exist

Therefore, these tools tend to come up with false positives and negatives. This method of checking is also dependent on platforms having web-based profile pages and cannot be extended to email addresses.

socialscan aims to plug these gaps by directly querying the registration servers of the platforms instead, retrieving the appropriate CSRF tokens, headers, and cookies. 

## Installation

### pip
```
> pip install socialscan
```

### Install from source
```
> git clone https://github.com/iojw/socialscan.git  
> cd socialscan  
> pip install .
```

## Usage
```
usage: socialscan [list of usernames/email addresses to check]

optional arguments:
  -h, --help            show this help message and exit
  --platforms [platform [platform ...]], -p [platform [platform ...]]
                        list of platforms to query (default: all platforms)
  --view-by {platform,query}
                        view results sorted by platform or by query (default:
                        query)
  --available-only, -a  only print usernames/email addresses that are
                        available and not in use
  --cache-tokens, -c    cache tokens for platforms requiring more than one
                        HTTP request (Snapchat, GitHub, Instagram. Lastfm &
                        Tumblr), reducing total number of requests sent
  --input input.txt, -i input.txt
                        file containg list of queries to execute
  --proxy-list proxy_list.txt
                        file containing list of HTTP proxy servers to execute
                        queries with
  --verbose, -v         show query responses as they are received
  --show-urls           display profile URLs for usernames on supported platforms
                        (profiles may not exist if usernames are reserved or belong to deleted/banned accounts)
  --json json.txt       output results in JSON format to the specified file
  --version             show program's version number and exit
```

## As a library
socialscan can also be imported into existing code and used as a library. 

v1.0.0 introduces the async method `execute_queries` and the corresponding synchronous wrapper `sync_execute_queries` that takes a list of queries and optional list of platforms and proxies, executing all queries concurrently. The method then returns a list of results in the same order.

```python
from socialscan.util import Platforms, sync_execute_queries

queries = ["username1", "email2@gmail.com", "mail42@me.com"]
platforms = [Platforms.GITHUB, Platforms.LASTFM]
results = sync_execute_queries(queries, platforms)
for result in results:
    print(f"{result.query} on {result.platform}: {result.message} (Success: {result.success}, Valid: {result.valid}, Available: {result.available})")
```
Output:
```
username1 on GitHub: Username is already taken (Success: True, Valid: True, Available: False)
username1 on Lastfm: Sorry, this username isn't available. (Success: True, Valid: True, Available: False)
email2@gmail.com on GitHub: Available (Success: True, Valid: True, Available: True)
email2@gmail.com on Lastfm: Sorry, that email address is already registered to another account. (Success: True, Valid: True, Available: False)
mail42@me.com on GitHub: Available (Success: True, Valid: True, Available: True)
mail42@me.com on Lastfm: Looking good! (Success: True, Valid: True, Available: True)
```

## Text file input
For bulk queries with the `--input` option, place one username/email on each line in the .txt file:
```
username1
email2@mail.com
username3
```

## Donations

If you find this tool useful and would like to support its continued development, you can donate here. Thank you for your support.

[![Donate Via PayPal](https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif)](https://paypal.me/isaacong)

BTC: bc1qwrnukyc6xh9aygu5ps2geh8stmvagsj5u4v7j6  
ETH: 0x45a0F91666391078eA521A6123559E49DAb1275f

## Contributing
Errors, suggestions or want a site added? [Submit an issue](https://github.com/iojw/socialscan/issues). 

PRs are always welcome 🙂

Please ensure that the code is formatted with `black` using the config in `pyproject.toml` before submitting a PR. 

## License
MPL 2.0

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iojw/socialscan",
    "name": "socialscan",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "email email-checker username username-checker social-media",
    "author": "Isaac Ong",
    "author_email": "isaacong.jw@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c7/a8/2a322b3668249389d739e74da57e588aaf38f0236c51ef079996befd9437/socialscan-2.0.1.tar.gz",
    "platform": null,
    "description": "# socialscan\n[![Build Status](https://travis-ci.com/iojw/socialscan.svg?token=4yLRbSuqAQqrjanbzeXs&branch=master)](https://travis-ci.com/iojw/socialscan)\n[![Downloads](https://pepy.tech/badge/socialscan)](https://pepy.tech/project/socialscan/)\n[![MPL 2.0 license](https://img.shields.io/badge/License-MPL%202.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)\n[![Python 3.6+](https://img.shields.io/badge/python-3.6+-green.svg)](https://www.python.org/downloads/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nsocialscan offers **accurate** and **fast** checks for email address and username usage on online platforms.  \n\nGiven an email address or username, socialscan returns whether it is available, taken or invalid on online platforms. \n\nFeatures that differentiate socialscan from similar tools (e.g. knowem.com, Namechk, and Sherlock):\n\n1. **100% accuracy**: socialscan's query method eliminates the false positives and negatives that often occur in similar tools, ensuring that results are always accurate.\n\n2. **Speed**: socialscan uses [asyncio](https://docs.python.org/3/library/asyncio.html) along with [aiohttp](https://aiohttp.readthedocs.io/en/stable/) to conduct all queries concurrently, providing fast searches even with bulk queries involving hundreds of usernames and email addresses. On a test computer with average specs and Internet speed, 100 queries were executed in ~4 seconds.\n\n3. **Library / CLI**: socialscan can be executed through a CLI, or imported as a Python library to be used with existing code.\n\n4. **Email support**: socialscan supports queries for both email addresses and usernames.\n\nThe following platforms are currently supported:   \n\n|           | Username | Email |\n|:---------:|:--------:|:--------:|\n| Instagram |     \u2714\ufe0f    |   \u2714\ufe0f   |\n| Twitter   |     \u2714\ufe0f    |   \u2714\ufe0f   |\n|  GitHub   |     \u2714\ufe0f    |   \u2714\ufe0f   |\n|   Tumblr  |     \u2714\ufe0f    |   \u2714\ufe0f   |\n|  Lastfm   |     \u2714\ufe0f    |   \u2714\ufe0f   |\n|  Snapchat |     \u2714\ufe0f    |        |\n| GitLab    |     \u2714\ufe0f    |        |\n| Reddit    |     \u2714\ufe0f    |        |\n|  Yahoo    |     \u2714\ufe0f    |        |\n| Pinterest |            |   \u2714\ufe0f  |\n|  Firefox  |            |   \u2714\ufe0f  |\n\n![](https://github.com/iojw/socialscan/raw/master/demo/demo.gif)\n![](https://github.com/iojw/socialscan/raw/master/demo/demo100.gif)\n\n## Background\n\nOther similar tools check username availability by requesting the profile page of the username in question and based on information like the HTTP status code or error text on the requested page, determine whether a username is already taken. This is a naive approach that fails in the following cases:\n\n- Reserved keywords: Most platforms have a set of keywords that they don't allow to be used in usernames  \n(A simple test: try checking reserved words like 'admin' or 'home' or 'root' and see if other services mark them as available)\n\n- Deleted/banned accounts: Deleted/banned account usernames tend to be unavailable even though the profile pages might not exist\n\nTherefore, these tools tend to come up with false positives and negatives. This method of checking is also dependent on platforms having web-based profile pages and cannot be extended to email addresses.\n\nsocialscan aims to plug these gaps by directly querying the registration servers of the platforms instead, retrieving the appropriate CSRF tokens, headers, and cookies. \n\n## Installation\n\n### pip\n```\n> pip install socialscan\n```\n\n### Install from source\n```\n> git clone https://github.com/iojw/socialscan.git  \n> cd socialscan  \n> pip install .\n```\n\n## Usage\n```\nusage: socialscan [list of usernames/email addresses to check]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --platforms [platform [platform ...]], -p [platform [platform ...]]\n                        list of platforms to query (default: all platforms)\n  --view-by {platform,query}\n                        view results sorted by platform or by query (default:\n                        query)\n  --available-only, -a  only print usernames/email addresses that are\n                        available and not in use\n  --cache-tokens, -c    cache tokens for platforms requiring more than one\n                        HTTP request (Snapchat, GitHub, Instagram. Lastfm &\n                        Tumblr), reducing total number of requests sent\n  --input input.txt, -i input.txt\n                        file containg list of queries to execute\n  --proxy-list proxy_list.txt\n                        file containing list of HTTP proxy servers to execute\n                        queries with\n  --verbose, -v         show query responses as they are received\n  --show-urls           display profile URLs for usernames on supported platforms\n                        (profiles may not exist if usernames are reserved or belong to deleted/banned accounts)\n  --json json.txt       output results in JSON format to the specified file\n  --version             show program's version number and exit\n```\n\n## As a library\nsocialscan can also be imported into existing code and used as a library. \n\nv1.0.0 introduces the async method `execute_queries` and the corresponding synchronous wrapper `sync_execute_queries` that takes a list of queries and optional list of platforms and proxies, executing all queries concurrently. The method then returns a list of results in the same order.\n\n```python\nfrom socialscan.util import Platforms, sync_execute_queries\n\nqueries = [\"username1\", \"email2@gmail.com\", \"mail42@me.com\"]\nplatforms = [Platforms.GITHUB, Platforms.LASTFM]\nresults = sync_execute_queries(queries, platforms)\nfor result in results:\n    print(f\"{result.query} on {result.platform}: {result.message} (Success: {result.success}, Valid: {result.valid}, Available: {result.available})\")\n```\nOutput:\n```\nusername1 on GitHub: Username is already taken (Success: True, Valid: True, Available: False)\nusername1 on Lastfm: Sorry, this username isn't available. (Success: True, Valid: True, Available: False)\nemail2@gmail.com on GitHub: Available (Success: True, Valid: True, Available: True)\nemail2@gmail.com on Lastfm: Sorry, that email address is already registered to another account. (Success: True, Valid: True, Available: False)\nmail42@me.com on GitHub: Available (Success: True, Valid: True, Available: True)\nmail42@me.com on Lastfm: Looking good! (Success: True, Valid: True, Available: True)\n```\n\n## Text file input\nFor bulk queries with the `--input` option, place one username/email on each line in the .txt file:\n```\nusername1\nemail2@mail.com\nusername3\n```\n\n## Donations\n\nIf you find this tool useful and would like to support its continued development, you can donate here. Thank you for your support.\n\n[![Donate Via PayPal](https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif)](https://paypal.me/isaacong)\n\nBTC: bc1qwrnukyc6xh9aygu5ps2geh8stmvagsj5u4v7j6  \nETH: 0x45a0F91666391078eA521A6123559E49DAb1275f\n\n## Contributing\nErrors, suggestions or want a site added? [Submit an issue](https://github.com/iojw/socialscan/issues). \n\nPRs are always welcome \ud83d\ude42\n\nPlease ensure that the code is formatted with `black` using the config in `pyproject.toml` before submitting a PR. \n\n## License\nMPL 2.0\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Open-source intelligence tool for checking email address and username usage on online platforms",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://github.com/iojw/socialscan"
    },
    "split_keywords": [
        "email",
        "email-checker",
        "username",
        "username-checker",
        "social-media"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39d8b04ec0a71f19452dd1e6174434bf1ee85aef2797e6008da740e55d12edff",
                "md5": "4bbb702cd7bc335afbf5546161a62cce",
                "sha256": "be3075208c6e1dc577869ed27ca37fb1ad14d95e37641fc85d5c09f307e93be3"
            },
            "downloads": -1,
            "filename": "socialscan-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4bbb702cd7bc335afbf5546161a62cce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 21763,
            "upload_time": "2024-01-21T06:02:21",
            "upload_time_iso_8601": "2024-01-21T06:02:21.324548Z",
            "url": "https://files.pythonhosted.org/packages/39/d8/b04ec0a71f19452dd1e6174434bf1ee85aef2797e6008da740e55d12edff/socialscan-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7a82a322b3668249389d739e74da57e588aaf38f0236c51ef079996befd9437",
                "md5": "556703fd9ca13e86e7b96cb3ed71cdc7",
                "sha256": "d4b5e1c99d69fad80c81a2ecf0c48a6e66e443e4060e9038c63a0c28360f4a58"
            },
            "downloads": -1,
            "filename": "socialscan-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "556703fd9ca13e86e7b96cb3ed71cdc7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 23602,
            "upload_time": "2024-01-21T06:02:23",
            "upload_time_iso_8601": "2024-01-21T06:02:23.417747Z",
            "url": "https://files.pythonhosted.org/packages/c7/a8/2a322b3668249389d739e74da57e588aaf38f0236c51ef079996befd9437/socialscan-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-21 06:02:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iojw",
    "github_project": "socialscan",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "socialscan"
}
        
Elapsed time: 0.17361s