Skip to content

Instantly share code, notes, and snippets.

View slayerlab's full-sized avatar
🐞

Slayer slayerlab

🐞
View GitHub Profile
@slayerlab
slayerlab / edbck.py
Last active May 12, 2016 05:04
Ferramenta quem faz checagem dos últimos exploits postados no Exploit-DB.
#!/usr/bin/env python
#coding: utf-8
'''
Ferramenta quem faz checagem dos últimos exploits postados no Exploit-DB.
Developed by: Leonardo Sena
a.k.a Slayer Owner | sl4y3r 0wn3r
http://slayerowner.blogspot.com.br/2014/08/python3-xml-parse-usando-minidom.html
'''
import re, urllib.request
from xml.dom.minidom import parseString
@slayerlab
slayerlab / solved.txt.s
Last active August 29, 2015 14:21
overthewire.org / Leviathan - Solved (http://overthewire.org/wargames/leviathan/)
LEVEL 0
leviathan.labs.overthewire.org
Username: leviathan0
Passowrd: leviathan0
leviathan0@melinda:~/.backup$ cat bookmarks.html | grep pass
<DT><A HREF="http://leviathan.labs.overthewire.org/passwordus.html | This will be fixed later, the password for leviathan1 is rioGegei8m" ADD_DATE="1155384634" LAST_CHARSET="ISO-8859-1" ID="rdf:#$2wIU71">password to leviathan1</A>
leviathan0@melinda:~/.backup$
@slayerlab
slayerlab / xor_encryption.c
Last active October 4, 2015 20:52
Simulator - XOR Encryption / Decryption
/***********************************************************************************
* Developed by: SLAYER OWNER | sl4y3r 0wn3r
*
* This is a simple script for simulator XOR Encryption/Decryption
* and for being an "simple script", remember that I not responsible
* any lack of security ;)
*
* For more information, read this:
* https://slayerowner.blogspot.com.br/2015/08/xor-cipher-playin-in-morning.html
*
@slayerlab
slayerlab / check_exploit.c
Last active April 16, 2018 03:03
Check the most recent post in exploit-db.com in just one click! :) see below about dependencies and compilation.
/***
* toolname: check_exploit.c
* synopsis: Check the most recent post in Exploit-DB parsing an rss.xml
* using LibXML2
* purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file
* validating the content in the process and activating options
* like entities substitution, and DTD attributes defaulting.
* (Note that the XMLReader functions require libxml2 version later
* than 2.6.) -- just for education coding.
* usage: check_exploit.c <filename>
@slayerlab
slayerlab / rssxml_reader.c
Last active April 16, 2018 02:31
[C] Parsing and Validate XML file for dump all content contained on nodes. (see below about dependencies and exec)
/***
* toolname: RSS.xml Reader
* synopsis: Parsing and Validate all content contained on RSS.xml
* using libXML2
* purpose: Show how use the function xmlReaderforFile() -, just
* for education coding
* author: sl4y3r_0wn3r | slayer owner
* compile: gcc -o <output> -Werror -Wall <source.c> $(xml2-config --libs --cflags) -Winline
* preview: http://i.imgur.com/EleRdUI.png
***/
@slayerlab
slayerlab / exploit-db.c
Created July 13, 2016 21:16
exploit-db rss reader - education purpose
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
typedef struct
{
xmlChar *name; /* exploit title */
xmlChar *link; /* exploit link */
@slayerlab
slayerlab / check_node.c
Last active April 16, 2018 02:54
NodeChecker -- { pick Element names }; // fixing wierd syntaxes.
/* vim: set et sw=2 ts=2 : */
#include <stdio.h>
#include <stdlib.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
__attribute__ ((noinline, noreturn))
void print_usage(const char *);
static void PrintElementNames(xmlNode *node)
@slayerlab
slayerlab / notes_libxml2
Last active June 26, 2018 16:42
libxml2 personal notes
root@research:~/dev# cat main.c
#include <stdio.h>
#include <libxml/parser.h>
int main(int argc, char *argv[])
{
xmlDocPtr doc;
xmlNodePtr node;
/* read xmlfile */
@slayerlab
slayerlab / libxml2_doc-p1.md
Last active April 16, 2018 02:44
[unofficial] libxml2 Retrieve Elements through by reading file, in C – part 1 of 2 - written by @SLAYEROWNER

###1 - Tipos de dados

xmlChar é um tipo unsigned char para tratar strings com formato UTF-16. Neste caso, o arquivo XML deve estar no encoding UTF-8 (char) ou UTF-16 (unsigned char). Se a declaração do encode não estiver presente, o xmlChar automaticamente irá converter o arquivo para UTF-8!

xmlDoc é uma estrutura que irá armazenar as informações da tree, por exemplo: filename, children, last child, parent, next node, previous node, xml version, encoding, URL, namespace e etc. É uma variedade de informações analisadas e

@slayerlab
slayerlab / up.sh
Created October 11, 2016 21:50
fix the broken packages
#!/bin/bash
# Fix the broken packages
for package in $(cat broken_pkg | cut -d"'" -f2);
do apt-get install --reinstall "$package" -y;
done