forked from dvopsway/datasploit
-
Notifications
You must be signed in to change notification settings - Fork 433
/
Copy pathemail_slideshare.py
executable file
·49 lines (37 loc) · 1.23 KB
/
email_slideshare.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
#!/usr/bin/env python
import base
import sys
import requests
from bs4 import BeautifulSoup
from termcolor import colored
# Control whether the module is enabled or not
ENABLED = True
class style:
BOLD = '\033[1m'
END = '\033[0m'
def banner():
print colored(style.BOLD + '\n---> Searching Slideshare\n' + style.END, 'blue')
def main(email):
req = requests.get('https://www.slideshare.net/search/slideshow?q=%s' % (email))
soup = BeautifulSoup(req.content, "lxml")
atag = soup.findAll('a', {'class': 'title title-link antialiased j-slideshow-title'})
slides = {}
for at in atag:
slides[at.text] = at['href']
return slides
def output(data, email=""):
if data:
print "Found %s published slides\n" % len(data)
for tl, lnk in data.items():
print str(tl).strip() + " : https://www.slideshare.net" + str(lnk).strip()
else:
print colored('[-] No Associated Slides found.', 'red')
if __name__ == "__main__":
try:
email = sys.argv[1]
banner()
result = main(email)
output(result, email)
except Exception as e:
print e
print "Please provide an email as argument"