<?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>NetworkJew &#187; Scripting</title>
	<atom:link href="http://networkjew.com/category/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://networkjew.com</link>
	<description>Network tips, news and technology.</description>
	<lastBuildDate>Fri, 21 May 2010 13:10:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Detect Conficker Worm with new Python Tool</title>
		<link>http://networkjew.com/2009/03/31/detect-conficker-worm-with-new-python-tool/</link>
		<comments>http://networkjew.com/2009/03/31/detect-conficker-worm-with-new-python-tool/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 14:22:37 +0000</pubDate>
		<dc:creator>Network Jew</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security Links]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[conficker]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://networkjew.com/?p=216</guid>
		<description><![CDATA[<a href=http://networkjew.com/2009/03/31/detect-conficker-worm-with-new-python-tool/><img src=http://networkjew.com/wp-content/uploads/2009/03/worm-300x210.jpg class=imgtfe hspace=5 align=left width=225  border=0></a>]]></description>
			<content:encoded><![CDATA[<p>I<a rel="attachment wp-att-217" href="http://networkjew.com/2009/03/31/detect-conficker-worm-with-new-python-tool/worm/"><img class="alignleft size-medium wp-image-217" title="worm" src="http://networkjew.com/wp-content/uploads/2009/03/worm-300x210.jpg" alt="worm 300x210 Detect Conficker Worm with new Python Tool" width="300" height="210" /></a>f you haven&#8217;t heard already, you soon will hear about the &#8220;Conficker&#8221; worm. It&#8217;s a computer &#8220;worm&#8221; that is estimated to have infected up to 15 million computers worldwide, including those used by the Houston Municipal Courts, the UK Ministry of Defence, and the British House of Commons. Its so bad that last month Microsoft issued a $250,000 bounty for information leading to the arrest and conviction of those behind Conficker.</p>
<p>From Microsoft: Conficker infects other computers across a network by exploiting a vulnerability in the Windows Server service (SVCHOST.EXE). If the vulnerability is successfully exploited, it could allow remote code execution when file sharing is enabled. It may also spread via removable drives and weak administrator passwords. It disables several important system services and security products.</p>
<p>Once your computer is infected, it is now &#8220;owned&#8221; by the Conficker worm and its creators. It becomes one of millions of infected PC&#8217;s making up a massive &#8220;army&#8221; of infected machines that could possibly be used to implement the author&#8217;s bidding at any time.  Here&#8217;s the scary part- all these infected machines ( or &#8220;bots&#8221;) are currently programmed to &#8220;check in&#8221; with their master on April 1st to get new instructions. No one knows exactly what will happen on that day.</p>
<p>Pundits have speculated a variety of different malicious deeds this massive bot army could undertake on 4/1. One possibility is that the author&#8217;s will grab sensitive personal data off all these machines. Another thought is that they will launch massive denial of service attacks on major websites.  Still others believe that this bot army will be sold off for the purposes of sending out Spam worldwide.  No one, except the authors knows for sure.</p>
<p>Regardless, make sure your machines have AntiVirus software, and that its up-to-date. If you&#8217;ve just recently installed AntiVirus, make sure you do a full system scan. Make sure Automatic Updates are turned on.</p>
<p>The Honeynet project just released a new python script you can run to scan your network for infected machines. Here&#8217;s a link to it:</p>
<p>http://honeynet.org/node/388</p>
<p>For more info about this worm you can check out any of the following links:</p>
<p>http://en.wikipedia.org/wiki/Conficker</p>
<p>http://vil.nai.com/vil/content/v_153464.htm</p>
<p>This one&#8217;s REAL technical but a great read if you have the time:</p>
<p>http://mtc.sri.com/Conficker/addendumC/</p>
<p>Let&#8217;s be careful out there&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://networkjew.com/2009/03/31/detect-conficker-worm-with-new-python-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tether Windows Mobile Phone with OSX Mac</title>
		<link>http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/</link>
		<comments>http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 16:42:55 +0000</pubDate>
		<dc:creator>Network Jew</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Networking]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security Links]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Top 10]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[blackjack 2]]></category>
		<category><![CDATA[blackjackII]]></category>
		<category><![CDATA[GPRS]]></category>
		<category><![CDATA[GSM]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[tether]]></category>
		<category><![CDATA[Tethering]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://networkjew.com/?p=205</guid>
		<description><![CDATA[<a href=http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/><img src=http://networkjew.com/wp-content/uploads/2009/03/0i16938000.jpg class=imgtfe hspace=5 align=left width=225  border=0></a>]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-208" href="http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/0i16938000/"><img class="alignleft size-full wp-image-208" title="0i16938000" src="http://networkjew.com/wp-content/uploads/2009/03/0i16938000.jpg" alt="0i16938000 Tether Windows Mobile Phone with OSX Mac" width="234" height="134" /></a>One of the great features in Windows Mobile is the ability to tether your device to your computer in order to piggy-back on your mobile devices internet connection. This works great in airports or coffee shops so you don&#8217;t have to pay for wi-fi usage.  If you&#8217;re running Windows on your laptop and have ActiveSync installed, its pretty straightforward.  However, if you&#8217;re running OSX, it can be a bit trickier to tether your WinMo device. These instructions were tested with a BlackJack II. Here&#8217;s how to do it:</p>
<p>In theory, you should be able to simply set up Internet Sharing on your Windows Mobile device with Bluetooth PAN.  Then on your Mac, simply create a BlueTooth PAN connection.  The problem with this is that you run the risk of eating up your mobile device&#8217;s battery much quicker as its using its 3G connection and its bluetooth connection simultaneouslly.  Even though it should work, I never could get it going, anyways.  Ideally, we want to plug the phone in via USB, so that it is charging while sharing its connection.  OSX won&#8217;t support the standard ActiveSync USB Internet Sharing method, so you&#8217;ll need to do a little work to get it going.</p>
<p>First download these<a href="http://networkjew.com/?attachment_id=206"> files</a></p>
<p>Unzip and Copy all three files to /Library/Modem Scripts</p>
<p>Back on your Windows Mobile device, in the USB connection settings, change USB to mode to MODEM instead of ActiveSync. You may get a warning here that ActiveSync won&#8217;t work when Modem is selected.  Remember to change it back later when you are ready to sync up again with a Windows computer. Once you&#8217;ve selected modem, plug your device into your Mac via USB.</p>
<p>Now, go to your Network Preferences menu.</p>
<p>On the left side, you should see your list of Network Interfaces.  Click the little &#8220;+&#8221; sign to add an interface. Click Interface drop down menu, and you should see a choice for &#8220;Samsung CDMA Technologies&#8221;. Go ahead and choose it, and click CREATE. it should populate itself on the left-hand pane now.</p>
<p>Highlight the new Samsung Entry, and on the right side make the following entries:</p>
<p>Configuration: Default</p>
<p>Telephone Number: wap.cingular</p>
<p>Account Name: WAP@CINGULARGPRS.COM</p>
<p>Password: CINGULAR1</p>
<p>Now click Advanced&#8230;</p>
<p>On the Modem Tab, make sure Vendor is Samsung and Model is GPRS (GSM/3G)</p>
<p>On the PPP tab:</p>
<p>For Session, Uncheck &#8220;Redial if Busy&#8221;</p>
<p><span id="intelliTxt">Next to Settings, choose CONFIGURATION and select &#8220;Send PPP echo packets&#8221; and <span style="font-weight: bold;">uncheck:</span> Use TCP header compression.</span></p>
<p><span>Apply all these changes and lock the Network Preferences, and you&#8217;re ready to test. </span></p>
<p><span>Its a good idea when testing to disable your Wi-Fi so you can be sure you&#8217;re genuinely using your mobile devices WAN.</span></p>
<p><span>Now, highlight the Samsung modem, and on the right side, click CONNECT. If all goes correct, you should see a little meter with your connection strength, and you should now be able to surf the web. Go for it!</span></p>
<p><span><a rel="attachment wp-att-207" href="http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/picture-4/"><img class="alignleft size-medium wp-image-207" title="picture-4" src="http://networkjew.com/wp-content/uploads/2009/03/picture-4-300x247.png" alt="picture 4 300x247 Tether Windows Mobile Phone with OSX Mac" width="300" height="247" /></a><br />
</span></p>
<p><span><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://networkjew.com/2009/03/30/tether-windows-mobile-phone-mac/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Prune Files from a Directory Based on Age</title>
		<link>http://networkjew.com/2009/03/11/how-to-prune-files-from-a-directory-based-on-age/</link>
		<comments>http://networkjew.com/2009/03/11/how-to-prune-files-from-a-directory-based-on-age/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 16:35:35 +0000</pubDate>
		<dc:creator>Network Jew</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[age]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[prune]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://networkjew.com/?p=191</guid>
		<description><![CDATA[<a href=http://networkjew.com/2009/03/11/how-to-prune-files-from-a-directory-based-on-age/><img src=http://networkjew.com/wp-content/uploads/2009/03/100-pruning4standaloneprod_affiliate25-300x200.jpg class=imgtfe hspace=5 align=left width=225  border=0></a>]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-192" href="http://networkjew.com/2009/03/11/how-to-prune-files-from-a-directory-based-on-age/100-pruning4standaloneprod_affiliate25/"><img class="alignleft size-medium wp-image-192" title="100-pruning4standaloneprod_affiliate25" src="http://networkjew.com/wp-content/uploads/2009/03/100-pruning4standaloneprod_affiliate25-300x200.jpg" alt="100 pruning4standaloneprod affiliate25 300x200 How to Prune Files from a Directory Based on Age" width="300" height="200" /></a>Logging is great, but logfiles tend to build up and take up valuable disk space.  There&#8217;s no built-in utility in Windows to automatically prune files out of a directory based on age.  Luckily, it&#8217;s easy enough to script this using VBSCRIPT.</p>
<p>To use the script below, first determine how many days/months you want to use as your cutoff and enter it in the script in this snippet:</p>
<blockquote><p>strPruneDate = DateAdd(&#8220;d&#8221;, -3, Date)</p></blockquote>
<p>For the above example, I&#8217;m looking for files older than 3 days. You could change &#8220;d&#8221; to &#8220;m&#8221; and look for months if you like.</p>
<p>Next, you need to specify which directory you want, and enter the drive and path in the two strings below:</p>
<blockquote><p>strDrive = &#8220;c:&#8221;<br />
strPath = &#8220;temp&#8221;</p></blockquote>
<p>In the above example, I&#8217;m using C:\Temp.</p>
<p>Save the text with .VBS extension, and double click it to run.  Alternately, you could stick it in a batch file with commands like this and then use Windows Scheduler to run this every so often:</p>
<p>wscript prunefiles.vbs</p>
<p>Here&#8217;s the vbscript code:</p>
<blockquote><p>Option Explicit</p>
<p>Dim strPruneDate, strDay, strMonth, strYear, strTargetDate, strDate<br />
Dim strComputer, strDrive, strPath, strPathAlt, strName<br />
Dim objWMIService<br />
Dim colFiles, objFile<br />
Dim colFolders, objFolder<br />
Dim strFolderPath, strFilePath<br />
Dim colSubFolders, objSubFolder<br />
Dim strSubFolderPath, strSubFilePath<br />
Dim colSubFiles, objSubFile</p>
<p>strPruneDate = DateAdd(&#8220;d&#8221;, -3, Date)</p>
<p>strDrive = &#8220;c:&#8221;<br />
strPath = &#8220;temp&#8221;</p>
<p>strPathAlt = Replace(strPath, &#8220;\\&#8221;, &#8220;\&#8221;)<br />
strName = strDrive &amp; &#8220;\&#8221; &amp; strPathAlt</p>
<p>strDay = Day(strPruneDate)<br />
If Len(strDay) &lt; 2 Then<br />
strDay = &#8220;0&#8243; &amp; strDay<br />
End If<br />
strMonth = Month(strPruneDate)<br />
If Len(strMonth) &lt; 2 Then<br />
strMonth = &#8220;0&#8243; &amp; strMonth<br />
End If<br />
strYear = Year(strPruneDate)<br />
strTargetDate = strYear &amp; strMonth &amp; strDay</p>
<p>strComputer = &#8220;.&#8221;</p>
<p>Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; strComputer)<br />
Set colFiles = objWMIService.ExecQuery _<br />
(&#8220;SELECT * FROM CIM_DataFile WHERE Drive = &#8216;&#8221; &amp; strDrive &amp; _<br />
&#8220;&#8216; AND Path = &#8216;\\&#8221; &amp; strPath &amp; &#8220;\\&#8217;&#8221;)<br />
Set colFolders = objWMIService.ExecQuery _<br />
(&#8220;ASSOCIATORS OF {Win32_Directory.Name=&#8217;&#8221; &amp; strName &amp; &#8220;&#8216;} &#8221; _<br />
&amp; &#8220;WHERE AssocClass = Win32_Subdirectory &#8221; _<br />
&amp; &#8220;ResultRole = PartComponent&#8221;)</p>
<p>For Each objFile in colFiles<br />
FilecreationdateCheck<br />
Next</p>
<p>Sub FilecreationdateCheck<br />
strDate = Left(objFile.creationdate, 30)<br />
If strDate &lt; strTargetDate Then<br />
objfile.delete objFile.Name<br />
&#8216; Replace w/ wscript.echo after testing<br />
End If<br />
End Sub</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://networkjew.com/2009/03/11/how-to-prune-files-from-a-directory-based-on-age/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
