semvec/pypi-packages huggingface dataset:
invisibleroads-macros-web 0.3.7
Shortcut functions for web operations
Keywords: invisibleroads

# Shortcut Functions for Web Operations

## Install

```bash
# Install without extras
pip install invisibleroads-macros-web
# Install with extras
pip install invisibleroads-macros-web[jinja,markdown,starlette]
```

## Use

```python
# Open browser
from invisibleroads_macros_web.browser import (
    open_browser)

# Escape characters
from invisibleroads_macros_web.escape import (
    escape_quotes_html,
    escape_quotes_js)

# Check ports
from invisibleroads_macros_web.port import (
    find_open_port,
    is_port_in_use)

# Render markdown
from invisibleroads_macros_web.markdown import (
    get_html_from_markdown,
    remove_single_paragraph,
    remove_parent_paragraphs,
    remove_line_break_after_div)

# Configure templates
from invisibleroads_macros_web.jinja import (
    AssetStorage,
    RelativeTemplateEnvironment,
    PathTemplateLoader)
from invisibleroads_macros_web.starlette import (
    ExtraResponseHeadersMiddleware,
    TemplateResponseFactory)
```

## Test

```bash
git clone https://github.com/invisibleroads/invisibleroads-macros-web
cd invisibleroads-macros-web
pip install -e .[jinja,markdown,starlette,test]
pytest --cov=invisibleroads_macros_web --cov-report term-missing tests
```

# 0.3
- Add `AssetStorage`
- Add `remove_single_paragraph`, `remove_parent_paragraphs`

# 0.2
- Add `TemplateResponseFactory`
- Add `RelativeTemplateEnvironment`, `TemplatePathLoader`
- Remove extraneous p tags in `get_html_from_markdown`

# 0.1
- Add `open_browser`, `escape_quotes_html`, `escape_quotes_js`
- Add `get_html_from_markdown`, `find_open_port`, `is_port_in_use`
karton-misp-pusher 1.1.0
MISP reporter for the Karton framework

# karton-misp-pusher

Listens for new samples in the [karton](https://karton-core.readthedocs.io/en/latest/)
pipeline and uploads them to MISP.

Configs are parsed using the [mwdb-iocextract](https://github.com/CERT-Polska/mwdb_iocextract)
project. This means, that we operate on a higher level than raw JSON configs, and makes
it possible to correlate different samples and campaigns (for example, by the used crypto
material).

**Author**: CERT.pl

**Maintainers**: nazywam

**Consumes:**
```
{
    "type": "config",
}
```

**Result:**

![config in misp](./docs/misp.png)

## Usage

First of all, make sure you have setup the core system: https://github.com/CERT-Polska/karton.
[More info here](https://github.com/CERT-Polska/karton/blob/master/docs/how-to-run.md).

Then install karton-misp-pusher from PyPi:

```shell
$ pip install karton-misp-pusher

$ karton-misp-pusher --misp-url https://misp.url --misp-key SECRET123
```

You can also add optional xrefs to mwdb with `--mwdb-url`, or skip MISP
verification with `--misp-insecure`. For more options see `--help`.

## Adding Galaxy clusters relationship

It's possible to link new events to existing MISP Galaxy clusters using a mapping file.

The mapping file is a simple JSON document that assings a cluster UUID for each malware family in your ecosystem.

An example using the [Malpedia MISP Galaxy would be](https://malpedia.caad.fkie.fraunhofer.de/usage/api#/api/get/misp):
```json
{
    "404keylogger": "6b87fada-86b3-449d-826d-a89858121b68",
    "agenttesla": "b88e29cf-79d9-42bc-b369-0383b5e04380",
    "amadey": "77f2c81f-be07-475a-8d77-f59b4847f696"
}
```

A value can be null, in which case configs of that family will be silently ignored instead of raising an error. This is useful if you want to ignore configs of a particular family.

With that ready you can then launch the karton service with the `--galaxy-clusters-mapping` argument pointing to the file.


![Co-financed by the Connecting Europe Facility by of the European Union](https://www.cert.pl/uploads/2019/02/en_horizontal_cef_logo-e1550495232540.png)