Skip to content

Instantly share code, notes, and snippets.

@xnyhps
xnyhps / gist:33f7de50cf91a70acf93
Created July 4, 2014 14:29
mod_onions: Install instructions on Debian
# Add the Prosody repository, because we want the latest version
echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
sudo apt-get update
# Install tor and prosody, and lua-bitop, which is required for mod_onions
sudo apt-get install prosody tor lua-bitop
# Prepare the directories where Tor will store the hidden service's private key
-(void)selectionDidChange:(NSNotification *)notification {
WebView *view = [notification object];
[view copy:self];
}
-(void)installPlugin {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(selectionDidChange:)
name:@"WebViewDidChangeSelectionNotification"
object:nil];
func replicate<C : ExtensibleCollectionType>(s:Int, x:C) -> C {
var ret : C = C()
for element in x {
for i in 1...s {
ret.append(element)
}
}
return ret
@xnyhps
xnyhps / tor-prosody.py
Created August 26, 2015 11:32
Proof-of-concept script to create ephemeral XMPP servers with Prosody. Not very well tested, use at your own risk.
import stem.control
import time
import socket
import os
telnet = socket.create_connection(("localhost", 5582))
assert(telnet != None)
print(" * Connected to Prosody telnet interface.")