Skip to content

Instantly share code, notes, and snippets.

View isra17's full-sized avatar

Israël Hallé isra17

View GitHub Profile
import socket
import os, sys
HOST = ''
PORT = 50006
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
var keys = openpgp.keyring.privateKeys;
var lastKey = keys.length > 0?
keys[keys.length - 1]: null;
if(lastKey) {
var pubKey = lastKey.obj.extractPublicKey();
var keyName = lastKey.obj.userIds.length > 0? lastKey.obj.userIds[0].text: 'Unnamed key';
$('#homeSpan .key-name').text(keyName);
$('#homeSpan .pub-key').text(pubKey);
}
import socket
HOST = '10.6.8.205' # The remote host
PORT = 4242 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
buf = '\xAA' * 56 + '\x10\x11\x40\x00' + '\x00' * 4 + '\x00\x00\x02\xFF'
#buf = '\xAA' * 56 + '\x00\x40\x11\x10' + ''
s.sendall(buf)
data = s.recv(4092)
@isra17
isra17 / cucumber_result.json
Created November 1, 2012 18:09
Json result from cucumber tests
[
{
"id":"Navigation",
"name":"Navigation",
"description":"In order to access all feature in SPD\nAs a SPD user\nI want to navigate through the sections",
"line":1,
"keyword":"Feature",
"uri":"(feature)",
"elements":[
{