Mr. Pig’s House of Bacon

February 16, 2008

WhippingBot – Update

Filed under: Linux, My Programs — Mr. Pig @ 7:23 pm

Well, I was less lazy than I originally thought I’d be and I added scripting support. It’s not done YET but I’m making progress. This is the userscript.py file (must be called that; directory can be changed via the bot’s settings file); it contains the bot command “HelloWorld” so if I typed “@HelloWorld” (@ being the bot prefix) it would return in a Private Message or in the channel “MY_NICK: Hello World; this was coded with Python scripting!”:

# Python Functions for Mr. Pig’s IRC Bot
# Python Scripting Interface (Actual
# Functions)
# ————————————–
# Code the function, have it return a
# value. Value returned will be sent to
# channel/user.
# ————————————–
# Functions prefixes:
# mpCmd_All_NAME() – Both Private Msg and Channel
# mpCmd_Priv_NAME() – Private Msg ONLY
# mpCmd_Chan_NAME() – Channel Msg ONLY
# ————————————–

# Import C++ to Python Interface and related functions
import MPIRC_INTERFACE
from MPIRC_INTERFACE import *

def mpCmd_All_HelloWorld(sData):

sCaller = MPIRC_INTERFACE.mpirc_getCallerNick(sData)
return sCaller + “: Hello World; this was coded with Python scripting!”

All you need to do to add a new function is add a new function define! Maybe I’ll get around to releasing it…

More info here.

February 12, 2008

WhippingBot – FreeNode IRC Bot

Filed under: Linux, My Programs — Mr. Pig @ 4:54 pm

In order to remind myself of all the Linux API’s and create a decent program to use for the testing of some networking classes I had to code, I developed an IRC bot in C++ for Linux. I kinda got carried away with the original purpose as just testing and added some cool useless functions to the bot. Beyond the fact that I can remotely control him, he supports the following commands:

@spell word – Checks spelling using aspell API

@define word – Defines a word via google

@defineUrban word – Defines a word via UrbanDictionary

@speak topic – Quotes something; unless you know the topics don’t enter one

@time – Tells you the time in EST

He’ll respond to those in a channel or in a private message (both require the commands to be prefixed with @). Within irc.freenode.net you can message him with a nick of WhippingBot. If you want him in your channel message me with a nick of Mr_Pig and I’ll add him to your channel.

He’s rather useless but fun to mess around with.

Depending how lazy I am I may add scripting support so more commands can be scripted in. If this happens I may release him (source and all). This remains to be seen.

(Currently Executing Release: 0.2.0)

February 7, 2008

Merc Zboard “Driver” Version 0.2.0

Filed under: Linux, My Programs — Mr. Pig @ 1:38 pm

Small update to my “driver” for the MERC Zboard on Linux. Updated due to some changes requested by “Craig”.
READ THE README – and anything the shell scripts say.

Changelog:

==============================================
Zboard Config Changelog
Copyright (C) 2007 Matt Razza
==============================================

Version 0.1.1 – Version 0.2.0

Added:
-Added support for -f
-Added a new settings file (zboard-sys.conf)
-Added support for “loadkeys” and not xmodmap

Changed:
-Verbose error reporting off by default

Fixed:

Removed:

Download Source (tar.bz2) MD5: 39cde7a58e40847abf1c8cb6b159dd7b

Gentoo ebuild (provided by Ken (changed file name – which should make it use 0.2.0)).

License

November 19, 2007

Broadcast to Unicast Translator

Filed under: Linux, My Programs — Mr. Pig @ 8:34 pm

I made a broadcast to unicast translator (UDP) so me and my friends can play C and C 3 (one of my pals is on Linux). It can be used for a bunch of stuff (like getting people to show up in the network browser for C and C 3/Generals on Linux; as well as generic packet forwarding).
The read-me explains the settings needed to play C and C 3 over a network with a Linux computer. Other games may require some basic scanning from a packet sniffer (I recommend Wireshark) to determine the target packet size (otherwise you may be sending overflows to the target; not fun).

Current Version: 1.1.2 (Released on 11/25/07 @ 13:10 EST/EDT)

Supports:

  • More than one unicast target
  • File exec
  • Per-target port setting
  • Expected packet size filtering
  • Allow/Disallow Broadcast to Unicast Overlap (Allow/Disallow resending of broadcasts back to broadcaster)

What’s to come:

  • Packet header editing; IP Spoofing – Unicast looks like it came from broadcaster
  • Full IPv4 Packet Support (TCP, ICMP, etc; currently only supports UDP)

Download latest stable version: Here

Feel free to leave comments/source code requests.

April 10, 2007

Merc Zboard “Driver” Version 0.1.1

Filed under: Linux, My Programs — Mr. Pig @ 5:35 pm

NEW VERSION FOUND – HERE

Small update to my “driver” for the MERC Zboard on Linux.

READ THE README – and anything the shell scripts say.

Changelog:

==============================================
Zboard Config Changelog
Copyright (C) 2007 Matt Razza
==============================================

Version 0.1.0 – Version 0.1.1

Added:
-”status” command
-”checkZboard” command
-Added ability to remove existing maps to keys
-Added Zboard Compatibility tester

Changed:

Fixed:
-Changed all references of “Zboard config” to “Zboard Config”

Removed:

Download Source (tar.bz2) MD5: 557bb8594795f70cd0210a21ac8e0edc

Gentoo ebuild (provided by Ken).

License

April 2, 2007

MERC zBoard “Driver” Finished

Filed under: Linux, My Programs — Mr. Pig @ 1:30 pm

This version is now deprecated; please visit this post.
Well, I finished my hacked together linux version of the zEngine. It’s command line only and should be pretty easy to use. I haven’t been able to test it too much, but it should work. I decided there was no point to an eBuild or Makefile so I included two small shell scripts you can run. READ THE README – and anything the shell scripts say.

Download Source (tar.bz2) MD5: 115b0a3e150d048b43bcfbfaa0276f05

License

April 1, 2007

MERC zBoard “Driver” Update

Filed under: Linux, My Programs — Mr. Pig @ 3:11 pm

In order to get the MERC zBoard to detect running games and other applications (non-default) you are going to need to load a “custom” config file. The file structure is simple, it’s just “appName=settingsFile”. The settings file will be a xModMap readable file that my program will load when it detects the app running.

There is a possibility that you could crash the “driver” if you were to run two applications it can detect at once. In order to get around this problem I think I am going to have it only apply the settings for the first one executed (the one with the smaller PID).

March 28, 2007

MERC zBoard “Driver”

Filed under: Linux, My Programs — Mr. Pig @ 2:16 pm

No, I’m not making a “driver” so to speak – however I am working on a problem to manage xModMap for the MERC zBoard. It will detect programs running and change the settings accordingly (based of some standard profiles you can change). Once I get it functional I may just make it an xModMap manager and not only for the zBoard. It’s about 2/3 done at the moment but I havn’t had much time to work on it (about three hours) so we’ll see. It is a pain, however, to learn the Linux API for C++; it’s like learning C++ all over again.

March 25, 2007

Zboard on Linux

Filed under: Linux — Mr. Pig @ 5:04 pm

I’ve been working on getting my MERC Zboard functional on my linux install. Track my progress here and here.