-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
50 lines (42 loc) · 2.43 KB
/
Copy pathREADME
File metadata and controls
50 lines (42 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# README - EffectiveCouscous
Welcome to Canari. You might be wondering what all these files are about. Before you can use the power of
`canari create-profile` you needed to create a transform package and that's exactly what you did here! I've given you a
directory structure to use in the following manner:
* `src/EffectiveCouscous` directory is where all your stuff goes in terms of auxiliary modules that you may need for
your modules
* `src/EffectiveCouscous/transforms` directory is where all your transform modules should be placed. An example
`helloworld` transform is there for your viewing pleasure.
* `src/EffectiveCouscous/transforms/common` directory is where you can put some common code for your transforms like
result parsing, entities, etc.
* `src/EffectiveCouscous/transforms/common/entities.py` is where you define your custom entities. Take a look at the
examples provided if you want to play around with custom entities.
* `maltego/` is where you can store your Maltego entity exports.
* `src/EffectiveCouscous/resources/maltego` directory is where your `entities.mtz` and `*.machine` files can be
stored for auto install and uninstall.
* `src/EffectiveCouscous/resources/external` directory is where you can place non-Python transforms written in other
languages.
If you're going to add a new transform in the transforms directory, remember to update the `__all__` variable in
`src/EffectiveCouscous/transforms/__init__.py`. Otherwise, `canari install-package` won't attempt to install the
transform. Alternatively, `canari create-transform <transform name>` can be used within the
`src/EffectiveCouscous/transforms` directory to generate a transform module and have it automatically added to the
`__init__.py` file, like so:
```bash
$ canari create-transform foo
```
To test your transform, simply `cd` into the src directory and run `canari debug-transform`, like so:
```bash
$ canari debug-transform EffectiveCouscous.transforms.helloworld.HelloWorld Phil
%50
D:This was pointless!
%100
`- MaltegoTransformResponseMessage:
`- Entities:
`- Entity: {'Type': 'test.MyTestEntity'}
`- Value: Hello Phil!
`- Weight: 1
`- AdditionalFields:
`- Field: 2 {'DisplayName': 'Field 1', 'Name': 'test.field1', 'MatchingRule': 'strict'}
`- Field: test {'DisplayName': 'Field N', 'Name': 'test.fieldN', 'MatchingRule': 'strict'}
```
Cool right? If you have any further questions don't hesitate to drop us a line;)
Have fun!