Archive

Archive for the ‘Uncategorized’ Category

Python: Porting a C extension from Python 2 to Python 3.

May 13, 2012 Comments off

Several of Python’s internal API’s were removed from Python3.  PyString_* has been replaced with PyUnicode_* and PyByte_*.  PyInt_* has been replaced with PyLong_*.   Several other internal structures have changed including the Module definition.

The following link describes mechanisms for building a C extension against both Python 2 and Python 3:

http://python3porting.com/cextensions.html

Categories: Uncategorized

Taking apart the Energizer Trojan

March 30, 2010 Comments off

A fascinating article on the disassembly of the Energizer Trojan.

http://www.skullsecurity.org/blog/?p=627

Categories: Uncategorized

Manually selecting a default gateway

March 29, 2010 Comments off

Do you have two or more Ethernet adapters in your machine and find that the wrong one is being selected when routing to the Internet or elsewhere?

When using multiple Ethernet adapters, with default IP gateway’s defined for each adapter, the OS may choose a default route that you don’t wish to use. 

A quick fix for this is to ensure that only one adapter has a Default gateway defined.  However; if modifying the default gateway definitions isn’t possible, you’ll need to adjust the metric that is associated with the adapter that you wish to use.

Windows:

To view the current routes in use, from the Windows cmd prompt:

> route print

To assign a manual metric for your preferred adapter:

Vista:

  1. Control Panel –> Network and Internet –> Network and Sharing Center –> Manage network connections.
  2. Right click on the adapter to adjust and select Properties.
  3. Click on Internet Protocol Version 4 (TCP/IPv4) and select Properties button.
  4. Click the Advanced button.
  5. Un-check the “Automatic metric” check box and enter a new Interface metric value.  Lower metric values are given preference.
  6. Press OK.

Linux (Debian/Ubuntu)

To view the current routines in use and to list the metric for each available adapter, from a Linux command shell:

$ route
$ ifconfig

To assign a manual metric for your preferred adapter:

  1. Edit /etc/network/interfaces
  2. Add a metric definition for your preferred network adapter.
  3. See man interfaces for more info.

Reference:

Categories: Uncategorized

List the UDP Ports that are open per application

March 17, 2010 Comments off

Windows:

> netstat –a –o

Linux:

# netstat –a -p

Categories: Uncategorized

Systemantics

March 1, 2010 Comments off

Back in April 2008, Raymond briefly covered the book Systemantics: How Systems Work and Especially How They Fail.

… Le Chatelier’s Principle for complex systems ("Every complex system resists its proper functioning") and the Fundamental Failure-Mode Theorem ("Every complex system is operating in an error mode").

References:

Categories: Uncategorized

Password Managers

November 12, 2009 Comments off

Slashdot has a discussion today on tools that can be used to safely maintain a large list of passwords.  If my current method becomes unwieldy at some point in the future I’ll be further investigating some of the suggestions:

References:

    Categories: Uncategorized