This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-dcc | |
type SERVER | |
addr 1209280125 | |
sock 6 | |
port 6667 | |
nick (server) | |
host ca.us.irc.xzibition.com | |
+dcc | |
-sock | |
sock 6 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String String::subst(HashTable<String, String> hashes) const { | |
String newStr(*this); | |
Array<String> keys(hashes.keys()); | |
Array<String> values(hashes.values()); | |
for (size_t i = 0; i < keys.length(); ++i) { | |
const String key(keys[i]), value(values[i]); | |
//::printf("%s -> %s\n", key.c_str(), value.c_str()); | |
newStr = newStr.sub(key, value); | |
} | |
return newStr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************************************/ | |
/* */ | |
/* Estella Mystagic */ | |
/* */ | |
/**************************************************************************************************/ | |
// albino squirrel v2.1 freebsd 8.x (http://www.mystagic.com/albino_squirrel.png) | |
// syscall hooks on chmod,fchmod,lchmod,fchmodat to prevent modifing sticky,setgid,setuid on | |
// files/links or directories while in securelevel one or higher. | |
// | |
// sysctl mibs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TCL is being loaded dynamically - so the binary size won't blow up due to this. Also planning on python, perl, php, ruby, javascript. Hopefully all of those will play along well. | |
> grep -n Tcl_Eval src/main.c | |
792: Tcl_Eval(interp, "puts \"[subst -nocommands {[info nameofexecutable] [info tclversion] [info library]}]:\""); | |
793: Tcl_Eval(interp, "puts \"[info nameofexecutable] [info tclversion] [info library]\""); | |
> make | |
... | |
> ldd wraith |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScriptInterpTCL tcl_script; | |
tcl_script.init(); | |
String x("54321"); | |
tcl_script.linkVar("x", x); | |
// Test Getting var from C++ | |
CPPUNIT_ASSERT_STRING_EQUAL(x, tcl_script.eval("set x")); | |
x = "test 1 2 3 4 5 "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KMOD = hello_world | |
SRCS = hello_world.c | |
.include <bsd.kmod.mk> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# ./ident.rb HOST PORT | |
# Get the username of the remote port | |
require 'socket' | |
require 'timeout' | |
hostname = ARGV[0] | |
port = ARGV[1] | |
timeout_interval = ARGV[2] || 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Mostly copied from http://docs.python.org/library/socketserver.html | |
import SocketServer, socket | |
class MyTCPHandler(SocketServer.BaseRequestHandler): | |
def handle(self): | |
self.data = self.rfile.readline().strip() | |
print "Received from %s: %s" % (self.client_address[0], self.data) | |
self.request.send(self.data + ":USERID:UNIX:cutie578\r\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: | |
Makefile | 3 ++- | |
w.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- | |
2 files changed, 46 insertions(+), 5 deletions(-) | |
---- | |
Files modified: | |
commit dbbd24c73757c764d38ca8cb4cefcb0b08e40b16 | |
Author: Bryan Drewery <[email protected]> |