securisec / chepy

Chepy is a python lib/cli equivalent of the awesome CyberChef tool.
GNU General Public License v3.0
938 stars 54 forks source link

Custom cyberchef URL #9

Closed geekscrapy closed 4 years ago

geekscrapy commented 4 years ago

Any chance to expose choosing the cyberchef URL? Maybe thought the .conf file?

Also, if "url" could be defined in core.py within ChepyCore.init this would allow us to change the URL at runtime.

securisec commented 4 years ago

I am not sure I fully understand your request. Which url are you referring to? Are you referring to the web method that opens the current state in the browser? docs or something else?

geekscrapy commented 4 years ago

I need to change the URL for cyberchef (so I can use an internally hosted version).

This is the 'url' variable I meant: https://github.com/securisec/chepy/blob/52fe39a71cf1d5b3cbc190971839cfd4708b1fda/chepy/core.py#L608 and https://github.com/securisec/chepy/blob/52fe39a71cf1d5b3cbc190971839cfd4708b1fda/chepy/core.py#L612

An easy and quick fix to allow modification of this at runtime is to define 'url' in ChepyCore.__init__

securisec commented 4 years ago

Got it. Sure, i will add that for the next release. I will not do it inside init, or in the config file because it is a url that is only used by one function. Instead, I will add it as a method argument with a default value.

securisec commented 4 years ago

@geekscrapy this is now implemented in release 2.1.4

geekscrapy commented 4 years ago

Thanks! I will say, it might be best to supply it in the config file as it'd be a pain to specify each time as an argument. I use .web frequently from the command line. Just my user case though! Thanks again!