Skip to content

Instantly share code, notes, and snippets.

@hasherezade
hasherezade / bot.py
Created September 22, 2014 15:33
Script for communication with SolarBot server
#!/usr/bin/python
# Script for communication with SolarBot server
# only for research purpose!
# CC-BY: hasherezade (http://hasherezade.net)
# uses function 'crypt' from: http://www.joonis.de/de/code/rc4-algorithm
import sys
import urllib2
import time
@hasherezade
hasherezade / color_test.py
Last active June 2, 2016 07:41
Minimalistic "colorfull print"
#!/usr/bin/python
import sys # to args
import colorterm
# ====================================================================
# MAIN:
def main():
colorterm.info("Hello World")
colorterm.warn("Warning!")
@hasherezade
hasherezade / tree.js
Last active June 2, 2016 07:35
Xmass Tree
// CC-BY: hasherezade (hasherezade.net)
function makeTree(height = 6)
{
var treeHtml="";
var width = 1;
var leaf = "###"
var snow = "-*-";
var snowC = 4;
### Keybase proof
I hereby claim:
* I am hasherezade on github.
* I am hasherezade (https://keybase.io/hasherezade) on keybase.
* I have a public key whose fingerprint is 4426 988C C535 7D8E 8233 9B96 9614 CF11 5A0A B686
To claim this, I am signing this object:
@hasherezade
hasherezade / joomla_miniauth.rb
Created January 2, 2015 13:02
This module is just a test of Joomla authentication.
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
#
# This module is just a test of Joomla authentication;
# can be used in exploits that require user to be logged in.
##
require 'msf/core'
@hasherezade
hasherezade / main.cpp
Created January 11, 2015 10:08
Hook example - time
#include <ctime>
#include <iostream>
using namespace std;
int main() {
time_t t = time(0); // get time now
struct tm * now = localtime( & t );
int year = now->tm_year + 1900;
int month = now->tm_mon + 1;
int day = now->tm_mday;
@hasherezade
hasherezade / HexSpinBox.cpp
Created January 21, 2015 13:24
HexSpinBox (subclassed from QSpinBox)
#include "HexSpinBox.h"
HexSpinBox::HexSpinBox(QWidget *parent)
: QSpinBox(parent)
{
validator = new QRegExpValidator(QRegExp("[0-9A-Fa-f]{1,8}"), this);
}
QString HexSpinBox::textFromValue(int value) const
{
#include "QNumberEdit.h"
QString QNumberEdit::PREFIX = "0x";
QNumberEdit::QNumberEdit(QWidget *parent)
: QLineEdit(parent)
{
QRegExp re("("+PREFIX+")?[0-9A-Fa-f]+");
validator = new QRegExpValidator(re, this);
@hasherezade
hasherezade / udcli.c
Last active June 2, 2016 07:39
udcli.c modified to ilustrate bug in asm_buf management
/* udis86 - udcli/udcli.c
*
* Copyright (c) 2002-2013 Vivek Thampi
* All rights reserved.
* Modified by: hasherezade (www.hasherezade.net), 2015
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
# Flags util (for .gdbinit)
# set of commands for easy manipulation on FLAGS
# CC-BY: hasherezade
define translate_flag
if $argc == 0
help translate_flag
else
set $retval = (-1)