mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-20 23:37:00 +08:00
Merge remote-tracking branch 'origin/master' into github-code
This commit is contained in:
commit
195802bb09
|
@ -107,7 +107,7 @@ Main contributors:
|
||||||
------------------
|
------------------
|
||||||
* [![Twitter Follow](https://img.shields.io/twitter/follow/NotoriousRebel1.svg?style=social&label=Follow)](https://twitter.com/NotoriousRebel1) Matthew Brown @NotoriousRebel1
|
* [![Twitter Follow](https://img.shields.io/twitter/follow/NotoriousRebel1.svg?style=social&label=Follow)](https://twitter.com/NotoriousRebel1) Matthew Brown @NotoriousRebel1
|
||||||
* [![Twitter Follow](https://img.shields.io/twitter/follow/jay_townsend1.svg?style=social&label=Follow)](https://twitter.com/jay_townsend1) Jay "L1ghtn1ng" Townsend @jay_townsend1
|
* [![Twitter Follow](https://img.shields.io/twitter/follow/jay_townsend1.svg?style=social&label=Follow)](https://twitter.com/jay_townsend1) Jay "L1ghtn1ng" Townsend @jay_townsend1
|
||||||
* [![Twitter Follow](https://img.shields.io/twitter/follow/Jzold.svg?style=social&label=Follow)](https://twitter.com/Jzold) Janos Zold @Jzold
|
* [![LinkedIn](https://static.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png)](https://www.linkedin.com/in/janoszold/) Janos Zold
|
||||||
* [![Twitter Follow](https://img.shields.io/twitter/follow/discoverscripts.svg?style=social&label=Follow)](https://twitter.com/discoverscripts) Lee Baird @discoverscripts
|
* [![Twitter Follow](https://img.shields.io/twitter/follow/discoverscripts.svg?style=social&label=Follow)](https://twitter.com/discoverscripts) Lee Baird @discoverscripts
|
||||||
|
|
||||||
Thanks:
|
Thanks:
|
||||||
|
|
|
@ -358,7 +358,7 @@ def start():
|
||||||
db.store_all(word, emails, 'email', 'trello')
|
db.store_all(word, emails, 'email', 'trello')
|
||||||
|
|
||||||
elif engineitem == 'twitter':
|
elif engineitem == 'twitter':
|
||||||
print('\033[94m[*] Searching Twitter. \033[0m')
|
print('\033[94m[*] Searching Twitter usernames using Google. \033[0m')
|
||||||
search = twittersearch.search_twitter(word, limit)
|
search = twittersearch.search_twitter(word, limit)
|
||||||
search.process()
|
search.process()
|
||||||
people = search.get_people()
|
people = search.get_people()
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
from theHarvester.parsers import myparser
|
from theHarvester.parsers import myparser
|
||||||
import requests
|
import requests
|
||||||
import time
|
import time
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class search_twitter:
|
class search_twitter:
|
||||||
|
@ -36,24 +37,9 @@ def get_people(self):
|
||||||
# fix invalid handles that look like @user other_output
|
# fix invalid handles that look like @user other_output
|
||||||
handles = set()
|
handles = set()
|
||||||
for handle in to_parse:
|
for handle in to_parse:
|
||||||
handle = str(handle).strip()
|
result = re.search(r'^@?(\w){1,15}', handle)
|
||||||
if len(handle) > 2:
|
if result:
|
||||||
if ' ' in handle:
|
handles.add(result.group(0))
|
||||||
handle = handle.split(' ')[0]
|
|
||||||
# strip off period at the end if exists
|
|
||||||
if handle[len(handle) - 1] == '.':
|
|
||||||
handle = handle[:len(handle) - 1]
|
|
||||||
# strip periods if contains three of them
|
|
||||||
if '...' in handle:
|
|
||||||
handle = handle[:handle.index('.')]
|
|
||||||
if '-' == handle[0]:
|
|
||||||
handle = handle[1:]
|
|
||||||
if '-' == handle[1]:
|
|
||||||
handle = handle[0] + handle[2:]
|
|
||||||
handles.add(handle)
|
|
||||||
if '@' in handles:
|
|
||||||
handles.remove('@')
|
|
||||||
|
|
||||||
return handles
|
return handles
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
|
|
Loading…
Reference in a new issue