Get XML String from JQuery XML Object

Posted: January 9th, 2012 | Author: admin | Filed under: Uncategorized | Tags: , , | No Comments »

Problem: You have an XML structure in a JQuery object and now you want to extract a string with the raw xml.
Solution: Use the XMLSerializer class. This class provides methods for serializing DOMs and nodes into text or byte streams. In our case, we will call the serializeToString(data) method:

new XMLSerializer().serializeToString(xmlDoc);

Computer Forensics

Posted: December 30th, 2011 | Author: admin | Filed under: Linux, Uncategorized, Windows | Tags: | No Comments »

The tools I use for computer forensics.

Windows

  • Recuva – Excellent at recovering data from Windows partitions and free to boot.
  • UFS Explorer – Not free, but is able to recover from linux partitions (Recuva is better for FAT/NTFS)
  • explore2fs – Access linux partitions from Windows. Free.
  • HFSExplorer – Access Mac partitions from Windows

Linux

  • Hiren’s Boot CD – Contains an impressive lineup of programs for computer forensics, but its legal status is often debated.
  • Trinity Rescue Kit – A live distro with backup programs, Midnight Commander, testdisk, shell and other good stuff. Legal!

Non-ASCII chars in Java

Posted: November 29th, 2010 | Author: admin | Filed under: Uncategorized | Tags: , | No Comments »

If you are having problems with non-ASCII characters (for example the Danish æ, ø and å) not showing up correctly in your Java application, try giving the Java VM the following argument:

-Dfile.encoding=UTF-8

You can verify that the charset has been set with this statement:

Charset.defaultCharset();

Slow access to shared network folder from VM

Posted: August 5th, 2010 | Author: admin | Filed under: Uncategorized | No Comments »

After changing the network adapter type on a VMware virtual machine from NAT to bridged, the transfer speed from shared network folders dropped to about 25 kb/s and browsing shared folders was really sluggish. The network folder was located on the host machine, which was running Windows 7 Searching the VMware knowledge base resulted in the following article. I can confirm that the proposed solution also applies to Windows 7:

Performance issues with bridged networking on Windows Server 2003 and Windows 2008 host operating systems

In short: Use regedit to navigate to the following place:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Then create a DWORD key named DisableTaskOffload and give it ‘1′ as value. TCP task offloading means distributing calculations concerning the network communication to the network card, so creating this registry key means that all these calculations will be done on the CPU.
Microsoft Virtual Server seems to be susceptible to the same problem and offers the same solution along with two others: Slow performance when you try to access resources on your Virtual Server 2005 host computer from a guest virtual machine