semvec/pypi-packages huggingface dataset:
terra-common 0.3.4
The Terra API

This is the Terra API.

## Requirements

On Ubuntu, do not use the system packages, which are too old.
* **docker-ce**: https://docs.docker.com/install/linux/docker-ce/ubuntu/
* **docker-compose**: `sudo pip3 install docker-compose`


## Usage

### First launch
Create a docker.env file:
* `mv docker.env.dist docker.env`
* Edit the settings

### Build Container
`docker-compose build`

### Running the project
`docker-compose up`

`docker-compose down`

`docker-compose up` (postgres image)

### Running tests

`docker-compose exec django bash`

`django@container_id:/code$ source venv/bin/activate`

`(venv) django@353cfc271a48:/code$ tox` (global)

### Applying Django migrations
`docker-compose run --rm django /code/venv/bin/python3.6 ./manage.py migrate`
urgent11-detector 0.1.2
URGENT/11 detection tool by Armis
Requires Python: >=3.4
Keywords: windriver vxworks rtos interpeak ipnet urgent/11 urgent11 armis

![urgent11-detector](https://github.com/ArmisSecurity/urgent11-detector/raw/master/docs/logo.png)

## urgent11-detector
urgent11-detector is a tool to detect whether a device is running the Interpeak IPnet TCP/IP stack, and is thus at risk from the URGENT/11 vulnerabilities.

## Motivation
In light of recent discoveries (see https://armis.com/urgent11), we decided to develop a tool designed to detect whether a device is using Interpeak's IPnet TCP/IP stack, regardless of the RTOS that powers it.
The IPnet TCP/IP stack is the native, built-in stack for VxWorks since version 6.5, but it has been also been supported by a wide array of RTOSs in the past.
Detecting the underlying TCP/IP stack used by a device is a non-trivial task, and so by using this tool one can identify devices that are vulnerable to URGENT/11 vulnerabilities.

## How does it work?
This tool implements 4 unique methods of detection in the form of a TCP and ICMP fingerprints to a target host.
By calculating the sum of all the methods scores, we can determine with high precision whether a device runs an OS that relies on the IPnet TCP/IP stack and whether this OS is VxWorks.
Moreover, we also test whether the host is vulnerable to CVE-2019-12258, which is one of the URGENT/11 vulnerabilities that affects all VxWorks versions that use IPnet.
If a device is detected as running IPnet on VxWorks, and is NOT vulnerable to this CVE, one can deduce this device has been patched against the URGENT/11 vulnerabilities.

## Getting Started
Install the tool directly with pip3:
```
pip3 install urgent11-detector
```
And than run it like this:
```
urgent11-detector IP PORT
```
Alternatively, you can install the [dependencies](#dependencies) and run it manually
```
./urgent11-detector.py IP PORT
```

#### My head hurts.. can you simplify?
![demo](https://github.com/ArmisSecurity/urgent11-detector/raw/master/docs/demo.gif)

#### Dependencies
Assuming you have python3 installed - the only dependencies are scapy and python-iptables.
Install them using:
```
pip3 install scapy python-iptables
```
or advice the formal [scapy installation guide](https://scapy.readthedocs.io/en/latest/installation.html)
and the formal [python-iptables documentation](https://github.com/ldx/python-iptables#installing).

In addition, urgent11-detector currently supports running on a Linux setup exclusively.

## License
Copyright 2019 Armis.

Licensed under the GNU Affero General Public License, Version 3.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

[https://www.gnu.org/licenses/agpl-3.0.txt](https://www.gnu.org/licenses/agpl-3.0.txt)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
swh.loader.dir 0.0.35
Software Heritage Directory Loader

SWH-loader-dir
===================

The Software Heritage Directory Loader is a tool and a library.

Its sole purpose is to walk a local directory and inject into the SWH
dataset all unknown contained files from that directory structure.


## Configuration

The loader needs a configuration file in *`{/etc/softwareheritage |
~/.config/swh | ~/.swh}`/loader/dir.yml*.

This file should be similar to this (adapt according to your needs):

``` yaml
storage:
  cls: remote
  args:
    url: http://localhost:5002/
```

## Run

To run the loader, you can use either:

- python3's toplevel
- celery

### Toplevel

Load directory directly from code or toplevel:

``` Python
dir_path = '/home/storage/dir/'

# Fill in those
origin = {'url': 'some-origin', 'type': 'dir'}
visit_date = 'Tue, 3 May 2017 17:16:32 +0200'
revision = {
    'author': {'name': 'some', 'fullname': 'one', 'email': 'something'},
    'committer': {'name': 'some', 'fullname': 'one', 'email': 'something'},
    'message': '1.0 Released',
    'date': None,
    'committer_date': None,
    'type': 'tar',
    'metadata': {}
}
import logging
logging.basicConfig(level=logging.DEBUG)

from swh.loader.dir.tasks import LoadDirRepository
l = LoadDirRepository()
l.run_task(dir_path=dir_path, origin=origin, visit_date=visit_date,
           revision=revision, release=None, branch_name='master')
```

### Celery

To use celery, add the following entries in the
*`{/etc/softwareheritage | ~/.config/swh | ~/.swh}`/worker.yml*` file:

``` yaml
task_modules:
  - swh.loader.dir.tasks
task_queues:
  - swh_loader_dir
```

cf. [swh-core's documentation](https://forge.softwareheritage.org/diffusion/DCORE/browse/master/README.md) for
more details.

You can then send the following message to the task queue:

``` Python
from swh.loader.dir.tasks import LoadDirRepository

# Fill in those
origin = {'url': 'some-origin', 'type': 'dir'}
visit_date = 'Tue, 3 May 2017 17:16:32 +0200'
release = None
revision = {}
occurrence = {}

# Send message to the task queue
LoaderDirRepository().run(('/path/to/dir', origin, visit_date, revision, release, [occurrence]))
```