Python Dictionary Generators
Switch branches/tags
Nothing to show
Pull request Compare This branch is 43 commits behind XayOn:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Digenpy
Readme
digenpy
digenpy-gtk
digenpy-gtk.glade
setup.py

Readme

About Digenpy
--------------
Digenpy is a set of dictionary generators written in python.
It's extremely modular and easily extensible.

Usage
------
To see available modules, just exec digenpy.py, you'll get an output like:
    Available countries:
    Spanish
	    Dlink		Usage: Dlink Bssid 
        Jazztel		Usage: Jazztel Bssid Essid
        Tele2		Usage: Tele2 year fixed_data [''|'IV']
        Telefonica	Usage: Telefonica Bssid Essid [WPA]

Adding countries
----------------
To add a new country, just insert the module in digenpy/ directory, with the country name.
Then add the module name to digenpy/__init__.py in the __all__ tuple.
The module must follow a few guidelines, foreach kind of routers (usually company producing or distributing them) it has to have a class, basically composed of __init__ dictionary(self) (as property) and the checks to the docs. A sample skeleton follows

--- SampleCountry.py ---
class Skel():
    def __init__(self, *args):
        if not len(args[0]) > 1:
            self.return_=1
            return
        self.sample="saaaaaaaaaaample"
        self.parameter_one=args[0][1]
        self.parameter_two=args[0][2] # Note that all parameters are in args[0], and starts counting at [1]

    @property
    def dictionary(self):
        if hasattr(self, 'return_'):
            return "Usage: Saaaaaaaample parameter_one parameter_two %s %s " %(self.parameter_one, self.parameter_two)

        return ['a','b]


Et voilá, that will allow the program to throw help when called without arguments, and auto_build general help =)

Now, if you execute digenpy.py without arguments it will spit out something like:
    Available countries:
    Spanish
	    Dlink		Usage: Dlink Bssid 
        Jazztel		Usage: Jazztel Bssid Essid
        Tele2		Usage: Tele2 year fixed_data [''|'IV']
        Telefonica	Usage: Telefonica Bssid Essid
    SampleCountry
        Skep        Usage: saaaaaaaaaaaaample

Et voilá =), oh, also, note that dictionary property must return a list like in ['a','b']