<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>binpoint.com &#187; Scripts</title>
	<atom:link href="http://binpoint.com/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://binpoint.com</link>
	<description>A Security Blog (Stirred with Geek Life)</description>
	<lastBuildDate>Wed, 09 Jun 2010 02:02:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Quick note on sorting john.pot files</title>
		<link>http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/</link>
		<comments>http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 02:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[john the ripper]]></category>
		<category><![CDATA[password cracking]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=719</guid>
		<description><![CDATA[I run john the ripper on multiple boxes at once by splitting up the input password hash files by type (NT, LanMan, DES, md5, etc.) Once I&#8217;ve let the individual systems run for a while, I run reports using  john - -show. This means I need to combine the john.pot files from each system into [...]


Related posts:<ol><li><a href='http://binpoint.com/2010/02/john-the-ripper-password-cracking-now-obsolete/' rel='bookmark' title='Permanent Link: John the Ripper Password Cracking Now Obsolete'>John the Ripper Password Cracking Now Obsolete</a></li>
<li><a href='http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/' rel='bookmark' title='Permanent Link: Complete Unix Cron Job Crib Sheet'>Complete Unix Cron Job Crib Sheet</a></li>
<li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-722" title="pot" src="http://binpoint.com/wp-content/uploads/2010/06/pot.png" alt="" width="304" height="301" /></p>
<p>I run <a href="http://www.openwall.com/john/">john the ripper</a> on multiple boxes at once by splitting up the input password hash files by type (NT, LanMan, DES, md5, etc.)</p>
<p>Once I&#8217;ve let the individual systems run for a while, I run reports using  <em>john</em> <em>- -show</em>. This means I need to combine the john.pot files from each system into a unique file on the system I&#8217;m running the reports on.</p>
<p>So, I ran the (fairly standard) commands:</p>
<p><em><strong>$ cat john1.pot john2.pot john3.pot &gt; combined.pot</strong><br />
</em></p>
<p><em><strong>$ cat combined.pot | sort | uniq &gt; john.pot</strong><br />
sort: string comparison failed: Illegal byte sequence<br />
sort: Set LC_ALL=&#8217;C&#8217; to work around the problem.<br />
sort: The strings compared were `1234567892031276d66b123456789:user&#8217; and `abcdefghijklmnop4ab</em><em>38:l\</em><em>4327367qrstuvwxyz&#8217;.</em></p>
<p>Oops! I wasn&#8217;t expecting that command to bomb out like that. To fix the sort, do exactly as sort suggests. Type:</p>
<p><strong>$ export LC_ALL=&#8217;C&#8217;</strong></p>
<p><strong><br />
</strong></p>
<p>What&#8217;s going on here?</p>
<p>I found <a href="http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html">this reference webpage</a> on Google. Here&#8217;s the relevant bits:</p>
<dl>
<dt><em>LC_ALL</em></dt>
<dd> <em>This variable determines the values for all locale categories. The value of the </em><em>LC_ALL environment variable has precedence over any of the other environment variables starting with </em><em>LC_ (</em><em>LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the </em><em>LANG environment variable. </em></dd>
</dl>
<p><em>If the </em><em>LANG</em> environment variable is not set or is set to the empty string, the implementation-dependent default locale is used.</p>
<p><em>If the locale value is &#8220;C&#8221; or &#8220;POSIX&#8221;, the POSIX locale is used and the standard utilities behave in accordance with the rules in  POSIX Locale , for the associated category.</em></p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2010/02/john-the-ripper-password-cracking-now-obsolete/' rel='bookmark' title='Permanent Link: John the Ripper Password Cracking Now Obsolete'>John the Ripper Password Cracking Now Obsolete</a></li>
<li><a href='http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/' rel='bookmark' title='Permanent Link: Complete Unix Cron Job Crib Sheet'>Complete Unix Cron Job Crib Sheet</a></li>
<li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complete Unix Cron Job Crib Sheet</title>
		<link>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/</link>
		<comments>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 03:30:19 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[crib sheet]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[easy]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=276</guid>
		<description><![CDATA[Do you only use unix once in a blue moon, need to setup crontab and can&#8217;t quite remember the order? (Without peeking at the image on the left) Try out this handy cron job crib sheet which you can paste directly into your crontab as a reference each time you make a scheduled job change. [...]


Related posts:<ol><li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
<li><a href='http://binpoint.com/2009/03/auc-1-paste/' rel='bookmark' title='Permanent Link: AUC #1: paste'>AUC #1: paste</a></li>
<li><a href='http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/' rel='bookmark' title='Permanent Link: Quick note on sorting john.pot files'>Quick note on sorting john.pot files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-277 alignleft" title="cron" src="http://binpoint.com/wp-content/uploads/2009/03/cron.png" alt="cron" width="320" height="98" />Do you only use unix once in a blue moon, need to setup crontab and can&#8217;t quite remember the order? (Without peeking at the image on the left)<br />
Try out this handy cron job crib sheet which you can paste directly into your crontab as a reference each time you make a scheduled job change.</p>
<p><span id="more-276"></span>Cron is a unix program that is used to automatically run commands or scripts at predetermined times. Common uses include running nightly backups, log searching or other system resource intensive tasks when everyone is at home sleeping. Each unix user has their own crontab list. If you are new to scheduling tasks in Sun Solaris, Red Hat Enterprise Linux, Fedora, Ubuntu, Debian OS X, FreeBSD or any other flavor of unix, the following quick cron guide should help.</p>
<p>To check what is currently scheduled for execution for one user, open a terminal and type:</p>
<pre>crontab -l -u &lt;username&gt;</pre>
<p>Any task that requires root privileges will need to be put in the root uer&#8217;s crontab. Let&#8217;s add a simple backup scheduled task as an example. To open the cron file as the root user with your default text editor, type:</p>
<pre>sudo crontab -e</pre>
<p>At the top of the crontab file (or if it is empty) paste in the following:</p>
<pre># +- - - - - - minute [0-59]   | Special Entries: @reboot, @yearly, @monthly,
# | +- - - - - hour [0-23]     |                  @weekly, @midnight, @hourly
# | | +- - - - monthday [1-31]  ---------------------------------------------
# | | | +- - - month [1-12, jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec]
# | | | | +- - weekday [0-6, sun,mon,tue,wed,thu,fri,sat,sun]
# * * * * * /full/path/to/command args &gt;&gt; ~/command.log</pre>
<p>This Crib Sheet will serve as a crontab syntax reference every time you list or edit the crontab but won&#8217;t be interpreted by cron since each line starts with a poundsign (<em>#</em>) character indicating a comment line. The first five columns allow you to define the minutes, hours, days of the month, months, and weekdays that you want your job to run. The sixth column is the command or script to execute at the appointed time or times.</p>
<p>Here&#8217;s an example crontab line that runs the backup.sh script every twenty minutes on April 13th, 14th and 15th:</p>
<pre>0,20,40 * 13-15 4 * /home/tom/scripts/backup.sh &gt;&gt; /var/log/backups.log</pre>
<p>The last part may look new if you are unfamiliar with pipes. The double greaterthan signs will append the output of backup.sh into a file called backups.log located in the /var/log/ directory. While you can chain together many unix commands directly in the crontab file, I recommend using a separate file (ie: in your scripts directory) to perform more complicated tasks.</p>
<p>Here&#8217;s another cron job example that searches for files in anyones home directory modified in the last 24 hours and puts a report in your home directory:</p>
<pre>0 1 * * * /usr/bin/find /home -mtime -1 -type f -exec ls -lh {} \; &gt; \
/home/tom/new_files_report_`date +%Y-%m-%d`.txt</pre>
<p>Hope that helps! Comments welcome.</p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2009/05/auc-2-ls/' rel='bookmark' title='Permanent Link: AUC #2: ls'>AUC #2: ls</a></li>
<li><a href='http://binpoint.com/2009/03/auc-1-paste/' rel='bookmark' title='Permanent Link: AUC #1: paste'>AUC #1: paste</a></li>
<li><a href='http://binpoint.com/2010/06/quick-note-on-sorting-john-pot-files/' rel='bookmark' title='Permanent Link: Quick note on sorting john.pot files'>Quick note on sorting john.pot files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Tune Up! (type: Auto-magic)</title>
		<link>http://binpoint.com/2008/06/windows-tune-up/</link>
		<comments>http://binpoint.com/2008/06/windows-tune-up/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:43:30 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[tweaks]]></category>

		<guid isPermaLink="false">http://binpoint.com/?p=41</guid>
		<description><![CDATA[I don&#8217;t know about you, but every time I reinstall Windows (you know, every 3 months or so) thanks to WinRot, I spend an hour or so reconfiguring Windows the way I like it. In an effort to reduce that time, here is a bunch of windows registry tweaks which change a ton of things [...]


Related posts:<ol><li><a href='http://binpoint.com/2008/06/i-sure-miss-grep-in-m-windows/' rel='bookmark' title='Permanent Link: I sure miss grep in M$ Windows'>I sure miss grep in M$ Windows</a></li>
<li><a href='http://binpoint.com/2009/02/nice-desktop-setup-for-windows-vista/' rel='bookmark' title='Permanent Link: Nice Desktop Setup &#8230; For Windows Vista'>Nice Desktop Setup &#8230; For Windows Vista</a></li>
<li><a href='http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/' rel='bookmark' title='Permanent Link: Complete Unix Cron Job Crib Sheet'>Complete Unix Cron Job Crib Sheet</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but every time I reinstall Windows (you know, every 3 months or so) thanks to WinRot, I spend an hour or so reconfiguring Windows the way I like it.</p>
<p>In an effort to reduce that time, here is a bunch of windows registry tweaks which change a ton of things from window pop up times to NTFS cluster sizes. This file may also come in handy for first time installations on to new machines.</p>
<p>This file was started by one of my colleagues at work, so props attributed where they are due!</p>
<p><em><strong>BIG DISCLAIMER:</strong></em> <em>Please, Please, Please, review all the tweaks before you blindly run the file. Remember, trust but verify.</em></p>
<p><a title="Windows Tweaks Registry Fule" href="http://binpoint.com/scripts/windows/Tweaks.zip">Download</a></p>


<p>Related posts:<ol><li><a href='http://binpoint.com/2008/06/i-sure-miss-grep-in-m-windows/' rel='bookmark' title='Permanent Link: I sure miss grep in M$ Windows'>I sure miss grep in M$ Windows</a></li>
<li><a href='http://binpoint.com/2009/02/nice-desktop-setup-for-windows-vista/' rel='bookmark' title='Permanent Link: Nice Desktop Setup &#8230; For Windows Vista'>Nice Desktop Setup &#8230; For Windows Vista</a></li>
<li><a href='http://binpoint.com/2009/03/complete-unix-cron-job-crib-sheet/' rel='bookmark' title='Permanent Link: Complete Unix Cron Job Crib Sheet'>Complete Unix Cron Job Crib Sheet</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://binpoint.com/2008/06/windows-tune-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
