Skip to content

transform.local.command property of transform set to homebrew's python bin directory #43

@johannestaas

Description

@johannestaas

We've noticed an interesting issue generating an mtz with canari create-profile $package in the environment of a machine that uses homebrew python on OSX.

I use OSX Python and the transform.local.command property of my transforms correctly points to /usr/local/bin/dispatcher.

However, a peer uses homebrew Python 2.7.9 and their transform.local.command property gets set to:
/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/bin/dispatcher

His is actually installed in /usr/local/bin/dispatcher .

Which, doesn't exist, so all attempts to run the transform fail with "No file or directory" in maltego. This can be worked around by editing the property of the transforms in Manage Transforms in maltego.

I believe the related code might be at src/canari/pkgutils/maltego.py:

        transform_settings_def = TransformSettings(properties=[                 
            CmdLineTransformPropertySetting(                                    
                os.path.join(get_bin_dir(),                                     
                             'dispatcher.bat' if os.name == 'nt' else 'dispatcher')
            ),                                                                  
            CmdParmTransformPropertySetting(name),                              
            CmdCwdTransformPropertySetting(working_dir),                        
            CmdDbgTransformPropertySetting(spec.debug)                          
        ])        

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions