User Tools

Site Tools


middleware:serac

Marvin Addison

marvin.jpg Application Developer

address
Andrews Information Systems Building
1700 Pratt Drive
Blacksburg, Virginia 24060

email


phone
231-7050

PeopleSearch Entry

Personal Calendar

Middleware Group Calendar

Middleware Open Source Projects on Google Code

My Documents

Tech Tidbits

Below is a collection of various technical items I've found helpful over time and wanted to document somewhere.

Java Stuff

Java tech tidbits have moved to the Java page.

tcpdump Full Packet Capture

Sometimes debugging an application problem requires looking at the data passed over the network. In those cases, we usually care only about traffic to/from a particular port that the application uses for network communication. The following tcpdump command is very helpful for capturing the entire network payload on an interface for traffic to/from a target port. The example below could be used, for example, to look at the raw HTTP data passed over the network for a Web service call.

tcpdump -X -s0 -w /path/to/capture.pcap -tt -i eth0 "host 192.168.10.1 and tcp dst port 80"

The next step would be to fire up Wireshark and load the capture.pcap file produced by tcpdump. Select the first entry in the TCP conversation, and choose “Follow TCP Stream” from the menu which will show just the data passed between network peers.

Python Sign Script for eToken

Download script file from Subversion. Requires PyKCS11 python module.

Usage

USAGE: etoken_sign.py slot_no key_id /path/to/file/to/sign

Example

etoken_sign.py 0 5907e10588430a11 "/path/to/some/file"
Getting handle to private key ID=5907e10588430a11
Signing /path/to/some/file with private key
Signature:
gfyzopZAl9+sKQHmafrTfdhqsQ2ClKjZAetCZ8tYN3P/Wl1h6ObAuetxEY7SLKgWbluo0f2VBS4A
p08MUn3kW97TFMmK1PTHHR9S7T8B62zmLLITd3Bl0j5lPUZv/fz00h3SWxzaWLzUozKMGO73FDlL
slKXWnIIwinCw1gvoOc=

eToken Runtime on Ubuntu Intrepid Ibex

The Debian package for the Aladdin eToken runtime version 4.55 has a dependency on pcscd 1.4.102 which apparently does not work on Ibex. Dave pointed out that the root problem may be libusb integration problems:

I haven't been able to get the eToken to work on 8.10, and I think it's
because there is an undefined symbol (usb_init) in one of the drivers
pcscd tries to use. Try the following:
- stop pcscd if it's running
- unplug the eToken
- start pcscd as 'pcscd -f'
- plug the eToken in
Do you see the undefined symbol? This causes pcscd to die, and the
eToken will never be seen as a result.
I haven't done much else than notice this, but I'm going to try and
compile my own pcscd to see if I can get rid of the problem. usb_init
should be in libusb…that's a pretty dire symbol to be unable to
resolve (for USB devices).”

I resolved the above problem by downgrading to pcscd 1.4.99, which does work on Ibex, and patching the DEB package to remove the pcscd dependency. Installation summary:

  1. Install pcscd 1.4.99 from source.
  2. Use dpkg -x/dpkg -e to extract the original Debian package contents.
  3. Update the control file and and remove dependency on pcscd 1.4.102.
  4. Repackage updated package contents via dpkg -b
  5. Install patched package via dpkg -i
  6. Restart

Personal

Recipes

Recipes, the first open source project:

https://www.evernote.com/pub/s3rac/food

Most of these are collected from other sources, but some are original. The gem is the guacamole, good for Superbowl parties, 4th of July, Memorial Day, Labor Day, Groundhog Day, Boxing Day, Kwanzaa, and days in between.

Funniest Slashdot Comment Ever

From an “Ask Slashdot” post on dishwashing keyboards to remove bacteria:

“Would you ever do this to your peripheral?”
Nope. But then I don't share the [seemingly] common pathological fear of bacteria that's been created in the last decade or so.

Then this gem in response:

I agree. In fact, I am internally equipped with various defenses to fight and defeat those evil bacteria. The bacteria on my keyboard was probably originally attached to me anyway.
After I use someone else's keyboard, I wash my hands. Maybe I should write an Ask Slashdot topic:
“I recently discovered it was possible to wash my hands. After looking up various hygiene-related articles (link to Wikipedia) I found out that hand-washing has been associated with greatly-lessened likelihoods of getting sick. And disease outbreaks have been shown to be limited among populations of folks who wash their hands. Finally, after I heard that Al Gore washes his hands (link to Al Gore), I started doing it myself. Has anyone else tried this? Where do you wash them? Do you live near a fast-moving river where you can wash them? I wash mine in the toilet, but I'm starting to think that's not helping as much as the online articles suggest. There are other fixtures in my bathroom, but I don't know what they do. Has anyone ever tried using these other fixtures?”
middleware/serac.txt · Last modified: 2015/06/01 12:02 (external edit)