Coder Social home page Coder Social logo

Input parameters (request.params) about canari HOT 4 CLOSED

allfro avatar allfro commented on August 24, 2024
Input parameters (request.params)

from canari.

Comments (4)

catalyst256 avatar catalyst256 commented on August 24, 2024

Hello,

Canari allows you to use something called multenterbox which will pop up when you run a transform and allow the user to specify fields that can then be used in your transform. This is a code snippet from one of my transforms.

from canari.easygui import multenterbox

msg = 'Enter Search Criteria'
title = 'L0 - Simple pcap search [SmP]'
fieldNames = ["Source", "Destination", "Port", "Free Text"]
fieldValues = []
fieldValues = multenterbox(msg, title, fieldNames)

This shows a box with 4 parameter fields which you then reference in your transform like this:

s_ip = fieldValues[0]

The full code is here:

https://github.com/catalyst256/sniffMyPackets/blob/master/src/sniffMyPackets/transforms/pcapsearch.py

Let me know if that helps or not.

from canari.

allfro avatar allfro commented on August 24, 2024

Thanks @catalyst256,

But there is also another way which actually passes parameters via the command line if you want. The way to do that is to go into the transform manager in Maltego, select the local transform you want to pass parameters to. Then under 'Command parameters' enter your command line arguments after the transform name. For example, 'my.transforms.transform -P -s blah'. This will populate the request.params field. Although this is supported, it is not necessarily great for transforms that are going to be strictly local. You might want to look at what @catalyst256 is suggesting for UI friendliness :)

from canari.

pejema avatar pejema commented on August 24, 2024

Thanks for the quick answer, I've tried the solution of @catalyst256 and I get the next exception:

Can't find a usable init.tcl in the following directories:
C:/Ruby193/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/tcl8.5.12/library C:/tcl8.5.12/library
This probably means that Tcl wasn't installed properly.

Do I have to install anything?

from canari.

pejema avatar pejema commented on August 24, 2024

ok, the problem was my python version. Thanks a lot @catalyst256, this is exactly that I wanted to do

Cheers

from canari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.