RTA
RTA copied to clipboard
Kali 2018 issue
Hello i am having a problem like this:
Traceback (most recent call last):
File "rta.py", line 20, in
The problem seems to exist because you haven't installed python twitter module. Can you try re-running python install.py
and see if the installation is completing without any errors ?
You can also try to install twitter module manually: pip install twitter
Running: Linux kali 4.15.0-kali3-amd64 #1 SMP Debian 4.15.17-1kali1 (2018-04-25) x86_64 GNU/Linux
root@kali:~/RTA# python rta.py --url "security.com" -v -s -n
Getting the following:
Traceback (most recent call last):
File "rta.py", line 427, in
Doesn't handle an empty list well so:
At line 313 added data[]
Then at line 362 added:
if data is None: continue elif not data and isinstance(data, list): continue elif not isinstance(data, list): continue
Ran it again:
Traceback (most recent call last):
File "rta.py", line 427, in
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8834 0.0.0.0:* LISTEN 4140/nessusd
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 5052/mongod
tcp6 0 0 :::8834 :::* LISTEN 4140/nessusd
MongoDB is up, so whats the problem...
pymongo.errors.InvalidOperation: No operations to execute
probably means the data variable you are trying to push into DB is empty so there is no operation to execute. You can try commenting out the insertion operation dataid = collection.insert(data)
and run again.
python rta.py --url "security.com" -v -s -n
____ _ _____ _ _
| _ \ ___ __| | |_ _|__ __ _ _ __ ___ / \ _ __ ___ ___ _ __ __ _| |
| |_) / _ \/ _` | | |/ _ \/ _` | '_ ` _ \ / _ \ | '__/ __|/ _ \ '_ \ / _` | |
| _ < __/ (_| | | | __/ (_| | | | | | | / ___ \| | \__ \ __/ | | | (_| | |
|_| \_\___|\__,_| |_|\___|\__,_|_| |_| |_| /_/ \_\_| |___/\___|_| |_|\__,_|_|
Traceback (most recent call last):
File "rta.py", line 416, in
Do you know how to solve this?
python rta.py --url "security.com" -v -s -n
____ _ _____ _ _ | _ \ ___ __| | |_ _|__ __ _ _ __ ___ / \ _ __ ___ ___ _ __ __ _| | | |_) / _ \/ _` | | |/ _ \/ _` | '_ ` _ \ / _ \ | '__/ __|/ _ \ '_ \ / _` | | | _ < __/ (_| | | | __/ (_| | | | | | | / ___ \| | \__ \ __/ | | | (_| | | |_| \_\___|\__,_| |_|\___|\__,_|_| |_| |_| /_/ \_\_| |___/\___|_| |_|\__,_|_|
Traceback (most recent call last): File "rta.py", line 416, in main() File "rta.py", line 389, in main recon = Recon() File "rta.py", line 55, in init self.scraper = scraper.Scraper() File "/root/Desktop/RTA-master/recon/scraper/scraper.py", line 37, in init self.collection.create_index([("url", DESCENDING), ("hostname", ASCENDING)], unique=True) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 1754, in create_index self.__create_index(keys, kwargs, session, **cmd_options) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 1642, in __create_index with self._socket_for_writes() as sock_info: File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 194, in _socket_for_writes return self.__database.client._socket_for_writes() File "/usr/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 968, in _socket_for_writes server = self._get_topology().select_server(writable_server_selector) File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 224, in select_server address)) File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 183, in select_servers selector, server_timeout, address) File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 199, in _select_servers_loop self._error_message(selector)) pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
Do you know how to solve this?
You need to run mongodb firts. I use docker to run rta, so its my few steps to run it successfully:
FROM python:2.7-slim-stretch
ENV PYTHONUNBUFFERED=1
WORKDIR /wd
# Install mongodb
RUN apt-get update && apt-get install -y gnupg2 && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" >> /etc/apt/sources.list.d/mongodb-org-4.0.list \
&& apt-get update \
&& apt-get install -y mongodb \
&& apt-get autoremove \
&& apt-get clean
After installation run service mongodb start
in terminal.