Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
➜ glslideshow_flags ls -l
total 12
lrwxrwxrwx 1 eugene eugene 49 Feb 18 11:20 glslideshow_flags.py -> /usr/share/pyshared/ajenti/plugins/hosts/hosts.py
-rw-r--r-- 1 eugene eugene 1967 Feb 18 11:28 glslideshow_flags.pyc
lrwxrwxrwx 1 eugene eugene 52 Feb 18 11:20 __init__.py -> /usr/share/pyshared/ajenti/plugins/hosts/__init__.py
-rw-r--r-- 1 eugene eugene 570 Feb 18 11:28 __init__.pyc
drwxr-xr-x 2 eugene eugene 4096 Feb 18 11:20 layout
class Option (object):
def __init__(self, value):
self.value = value
...in plugin:
def init(self):
....
self.binder = Binder(None, self)
from ajenti.ui import UIElement
print UIElement.get_classes()
print sorted(list(set([x.typeid for x in UIElement.get_classes()])))
def refresh(self):
self.binder.reset()
# update the dropdown here
self.binder.autodiscover().populate()
@Eugeny
Eugeny / main.py
Last active December 27, 2015 11:39
from ajenti.api import plugin
from ajenti.plugins.main.api import SectionPlugin
from ajenti.ui import on, p, UIElement
from ajenti.ui.binder import Binder
@plugin
class Test (SectionPlugin):
def init(self):
self.title = 'Controls 2'
import os
import re
import time
import subprocess
import ajenti
from ajenti.api import *
from ajenti.api.http import *
from ajenti.plugins import manager
r=function(a,b){$('input,textarea').each(function(i,e){ $(e).val( $(e).val().replace(new RegExp(a, 'g'), b) ); });}; r('Lime', 'Black')
$ tar xvf se-ajenti-0.1.tar.gz
/root/DO.NOT.HACK.PLS.txt
$
Debugging stunnel problems in Ajenti:
0. Disable SSL in ajenti:
change "ssl": { "enable": true to false in /etc/ajenti/config.json
service ajenti restart
1. Regenerate the certificate
ajenti-ssl-gen hostname -f
cert = /etc/ajenti/ajenti.pem
foreground = yes
pid =
[default]
accept = 0.0.0.0:8000
connect = 127.0.0.1:8001