Skip to content

Instantly share code, notes, and snippets.

View Makefile Patch
diff --git a/Makefile b/Makefile
index b460553..7dbb3a1 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ all: reference
OBJS= crypto_scrypt-nosse.o sha256.o crypto_scrypt-hexconvert.o crypto-mcf.o b6
libscrypt.so.0: $(OBJS)
- $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 -lc -lm $(OBJS)
+ $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc
View gist:10365254
diff --git a/crypto-scrypt-saltgen.c b/crypto-scrypt-saltgen.c
index 08435f8..3933117 100644
--- a/crypto-scrypt-saltgen.c
+++ b/crypto-scrypt-saltgen.c
@@ -8,7 +8,7 @@
int libscrypt_salt_gen(uint8_t *salt, size_t len)
{
unsigned char buf[len];
- int data_read = 0;
+ size_t data_read = 0;
View gist:7759443b328d4bc7dc1e
$more xortime.rb
#!/usr/bin/env ruby
#technion@lolware.net
require 'absolute_time'
ITER = 100000000
i = 1
View gist:e247be27f8c9dbf26c7e
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void not_vulnerable(char *s) {
char buf[1024];
int size = sizeof s;
printf("Detected size was %d\n", size);
if (size > 1024) {
exit(1);
View Check file for changes
#!/usr/bin/env ruby
# technion@lolware.net
require 'openssl'
require 'json'
# Alter the below to contain name of file to monitor
Check_File = 'testfile'
# Call a mail function here if desired
View gist:5322442ef4298755b90b
/* Example socket code - find a free port
* technion@lolware.net
* 10/2/2015
* Example only - not production tested
*/
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
View gist:75f1b4578f2ab61b4b47
#!/usr/bin/perl -w
#Identifies all SSL certificates on a cpanel server and expiry
use String::ShellQuote;
use strict;
sub fileparse($);
my @files = </home/*/ssl/certs/*.crt>;
View Cowboy -echo_get
$ curl -i "http://localhost:8089/?testing"
HTTP/1.1 500 Internal Server Error
connection: keep-alive
server: Cowboy
date: Thu, 30 Jul 2015 09:57:55 GMT
content-length: 0
At the console:
Eshell V7.0 (abort with ^G)
View gist:b4eac8ba7b08a677a21d
diff --git a/lib/acme/client.rb b/lib/acme/client.rb
index 52d9add..04e1f0a 100644
--- a/lib/acme/client.rb
+++ b/lib/acme/client.rb
@@ -49,18 +49,9 @@ class Acme::Client
end
def load_directory!
- @operation_endpoints = if @directory_uri
- response = connection.get(@directory_uri)
View instagram regex
def instacheck(name)
unless /[a-z0-9._]{,30}/.match(name)
return false
end
if /\.\./.match(name)
return false
end