Skip to content

Instantly share code, notes, and snippets.

@roninhack
roninhack / devices.c
Created August 20, 2018 03:07 — forked from courtneyfaulkner/devices.c
List OpenCL platforms and devices
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
int main() {
@roninhack
roninhack / _README.md
Created August 14, 2018 16:17 — forked from mauriciopoppe/_README.md
Generic Makefile example for a C++ project
@roninhack
roninhack / Main.java
Created August 2, 2018 17:24 — forked from psqq/Main.java
[Java] File encrypt/decrypt with AES 128
package ru.psqq;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.*;
import java.security.Key;
import java.security.MessageDigest;
import java.util.Base64;
@roninhack
roninhack / review.md
Created August 1, 2018 15:09 — forked from doctorevil/review.md
NXT Crypto Review of Curve25519.java & Crypto.java

Crypto Review of Curve25519.java & Crypto.java

By DoctorEvil on Nextcoin.org

Sponsored by MSIN on BitcoinTalk.org

TL;DR

NXT's Crypto.java and Curve25519.java look kosher aside from a signing bug that is currently being worked around.

General Methodology

@roninhack
roninhack / gist:7a0b278d87c10ed05ea8ed27d6e28c90
Created July 21, 2018 14:18 — forked from asinbow/gist:3329926
nodejs socket programming
// server
var net = require('net');
var HOST = '127.0.0.1';
var PORT = 6969;
// Create a server instance, and chain the listen function to it
// The function passed to net.createServer() becomes the event handler for the 'connection' event
// The sock object the callback function receives UNIQUE for each connection
net.createServer(function(sock) {
@roninhack
roninhack / smtp.js
Created July 21, 2018 14:18 — forked from btoews/smtp.js
node.js SMTP Server
/*
smtpd.js is SMTP server written for node.js
#Changes#
-made to work with 0.6.2 (replaced sys.print with console.log)
-a few bug fixes
sudo node smtpd.js
@roninhack
roninhack / smtpvrfy.py
Created July 21, 2018 13:15 — forked from mgeeky/smtpvrfy.py
SMTP VRFY python tool intended to check whether SMTP server is leaking usernames.
#!/usr/bin/python
#
# Simple script intended to abuse SMTP server's VRFY command to leak
# usernames having accounts registered within it.
#
# Mariusz B., 2016
#
import socket
import sys
# create sdk folder
export ANDROID_HOME=/opt/android-sdk-linux
sudo mkdir -p $ANDROID_HOME
# install openjdk
sudo apt-get install openjdk-8-jdk
# download android sdk
cd $ANDROID_HOME
sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jre
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
@roninhack
roninhack / audio_io.py
Created May 9, 2018 19:19
Removing known ambient music from a recording to enhance ambient sounds.
#!/usr/bin/python2.6
#
# Author: Olivier Gillet ([email protected])
"""Class and functions to read and write numpy array from and to audio files."""
import copy
import logging
import numpy
import struct