spry 0.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spry/__init__.py +0 -0
- spry/__main__.py +8 -0
- spry/modules/__init__.py +0 -0
- spry/modules/core.py +24 -0
- spry/modules/pdf_maker.py +23 -0
- spry/modules/spinner.py +19 -0
- spry/modules/stuff.py +8 -0
- spry/modules/useragents.py +8573 -0
- spry/spry.py +206 -0
- spry-0.5.5.dist-info/LICENSE +674 -0
- spry-0.5.5.dist-info/METADATA +92 -0
- spry-0.5.5.dist-info/RECORD +15 -0
- spry-0.5.5.dist-info/WHEEL +6 -0
- spry-0.5.5.dist-info/entry_points.txt +3 -0
- spry-0.5.5.dist-info/top_level.txt +1 -0
spry/__init__.py
ADDED
|
File without changes
|
spry/__main__.py
ADDED
spry/modules/__init__.py
ADDED
|
File without changes
|
spry/modules/core.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
#!/usr/bin/env python
|
|
3
|
+
# -*- coding: utf-8 -*-
|
|
4
|
+
|
|
5
|
+
# ----------------------------------------------------------------------
|
|
6
|
+
# This file is part of spry
|
|
7
|
+
#
|
|
8
|
+
# Spry is free software: you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
#
|
|
13
|
+
# Spry is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
# GNU General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# You should have received a copy of the GNU General Public License
|
|
19
|
+
# along with Spry. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
# ----------------------------------------------------------------------
|
|
21
|
+
try: import spinner
|
|
22
|
+
except: from spry.modules import spinner
|
|
23
|
+
try: import pdf_maker
|
|
24
|
+
except: from spry.modules import pdf_maker
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from weasyprint import HTML, CSS
|
|
2
|
+
from weasyprint.fonts import FontConfiguration
|
|
3
|
+
|
|
4
|
+
def create_pdf(username, totals):
|
|
5
|
+
"""Test out functionality."""
|
|
6
|
+
html = HTML(string='<body width="600px"><div class="top"><br /><br /><h4>SPRY Report</h4><p>Data about <b>{}</b></p></div>\
|
|
7
|
+
<div><img class="insta" src="./{}.jpg"/></div\
|
|
8
|
+
<div>Total accounts found: {}</div></body>'.format(username, username, totals))
|
|
9
|
+
css = CSS(string='''
|
|
10
|
+
.top { text-align: center; border-bottom: 2px dashed deepskyblue; padding: 5px; }
|
|
11
|
+
p { font-family: mono; font-size: 12px; }
|
|
12
|
+
h2,h3,h4 { font-family: "Andale Mono"; font-size: 14px; }
|
|
13
|
+
ul,li { font-family: "Andale Mono"; font-size: 11px; letter-spacing: 0.08em; }
|
|
14
|
+
ul { list-style: none; }
|
|
15
|
+
ul { width: 500px; margin-bottom: 20px; border-top: 1px solid #ccc; }
|
|
16
|
+
li { border-bottom: 1px solid #ccc; float: left; display: inline;}
|
|
17
|
+
#double li { width:50%;}
|
|
18
|
+
#triple li { width:33.333%; }
|
|
19
|
+
#six li { width:16.666%; }
|
|
20
|
+
#quad li { width:25%; }
|
|
21
|
+
''')
|
|
22
|
+
html.write_pdf(
|
|
23
|
+
'{}-report.pdf'.format(username), stylesheets=[css])
|
spry/modules/spinner.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
def spinning_cursor():
|
|
5
|
+
while True:
|
|
6
|
+
for cursor in '|/-\\':
|
|
7
|
+
yield cursor
|
|
8
|
+
|
|
9
|
+
def spinwhile():
|
|
10
|
+
spinner = spinning_cursor()
|
|
11
|
+
try:
|
|
12
|
+
sys.stdout.write(spinner.next())
|
|
13
|
+
except:
|
|
14
|
+
sys.stdout.write(next(spinner)) # python 3
|
|
15
|
+
sys.stdout.flush()
|
|
16
|
+
time.sleep(0.1)
|
|
17
|
+
sys.stdout.write('\b')
|
|
18
|
+
|
|
19
|
+
|