ghostmanager / shepherd Goto Github PK
View Code? Open in Web Editor NEWA Django application to help red team operators manage a library of domain names
Home Page: https://medium.com/@cmaddy/being-a-good-domain-shepherd-part-2-5e8597c3fe63
A Django application to help red team operators manage a library of domain names
Home Page: https://medium.com/@cmaddy/being-a-good-domain-shepherd-part-2-5e8597c3fe63
There is an error when on tries to delete a domain.
Internal Server Error: /admin/catalog/domain/
...
File "/opt/Shepherd/catalog/models.py", line 193, in __str__
return f'{self.client} {self.project.project_type} - {self.domain.name} ({self.activitytype.activity}) {self.start_date} to {self.end_date} - {self.o
perator}'
AttributeError: 'History' object has no attribute 'project'
The line
Line 193 in dfba838
Should be changed with
return f'{self.client} {self.project_type.project_type} - {self.domain.name} ({self.activity_type.activity}) {self.start_date} to {self.end_date} - {self.operator}'
I'll send a PR to fix it.
When uploading domains via CSV the error "Unable to read rows. KeyError('name')" is returned.
This can easily be reproduced by downloading the template, and then uploading it straight away without any modifications.
The client field in the Checkout form is a free text area.
Line 19 in dfba838
Is there a reason it is not a ModelChoiceField like the Project Type to select from the client list ?
Because right now, there is an error if the client name does not exist.
Internal Server Error: /catalog/checkout/15
Traceback (most recent call last):
...
File "/opt/Shepherd/catalog/views.py", line 123, in checkout
client = Client.objects.get(name__iexact=client_name)
...
catalog.models.Client.DoesNotExist: Client matching query does not exist.
When manually creating a domain entry every field must be filled in, even when it makes no sense. IE Why should I have to fill in domain categories, when they can be blank once the domain is created.
Please alter the form to allow Categories, note, and purchase/expiration date fields to be blank/empty or have a default value pre-filled to allow for streamlined entry of new domains.
The application fails to update domain categories when it is tracking a unicode domain. The following error is displayed in the console:
[+] Starting update of $UNICODE_DOMAIN
20:01:16 [Q] ERROR Failed [autumn-three-steak-earth] - name 'error' is not defined : Traceback (most recent call last):
File "/home/USER/Code/Shepherd/modules/review.py", line 126, in check_ibm_xforce
req = self.session.get(xforce_api_uri, headers=headers, verify=False)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1270, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.7/http/client.py", line 1202, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 54-55: ordinal not in range(256)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/USER/.local/lib/python3.7/site-packages/django_q/cluster.py", line 381, in worker
res = f(*task['args'], **task['kwargs'])
File "/home/USER/Code/Shepherd/tasks.py", line 105, in check_domains
lab_results = domain_review.check_domain_status()
File "/home/USER/Code/Shepherd/modules/review.py", line 450, in check_domain_status
xforce_results = self.check_ibm_xforce(domain_name)
File "/home/USER/Code/Shepherd/modules/review.py", line 143, in check_ibm_xforce
print('[!] IBM X-Force request failed: {}'.format(error))
NameError: name 'error' is not defined
When clicking on a domain from the 'All Registered Domains' page, I receive the following error:
DoesNotExist at /catalog/domain/2
Group matching query does not exist.
Request Method: GET
Request URL: http://127.0.0.1:8000/catalog/domain/2
Django Version: 2.1.5
Exception Type: DoesNotExist
Exception Value:
Group matching query does not exist.
Exception Location: /usr/local/lib/python3.6/dist-packages/django/db/models/query.py in get, line 399
Python Executable: /usr/bin/python3
Python Version: 3.6.7
Python Path:
['/opt/Shepherd',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/root/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages']
I'm running Ubuntu 18.10.
running update domain categories doesnt work. Page will state task is queued but going to administration page and checking scheduled/failed/successful task all shows nothing.
Hello
thx for Ghost
How can I upload a picture in the description?
Get the following error when running the Domain Update
argument of type 'NoneType' is not iterable : Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django_q/cluster.py", line 377, in worker res = f(*task['args'], **task['kwargs']) File "/opt/Shepherd/tasks.py", line 103, in check_domains lab_results = domain_review.check_domain_status() File "/opt/Shepherd/modules/review.py", line 421, in check_domain_status if 'categories' in vt_results: TypeError: argument of type 'NoneType' is not iterable
Bluecoat recently modified their website, and as a consequence the method to fetch the data changed. They added an XSRF token.
There might be a way to modify the script to make it work with their new model, I'll have a look at it.
In the meanwhile I would recommend removing the script part that checks Bluecoat.
This is more a question than an issue.
In the checkout form the start date is a required field.
Line 20 in dfba838
But when the History instance is created, it is forced to current date.
Lines 168 to 169 in dfba838
Is this because of future features to checkout a domain in advance or is this a bug ?
The MX toolbox check is failing. It's not Shepherd's fault as it seems the website is no longer working properly.
When importing domains using the import csv feature, the following error appears when domains have the same registrar as a pre-existing domains
Issue processing data for 'example.com': IntegrityError('UNIQUE constraint failed: catalog_domain.registrar')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.