Comments (8)
@geekscrapy You can provide a custom location for the plugins already. Just specify your custom location in pluginpath
in the chepy.conf file. By default, it will try to use its own plugins which are packed with the latest repos. You can see those here. If you place your own plugins in that folder, Chepy will load them. If not, and you specific your own directory, then it will load only what it finds in that directory.
As for the location of the conf file itself, because there are various ways of installing chepy, it is not a super good idea to have it look in the current location. If someone uses pip to install chepy, then the current location becomes the site-packets/chepy dir which becomes cumbersome for the user to update. As for use cases of a cwd location for the conf file, it does assume that the user will set a valid conf file, which the average user might fail too. So having a standard good known config file and location follows the pattern of most popular tools out there.
Thanks for the issues.
from chepy.
The issue I have with not having the cwd as a valid conf is this; chepy is part of my tool, I distribute my tool and I need to be able to set the plug-in directory to a directory in my tools "plugin" dir. This way I can distribute my own plugins with my own tool. Without this I have to get people to manually mod the chepy conf (which they shouldn't have to do, as chepy is only used in my tool internally, therefore people wont know to even change the plugin path!). If it's a library it needs to be portable, without the end user having to customise their setup for a lib, which is part of the bigger tool. I will say, there are also lots of other tools that will look in the following places to find the conf (usually in this order):
$cwd
$home
/etc
Hope that makes sense! 😅
from chepy.
Ah, i understand your use case. I will consider building that out. As an alternative, if you are distributing it as a tool, you can modify this line. Set home = Path().resolve()
.
Hope this solution helps in the meanwhile till next release!
from chepy.
So you know, I'm currently doing this to get round the limitation as I cannot distribute and modify the package as you suggest above (as chepy needs to be installed from pip -r requirements.txt):
from pathlib import Path
bin_path = os.path.dirname(os.path.realpath(__file__))
def custom_Chepy():
import chepy
conf = chepy.ChepyConfig()
conf.plugin_path = Path(os.path.join(bin_path,'plugins'))
_plugins = conf.load_plugins()
class Chepy(
chepy.AritmeticLogic,
chepy.CodeTidy,
chepy.Compression,
chepy.DataFormat,
chepy.DateTime,
chepy.EncryptionEncoding,
chepy.Extractors,
chepy.Forensics,
chepy.Hashing,
chepy.Language,
chepy.Multimedia,
chepy.Networking,
chepy.Other,
chepy.Publickey,
chepy.Search,
chepy.Utils,
*_plugins
):
pass
return Chepy
from chepy.
Ah glad you have it working. Not sure why my suggested method didn't work, but happy it is working for you now. I am still keeping it in mind your feature request for next version. Out of curiosity, what kind of plugins are you developing for chepy? I am always very open to ideas that can enhance chepy itself.
from chepy.
It would be file based plugins - renaming files, moving etc. Things that you can't normally do with a browser. So I'd be looking for more of those types of plugins in the future. FYI, the main reason I was looking at using chepy over the CyberChefAPI in node was because node takes a while to load it's imports, which is a killer for cli tool...
To be honest, I didn't try your method as it would mean I have to modify chepy code where-ever I want to run my tool, so it wasn't really an option.
from chepy.
@geekscrapy I just release version 2.1.3 which implements your requested feature. It will now look at $CWD for a .chepy
folder where the configs are. You can refer to docs for more config objects. So if you distribute your package with a .chepy
folder, then you can specify your own chepy.conf file with the proper keys to enable and set plugin paths. If you just supply an empty .chepy
dir in cwd, then it will create the default conf files at first run.
from chepy.
Just an FYI, even though the .chepy dir is loaded from the CWD, the plugin_path is still required to be an absolute path which means the original issue exists.
from chepy.
Related Issues (20)
- Allow http_request to include state data HOT 1
- Run recipes/modules/plugins from the command line HOT 1
- Files loaded in "r" mode are auto decoded (potentially unexpected/unwanted) HOT 4
- ImportError: cannot import name 'FuzzyCompleter' from 'prompt_toolkit.completion' HOT 5
- No pcap command: read_pcap HOT 1
- pip can not install chepy due to lazy-import HOT 1
- "divide" does not work on command line
- Here's the source of the Magic function (missing from this project I think), is there a barrier to implementing this? HOT 2
- Trying to load recipe but get KeyError: HOT 1
- [Question] What interactive shell is in the demo GIF? HOT 1
- How to use chepy to implement the cfb encryption mode of aes? HOT 1
- pip installation error HOT 1
- UnicodeDecodeError while calling to_binary() HOT 1
- Possible to not freeze dependencies? HOT 5
- change/swap state with CLI HOT 2
- Chepy does not work without proper chepy.conf HOT 5
- remove_whitespace() prints replacement characters
- Wrong module example (escape_string)
- Custom cyberchef URL HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chepy.