forked from Josue87/MetaFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
114 lines (87 loc) · 2.9 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
from setuptools import setup, find_packages
from os import path
import metafinder
long_description = """
**MetaFinder - Metadata search through Search Engines**
=======================================================
Installation:
-------------
> pip3 install metafinder
Upgrades are also available using:
> pip3 install metafinder --upgrade
Usage
-----
MetaFinder can be used in 2 ways:
CLI
---
metafinder -d domain.com -l 20 -o folder [-t 10] -go -bi -ba
Parameters:
- d: Specifies the target domain.
- l: Specify the maximum number of results to be searched.
- o: Specify the path to save the report.
- t: Optional. Used to configure the threads (4 by default).
- v: Show Metafinder version.
- go: Optional. Search in Google. (Default)
- bi: Optional. Search in Bing.
- ba: Optional. Search in Baidu. (Experimental)
In Code
-------
import metafinder.extractor as metadata_extractor
documents_limit = 5
domain = "target_domain"
result = metadata_extractor.extract_metadata_from_google_search(domain, documents_limit)
# result = metadata_extractor.extract_metadata_from_bing_search(domain, documents_limit)
# result = metadata_extractor.extract_metadata_from_baidu_search(domain, documents_limit)
authors = result.get_authors()
software = result.get_software()
for k,v in result.get_metadata().items():
print(f"{k}:")
print(f"|_ URL: {v['url']}")
for metadata,value in v['metadata'].items():
print(f"|__ {metadata}: {value}")
document_name = "test.pdf"
try:
metadata_file = metadata_extractor.extract_metadata_from_document(document_name)
for k,v in metadata_file.items():
print(f"{k}: {v}")
except FileNotFoundError:
print("File not found")
Author
======
This project has been developed by:
- **Josué Encinar García** -- https://twitter.com/JosueEncinar
Contributors
============
- **Félix Brezo Fernández** -- https://twitter.com/febrezo
Disclaimer!
===========
The software is designed to leave no trace in the documents we upload to a domain. The author is not responsible for any
illegitimate use.
"""
setup(
name='metafinder',
version=metafinder.__version__,
author='Josue Encinar (@JosueEncinar)',
description='MetaFinder - Metadata search through Search Engines',
include_package_data=True,
license='GNU GPLv3+',
packages=find_packages(),
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/Josue87/MetaFinder",
entry_points={
'console_scripts': [
'metafinder=metafinder.cli:main',
],
},
install_requires=[
"requests>=2.25.1",
"pikepdf>=2.5.2",
"beautifulsoup4>=4.9.3",
"openpyxl>=3.0.5",
"python-docx>=0.8.6",
"python-pptx>=0.6.18",
"prompt-toolkit>=3.0.5",
"urllib3>=1.26.4"
]
)