https://github.com/fofapro/fofa-py
fofa pro的sdk,python语言版本
https://github.com/fofapro/fofa-py
Last synced: over 1 year ago
JSON representation
fofa pro的sdk,python语言版本
- Host: GitHub
- URL: https://github.com/fofapro/fofa-py
- Owner: fofapro
- License: mit
- Created: 2016-11-09T10:57:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T10:52:37.000Z (over 2 years ago)
- Last Synced: 2025-03-30T07:08:03.770Z (over 1 year ago)
- Language: Python
- Size: 142 KB
- Stars: 160
- Watchers: 7
- Forks: 29
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FOFA Python SDK Documentation
An easy-to-use wrapper for FOFA API written in python. Currently support `Python 3.7+`
FOFA is a search engine for Internet-connected devices. `FOFA API` helps developers integrate FOFA data easily in their own projects.
## Documentaion
- Documentation
- 中文文档
- [Api Documentation](https://fofapro.github.io/fofa-py/index.html)
## Usage
``` python
# -*- coding: utf-8 -*-
import fofa
if __name__ == "__main__":
key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
client = fofa.Client(key)
query_str = 'header="thinkphp" || header="think_template"'
data = client.search(query_str, size=100, page=1, fields="ip,city")
for ip, city in data["results"]:
print("%s,%s" % (ip, city))
```
## License
This software is licensed under MIT License
Copyright (C) 2023 Fofa, Inc.