<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Primate Tools</title>
	<link>http://www.phpsolvent.com/PrimateTools</link>
	<description></description>
	<pubDate>Sat, 22 Dec 2007 05:32:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>linux command of the day ssh-keygen</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=22</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=22#comments</comments>
		<pubDate>Tue, 17 Jul 2007 21:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=22</guid>
		<description><![CDATA[The purpose of this command is to create public/private ssh key pairs.  The public key generated locally can then be uploaded to a remote host and added to the &#8220;authorized_keys&#8221; file.   ( Install openssh first.)
mistakes I&#8217;ve made:

When I first tried this, I thought I was supposed to run ssh-keygen on the remote [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this command is to create public/private ssh key pairs.  The public key generated locally can then be uploaded to a remote host and added to the &#8220;authorized_keys&#8221; file.   (<a href="http://www.openssh.com/"> Install openssh first.</a>)</p>
<p><strong>mistakes I&#8217;ve made:</strong></p>
<ul>
<li>When I first tried this, I thought I was supposed to run ssh-keygen on the remote host. You can run it anywhere, actually.  Run this command locally and then upload the public key (*.pub) portion to the remote host.  Or, run it on the remote host and download the private portion to the client.</li>
<li>When using a Windows client to connect to a linux server, use ssh-keygen instead of puttygen.  This is how I got around the &#8220;server refused our key&#8221; frustration.  <a href="http://www.andremolnar.com/how_to_set_up_ssh_keys_with_putty_and_not_get_server_refused_our_key">Read this excellent post for more info.</a>
</li>
<li>The most common mistake I make is that I might be &#8220;jsmith&#8221; on the remote host and root on the local machine.  So, when I do keygen on the local machine, it creates a public key for root that won&#8217;t work when trying to authenticate as jsmith.<br />
to get around this, make sure you are running the ssh-keygen command as the user that will be authenticating to the remote host.</li>
<li>If I replace authorized_keys with my new public key string, then I&#8217;ve blown away any ssh connections for my other machines that depend on connections to this remote host.  authorized_keys can hold many public keys.</li>
<li>Even though every ssh site warns about this, I still forget to make sure permissions on the remote host for .ssh directory and the authorized_keys file are set correctly.  ( <code>chmod 600 .ssh</code>   and <code>chmod 700 .ssh/authorized_keys</code> )  </li>
<li>I could not get the rsa1 key type to work. RSA1 is used by the SSH 1 protocol only, and everything these days is SSH 2</li>
</ul>
<p>If you do not specify the filename for the keys, the command asks you for a filename and makes a default called id_dsa and id_dsa.pub  (or id_rsa and id_rsa.pub if using rsa) in /home/jsmith/.ssh/ if you do not give one.  These defaults work just fine.<br />
to give it your own name and save it right to the directory you are working in:<br />
 <code>ssh-keygen -t rsa -f mykey</code><br />
to give it your own name and save it somewhere else:<br />
 <code>ssh-keygen -t rsa -f /home/jsmith/mykey</code><br />
the -t option is required. The choices are rsa and dsa.</p>
<p>After this command is issued, the program will ask you for a pass phrase.  Leave it blank if you need programs that use these keys to not use password / passphrase authentication and the mere presence of the private key file is enough to allow access.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=22</wfw:commentRss>
		</item>
		<item>
		<title>Linux Command of the day: dmesg</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=18</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=18#comments</comments>
		<pubDate>Wed, 27 Jun 2007 17:11:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=18</guid>
		<description><![CDATA[I&#8217;ve been wanting to review the boot messages that fly by when linux is booting.  I found that the command dmesg does just this. and to load it into a file, of course, do dmesg > bootmessages.txt
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to review the boot messages that fly by when linux is booting.  I found that the command dmesg does just this. and to load it into a file, of course, do dmesg > bootmessages.txt</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=18</wfw:commentRss>
		</item>
		<item>
		<title>Metasploit notes</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=14</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=14#comments</comments>
		<pubDate>Wed, 06 Jun 2007 21:01:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[metasploit]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=14</guid>
		<description><![CDATA[
Even though the release stays at 3.0, there are many builds with bug fixes and other important updates.  To get these, run &#8220;Online Update&#8221;.  Update:  I just realized that Online Update isn&#8217;t used anymore&#8230;To get the latest updates, use SVN
In setting up db_autopwn, I initially used a postgres database with ASCII encoding. [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Even though the release stays at 3.0, there are many builds with bug fixes and other important updates.  To get these, run &#8220;Online Update&#8221;.  Update:  I just realized that Online Update isn&#8217;t used anymore&#8230;To get the latest updates, use SVN</li>
<li>In setting up db_autopwn, I initially used a postgres database with ASCII encoding.  This apparently caused some errors that went away when I used a new database with UTF8 encoding</li>
<li>db_create <i>args</i> did not work for me, so I grabbed the postgres.sql out of the data directory of my Windows installation and ran that SQL directly in a postgres client.  That seemed to work
</li>
<li>When running db_autopwn, I still get the following error:<br />
<blockquote> An error occurred in the console reader: SyntaxError: missing } in XML expression </p></blockquote>
</li>
<li>Debugging the metasploit code:  You can edit the *.rb files to print out values of variables ( print_status(&#8221;I am a debug statement&#8221;)  will output messages to the metasploit console)
<li> you can also create a Logger very similar to the Log4J:<br />
put <code><br />
MSF_LOGGER = Logger.new("#{RAILS_ROOT}/log/msf.log")<br />
MSF_LOGGER.level = Logger::DEBUG<br />
 </code> in environment.rb</p>
<p>and then anywhere you want to log some messages, put a line like MSF_LOGGER.debug(&#8221;hello from ruby&#8221;)<br />
<a href="http://forums.site5.com/showthread.php?t=8163">as described here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>Install metasploit on Suse</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=13</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=13#comments</comments>
		<pubDate>Mon, 21 May 2007 18:24:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[metasploit]]></category>

		<category><![CDATA[suse]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=13</guid>
		<description><![CDATA[This is version 10.0 of suse.

 get ruby rpm.  I got my version here.
verify ruby install by typing ruby -version at the command line
get rubygems rpm (I got mine here)
at command line type gem install -v=1.2.2 rails -y   (must first su to root to do this)
download metasploit.
navigate to directory where you saved [...]]]></description>
			<content:encoded><![CDATA[<p>This is version 10.0 of suse.</p>
<ol>
<li> get ruby rpm.  <a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=ruby&amp;submit=Search+..." target="_blank">I got my version here.</a></li>
<li>verify ruby install by typing <code>ruby -version</code> at the command line</li>
<li>get rubygems rpm (<a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=rubygems&amp;submit=Search+...">I got mine here)</a></li>
<li>at command line type <code>gem install -v=1.2.2 rails -y </code>  (must first su to root to do this)</li>
<li>download metasploit.</li>
<li>navigate to directory where you saved framework 3.0 and extract it</li>
<li>navigate to framework-3.0 directory and type <code>./msfweb</code></li>
<li>point your browser at http://127.0.0.1:55555 and you will see metasploit web interface!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=13</wfw:commentRss>
		</item>
		<item>
		<title>using FOP 0.93 with ofbiz</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=12</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=12#comments</comments>
		<pubDate>Thu, 26 Apr 2007 16:54:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ofbiz]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=12</guid>
		<description><![CDATA[we had a number of changes to use the most recent FOP (0.93) version with OFBIZ:

 image size needs to be defined in template files (xxxx.fo.ftl) as content-height=&#8221;60mm&#8221;. Previously we had height=&#8221;60mm&#8221;. This syntax no longer works. We now need content-height=&#8221;60mm&#8221;
 in controller.xml , the proper FOP handler is now org.ofbiz.webapp.view.ScreenFopViewHandler
 to use ScreenFopViewHandler, the [...]]]></description>
			<content:encoded><![CDATA[<p>we had a number of changes to use the most recent FOP (0.93) version with OFBIZ:</p>
<ol>
<li> image size needs to be defined in template files (xxxx.fo.ftl) as content-height=&#8221;60mm&#8221;. Previously we had height=&#8221;60mm&#8221;. This syntax no longer works. We now need content-height=&#8221;60mm&#8221;</li>
<li> in controller.xml , the proper FOP handler is now org.ofbiz.webapp.view.ScreenFopViewHandler</li>
<li> to use ScreenFopViewHandler, the content type must be defined when calling this handler from the view-map tag: content-type=&#8221;application/pdf&#8221;</li>
<li> also in the view-map tag, the encoding attribute should be set to &#8220;none&#8221; : <span style="font-family: monospace">encoding=&#8221;none&#8221;</span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=12</wfw:commentRss>
		</item>
		<item>
		<title>unsupported major.minor version</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=4</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=4#comments</comments>
		<pubDate>Tue, 13 Mar 2007 20:44:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ant]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=4</guid>
		<description><![CDATA[This means that you compiled your code with one JVM and are trying to run it with a different one.  Either:

change the version that is compiling your code
change the version that is running your code

In my case, my code was compiled in Eclipse for Java 1.5 and I was trying to run it with [...]]]></description>
			<content:encoded><![CDATA[<p>This means that you compiled your code with one JVM and are trying to run it with a different one.  Either:</p>
<ul>
<li>change the version that is compiling your code</li>
<li>change the version that is running your code</li>
</ul>
<p>In my case, my code was compiled in Eclipse for Java 1.5 and I was trying to run it with 4.1 JVM<br />
So pointing JAVA_HOME to the location of the 1.5 jdk directory should fix that problem.  In my case:<br />
<code><br />
export JAVA_HOME=/usr/bin/jdk1.5.0_11<br />
</code><br />
For a great summary of java version issues, take a look at this article about <a href="http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version.html">&#8220;what version is your java code?&#8221; </a></p>
<p>How you can check which version your .class file has been compiled for:  You can open up a .class file with a hex editor (you can use Textpad or the ehep hex editor plugin for eclipse) to see which major.minor version the class was compiled with. In hex format, a class file will begin with:<code><br />
</code></p>
<p><code> 0x CA FE BA BE 00 00 00 2E</code><br />
you have to convert the last byte, 2E, to decimal (=46)</p>
<p>According to the secret chart, this puts it at Java 3.1 compliance</p>
<p><code>0x CA FE BA BE 00 00 00 31</code><br />
31 converts to 49 in decimal and that means Java version 1.5 compliance</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=4</wfw:commentRss>
		</item>
		<item>
		<title>Beginning</title>
		<link>http://www.phpsolvent.com/PrimateTools/?p=3</link>
		<comments>http://www.phpsolvent.com/PrimateTools/?p=3#comments</comments>
		<pubDate>Tue, 13 Mar 2007 04:12:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.phpsolvent.com/PrimateTools/?p=3</guid>
		<description><![CDATA[I recently quit writing about Information Technology on my other blog because it was boring half my readers to death.   I&#8217;ll use this blog to write about the software tools and languages I use and to keep track of my projects and what I&#8217;ve learned.
]]></description>
			<content:encoded><![CDATA[<p>I recently quit writing about Information Technology on my <a href="http://www.phpsolvent.com/wordpress">other blog</a> because it was boring half my readers to death.   I&#8217;ll use this blog to write about the software tools and languages I use and to keep track of my projects and what I&#8217;ve learned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpsolvent.com/PrimateTools/?feed=rss2&amp;p=3</wfw:commentRss>
		</item>
	</channel>
</rss>

