# chimas
[chimas](https://github.com/caueb/chimas) makes Snaffler output snaff-tastic!

## Gather a snaffler (IN JSON FORMAT!)
See our writeup [here](/pentesting/internal/snaffler) for more information.

## Install pre-reqs
```
npm audit npm install @fortawesome/fontawesome-free
```

## Install
```
git clone https://github.com/caueb/chimas.git
cd chimas
npm install
npm install vite --save-dev
npm run dev
```

## Network config
If you need chimas to listen on `0.0.0.0` so you can port-forward in from the WAN side, do this:

1. Edit your `vite.config.ts` to include the `allowedHosts` variable, i.e.:

```
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
  plugins: [react()],
  server: {
    port: 3000,
    open: true,
    host: '0.0.0.0',
    allowedHosts: ['fqdn.of.your.chimas-server'],
  },
  build: {
    outDir: 'build',
    sourcemap: true
  }
});
```

2.  Start chimas like this:

```
npm run dev -- --host 0.0.0.0
```

## Troubleshooting
Sometimes chimas complains about the format of the JSON you fed it.  In recent versions they offer a little troubleshooting tip to get the JSON in fighting shape:

```
jq -s '{entries: .}' snaffy.json > snaffler-fixed.json
```
