Skip to content

Posts from the ‘Development’ Category

6
Aug

SimpleHtml5Editor – Just edit, no bullshit

During the development of the experimental branch in GrassCMS I found out that there are no bullshit-free wisywig html editors out there, as you might imagine, I just wanted a wisywig editor, as small as possible, to fucking edit text. Nothing more, just fucking edit text.

Turns out that If you look for minimalist wisywig editors you’ll get featureless and yet still huge stuffs, bloated with polyfils and fixes for older browsers. It’s almost inconceivable that a “light” editor weights more than 200k, a text editor, something as simple as that, and one, as I wanted it, to actually edit text, with only the stuff you’ll need!

You’d think that’s logical, hey, they’ve got to support older browsers don’t they? Well, I’ll tell you a secret:

Older browsers suck

I didn’t want to support older browsers from the begging, neither do you, or you’ll probably won’t be reading this, so, why did I have to use those extra hundreds of kilobytes?

I could not stop myself, I needed a wisywig editor so, why not doing one myself? And there It begun, I soon started a html5 wisywig editor, using contentEditable and document.execCommand, then I stablished four goals to the project:

  • Be pure html5
  • Not use jquery
  • less than 100 lines of coffescript
  • Nice, usable and featureful
So, In a few days I had it, an editor using the contentEditable and execCommand html5 features, built it as a  zeptojs plugin (a nice alternative to jquery that is like ten times smaller) and with almost all the stuff you need for text editing and all in less than 90 lines of coffescript

Check it out!

31
Jul

Dlive Airo – Your wireless pentesting resource

Even tought we can find lots of pentesting wiereless linux distros, we couldn’t find one that fits our needs in degeneratedlabs .
Those requisites were:

  • Updated kernel Drivers
  • Recent software (aircrack-ng subversion, recent distribution)
  • Easy to use (airoscript, debian-based)
  • Lightweight(no Gnome or KDE)
  • More usability, not only as a wireless auditory system, but as a complete distro.
  • Complete, not just an aircrack-ng oriented distro, but still a wireless-pentesting specific distro

Dlive

That way we started plannning dlive , a debian sid based livecd with its own pacakages (and debian repository ) with a lightweight desktop environment, and additional tools like pyrit, john the ripper or wireshark, plus a nice 3.4 kernel recently cooked in debian experimental.

Dlive’s star is airoscript-ng, the most recent release, with lots of renewed functionalities

More info

 

14
Jun

Presenting digenpy web interface

Digenpy, the dictionary generator I’ve been working for the last two years, has taken another step into portability. I present digenpy.org online dictionary generator

I became obsessed with prividing as many interfaces as I could to it, making it portable to almost any systems. I’ve been able to run digenpy correctly, with gtk, on windows and linux, and without gtk, windows linux and android, but that wasnt enough.

So, as I’ve been onto web development lately, I developed this nice web interface to it, with just about 15 lines of code, plus a standard lighttpd fastcgi configuration. It has the same functionalities as the original digenpy, just web-ready. It has a fresh design and is responsive.


Source: http://digenpy.org

28
Feb

Exporting a subversion repository from a git repository using github

Ok, so, you want to quick-and-easily export your git repository as a subversion repository, the answer is pretty straightforward: Use github as an intermediary.
For it, you first will need to configure a github account and create a repository, that’s not the object of this article so you might want to dig up a little over the google seas. For this example, repository FooBar will be used, and repo.foobar.com will be the origin git.

First, we go to our own repo’s directory (a clone of your current repository’s), and add github proyect as remote, like this:

1 2 3 4
git clone git@repo.foobar.com/FooBar
cd FooBar
git remote add github git@github.com:XayOn/FooBar
# Remember to replace XayOn for your username and FooBar for your github repo name
view raw gistfile1.sh This Gist brought to you by GitHub.

Luckily, github exports automatically all its git repos as subversion, so, right now, you’re already able to execute:

svn co http://github.com/XayOn/FooBar

And there you have it, your git repo, exported as subversion, just keep the github repo updated with

git remote push github <branch>

											
10
Feb

Aircrack-ng unoficial debian package

I’ve been working lately on an unoficial aircrack-ng package containing all the cool stuff, including airoscript. I talked with Thomas D’Otreppe and he told me I could use some space on aircrack-ng’s servers, but I haven’t had it yet, so I put the repository under degeneratedlabs. If the repo is down try again in a few hours.

You can install lastest (weekly built) aircrack-ng by adding this repo to your /etc/apt/sources.list

deb http://repo.degeneratedlabs.net/debian/ aircrackng-unstable/

And executing

apt-get update && apt-get install aircrack-ng

Also, you can find the sources I use to generate the package at my github. And the script I made to ease the build here:

1 2 3 4 5 6 7 8 9 10 11 12 13 14
# First, we download lastest trunk and create an orig tar.gz package
svn co http://trac.aircrack-ng.org/svn/trunk aircrack-ng-1.1
cd aircrack-ng-1.1
rm -rf `find . -name .svn` && tar czvf ../aircrack-ng_1.1.orig.tar.gz *; &>/dev/null
 
# Clone the debian/ dir
git clone http://github.com/XayOn/Aircrack-ngDebian debian &>/dev/null
# vim debian/changelog # Do it before, trought git interface!! =)
 
# Build and upload
debuild $@ && { cd .. ; dput repo.degeneratedlabs.net *changes; }
 
#Oneliner:
# svn co http://trac.aircrack-ng.org/svn/trunk aircrack-ng-1.1; cd aircrack-ng-1.1; rm -rf `find . -name .svn` && tar czvf ../aircrack-ng_1.1.orig.tar.gz *; &>/dev/null ; git clone http://github.com/XayOn/Aircrack-ngDebian debian &>/dev/null; debuild $@ && { cd .. ; dput repo.degeneratedlabs.net *changes; }
view raw gistfile1.sh This Gist brought to you by GitHub.
30
Jan

Automagically organising your bittorrent downloads with deluge

I, as most people, like to have my video files ordered. After I’ve finished downloading a torrent I manually move it to my media dir, under a directory for the series it belongs to, or no directory at all, but it’s a hard and unnecesary process.

I’ll explain here (and provide an script for it) how to make deluge automagically handle our files.

I’ve chosen deluge bittorrent client for this guide (blame it on enver555), but you should be able to use my script (with maybe, a few modifications about the argument handling) anywhere.

Getting the script

First, you will need to download the shorting script, it’s a single 5-liner bash script, with lots of magic and power, for that reason, I’ve called it the torrent shorting hat.

1 2 3 4 5
#!/bin/bash
id=$1; name=$2; path=$3; source ~/.torrent-aliases
type=$(file -b --mime-type $path |cut -d/ -f1)
for dest_dir in ${!regexes[@]}; do mkdir -p ~/Media/$type/$dest_dir; [[ $path =~ ${regexes[$dest_dir]} ]] && { mv $path ~/Media/$type/$dest_dir/; exit; }; done
mv $path ~/Media/$type/$dest_dir # Fallback
view raw gistfile1.sh This Gist brought to you by GitHub.

Installing it system-wide or locally

You might want all your users to have access to this script, for that, as with any other linux program, you should copy it to path and give it executable permissions, that’s, as root:

wget https://raw.github.com/gist/1705151/540fd4445ca4e0f540ddf82decba3ffc421c46ab/gistfile1.sh -O /usr/local/bin/torrent_shorting_hat
chmod +x /usr/local/bin/torrent_shorting_hat

I personally recoment this method, but if you prefer, you can get it at your local home, you could, for example, do something like this:

wget https://raw.github.com/gist/1705151/540fd4445ca4e0f540ddf82decba3ffc421c46ab/gistfile1.sh -O .torrent_shorting_hat
chmod +x .torrent_shorting_hat

Configuring deluge

We enable the execute plugin

Enable execute plugin

Then, we add an execute action for a “finished torrent download” handler. If you’ve added your script locally, you had to reference it as its full path, otherwise you have just to use “torrent_shorting_hat” as scrpit:

 

Adding the complete script call.

 

Configuring the sorting hat

The sorting hat will read a file in your home called .torrent-aliases, more exactly its regexes variable, it’s basically a shell script with associative arrays, like this:

regexes[''hitchicker']="(.*)42(.*)"

This will get everything containing “42″ to a folder in ~/Media/(mimetype)/hitchicker, being mimetype the file’s mimetype. Wich, by the way, means that even if you don’t have anything configured, the script will organize files by its type.

 

25
Jan

Rstext.me restructuredtext slideshows on the cloud

I just made restructuredtext slideshow solution public, under the motto “Getting your slideshows done have never been so easy”.

” The best thing about it is that you can build nice, corporate-looking presentations in just seconds, concentrating in the information instead of the format or the style. We provide a lot of predefined themes, and will give corporate support for bussiness image templates”

David Francos

Rstext.me turns around our current concept of building a slideshow by providing a nice infraestructure to edit and store online your slideshows, in restructuredtext format (a widely used easy-to-read markup language).

You can visit it here

Source: http://blog.rstext.me

 

 

 

 

13
Jan

/foreach user_in [users] do [commands] in irssi

I just finished my implementation of foreach user_in for irssi.

There was out there a plugin to execute anything for each user in a channel window. I had the requirement to send information to a huge amount of that users (that is, a list of users from my bitlbee channel) but not to all the channel, so I said… Why not a foreach_user indo?

This way, I can, for example, do something like this:

/foreach user in friend_one friend_two friend_three /msg -bitlbee &bitlbee $0: Want a beer? 2100 at my place.
 /foreach user in contact_one contact_two friend_three /msg -bitlbee &bitlbee $0: Have you checked out my last proyect

For this, just download the script from my github and place it in .irssi/scripts/autorun so it will be auto-executed when starting irssi, and load it with:

/load autorun/foreach_user_in.pl

5
Jan

Adding socks5 support to python-irclib

I was playing with IRC and Proxyes a few weeks ago, and I found out that python’s irclib didn’t support them!
It took me like a minute or so to fix it, just overloading socket with socksocket, you can have a look at my fork in github

        try:
            import socks, os
            socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5,
                os.getenv('proxy_addr'), os.getenv('proxy_port'))
            socket.socket = socks.socksocket
        except:
            pass

So, basically I try importing socks and setting up a default proxy, socks5 (sorry, I haven’t considered socks4 on there), with the environment variables proxy_addr and proxy_port as addr and port.

To use it, you’ll have to get a libirc-based application (there’s a bot included that might be a start) and, before starting it, define proxy_addr and proxy_port

proxy_addr=127.0.0.1; proxy_port=1080; python my_python-irclib_based_foo

Enjoy =)

12
Dec

Presentando MySocialStickers

Pegatinas de mis seguidores, con el nick y la imagen de perfil.

Pegatinas de mis seguidores, con el nick y la imagen de perfil.

Presentación

Presentamos MySocialStickers, tu nueva aplicación imprescindible para organizar eventos.

Con MySocialStickers puedes generar identificaciones para los asistentes a un evento basadas en información de twitter

Incluso puedes hacer tus propias tarjetas de visita!

Fuentes de datos

Twitter! De momento MySocialStickers soporta unicamente generar pegatinas en base a twitter. Puedes elejir entre las siguientes fuentes de datos:

  • Listas: Organiza eventos de la forma más sencilla
  • Seguidores: ¿Quieres organizar un evento y tienes una cuenta de twitter especifica para ello?
  • Amigos: ¡Regala MySocialStickers a tus amigos!
  • Busquedas: ¿Quieres algo de acción social? ¡Así nacio la idea de MySocialStickers!
  • Tu mismo: Presentate de la mejor manera posible.

Personaliza tus tarjetas o tus pegatinas!

Elije entre distintos tamaños predeterminados o inventa tu propio tamaño para tus MySocialStickers. Cambia el color, elije entre QR Code e imagen de perfil, nick o nombre real, puedes darle mil utilidades con cada opcion

Pegatinas sobre ti mismo, con el nick y un código QR

Pegatinas sobre ti mismo, con el nick y un código QR

Lo estrenaremos para el Salón del Comic de zaragoza, en el que, a cualquiera que lo pida via twitter con el hashtag #MySocialStickers, le entregaremos (en persona, pedidlas sólo si vais a venir) su pegatina con codigo QR completamente gratis!

 

Read moreRead more