<?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>» DoYourself.org &#187; Security</title>
	<atom:link href="http://www.doyourself.org/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doyourself.org</link>
	<description>Did you know ?</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What is Google Public DNS and how to configure it on your computer</title>
		<link>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/</link>
		<comments>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 23:56:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=816</guid>
		<description><![CDATA[After global DNS and Open DNS we have one more choice in setting a reliable DNS services. Google introduce a new set of public DNS address called Google Public DNS which offers a high speed more secure DNS services. The addresses are: 8.8.8.8 and 8.8.4.4 [ DNS is used to covert domain name to corresponding [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After global DNS and Open DNS we have one more choice in setting a reliable DNS services. Google introduce a new set of public DNS address called Google Public DNS which offers a high speed more secure DNS services. The addresses are:</p>
<p>8.8.8.8 and</p>
<p>8.8.4.4</p>
<p>[ DNS is used to covert domain name to corresponding IP address and vice versa. ]</p>
<p>Google has launched telephone support for the issues related to Google Public DNS service. The telephone numbers are:</p>
<p>* 877-590-4367 { For US customers }</p>
<p>* 770-200-1201 { Outside US }</p>
<p>To set Google Public DNS in your computer from command prompt click on the link below.</p>
<p><a href="http://www.doyourself.org/uncategorized/818-how-to-configure-dns-address-from-the-command-prompt/">Setup DNS address on your computer from Command Prompt</a></p>
<p>To know more about Google Public DNS service please click on the link provided below.</p>
<p>http://code.google.com/speed/public-dns/docs/using.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAR command line &#8211; to exclude files and folders</title>
		<link>http://www.doyourself.org/security/782-rar-command-line-to-exclude-files-and-folders/</link>
		<comments>http://www.doyourself.org/security/782-rar-command-line-to-exclude-files-and-folders/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 23:35:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=782</guid>
		<description><![CDATA[After many try&#38;fail, I finally figured how to exclude files and subfolders when archiving with RAR command line. Basically I tried to archive a folder with .svn subfolders. I definitely want to exclude them from the archive. But when I tried: rar a -r -x.svn myarchive It did not exclude any .svn folders in second [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After many try&amp;fail, I finally figured how to exclude files and subfolders when archiving with RAR command line.<br />
Basically  I tried to archive a folder with .svn subfolders. I definitely want to  exclude them from the archive. But when I tried:</p>
<pre>rar a -r -x.svn myarchive</pre>
<p>It did not exclude any .svn folders in second or deeper level of folder hierarchy.<br />
Now the correct way is:</p>
<pre>rar a -r  -x.svn -x*/.svn -x*/.svn/* -x*/anotherSubFolder -x*/anotherSubFolder/* myarchive</pre>
<p>It will exclude all folder and subfolders with name .svn or anotherSubFolder.<br />
Happy Year 2009!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/782-rar-command-line-to-exclude-files-and-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules</title>
		<link>http://www.doyourself.org/security/495-linux-firewall-simple-shell-script-to-stop-and-flush-all-iptables-rules/</link>
		<comments>http://www.doyourself.org/security/495-linux-firewall-simple-shell-script-to-stop-and-flush-all-iptables-rules/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Flush]]></category>
		<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rules]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[Stop]]></category>
		<category><![CDATA[to]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=495</guid>
		<description><![CDATA[&#160; #!/bin/bash # Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules # Some Linux distros like Debian do not have /etc/init.d/iptables stop script # This can be also called from cron job if you are testing new firewall on # remote box to avoid lock out # ------------------------------------------------------------------------- # Copyright &#040;c&#041; [...]]]></description>
			<content:encoded><![CDATA[<p></p><pre>&nbsp;
<span style="color: #808080;font-style: italic">#!/bin/bash</span>
<span style="color: #808080;font-style: italic"># Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules</span>
<span style="color: #808080;font-style: italic"># Some Linux distros like Debian <span style="color: #000000;font-weight: bold">do</span> not have /etc/init.d/iptables stop script</span>
<span style="color: #808080;font-style: italic"># This can be also called from cron job <span style="color: #000000;font-weight: bold">if</span> you are testing new firewall on</span>
<span style="color: #808080;font-style: italic"># remote box to avoid lock out</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># Copyright <span style="color: #7a0874;font-weight: bold">&#040;</span>c<span style="color: #7a0874;font-weight: bold">&#041;</span> <span style="color: #000000">2004</span> nixCraft project &lt;http://cyberciti.biz/fb/&gt;</span>
<span style="color: #808080;font-style: italic"># This script is licensed under GNU GPL version <span style="color: #000000">2.0</span> or above</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># This script is part of nixCraft shell script collection <span style="color: #7a0874;font-weight: bold">&#040;</span>NSSC<span style="color: #7a0874;font-weight: bold">&#041;</span></span>
<span style="color: #808080;font-style: italic"># Visit http://bash.cyberciti.biz/ <span style="color: #000000;font-weight: bold">for</span> <span style="color: #c20cb9;font-weight: bold">more</span> information.</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/495-linux-firewall-simple-shell-script-to-stop-and-flush-all-iptables-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to update user password in batch mode using pwgen and chpasswd</title>
		<link>http://www.doyourself.org/security/496-script-to-update-user-password-in-batch-mode-using-pwgen-and-chpasswd/</link>
		<comments>http://www.doyourself.org/security/496-script-to-update-user-password-in-batch-mode-using-pwgen-and-chpasswd/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA["update]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[chpasswd]]></category>
		<category><![CDATA[in]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[pwgen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=496</guid>
		<description><![CDATA[#!/bin/bash # Script to update user password in batch mode # You must be a root user to use this script # ------------------------------------------------------------------------- # Copyright &#040;c&#041; 2005 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection &#040;NSSC&#041; # [...]]]></description>
			<content:encoded><![CDATA[<p></p><pre><span style="color: #808080;font-style: italic">#!/bin/bash</span>
<span style="color: #808080;font-style: italic"># Script to update user password <span style="color: #000000;font-weight: bold">in</span> batch mode</span>
<span style="color: #808080;font-style: italic"># You must be a root user to use this script</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># Copyright <span style="color: #7a0874;font-weight: bold">&#040;</span>c<span style="color: #7a0874;font-weight: bold">&#041;</span> <span style="color: #000000">2005</span> nixCraft project</span>
<span style="color: #808080;font-style: italic"># This script is licensed under GNU GPL version <span style="color: #000000">2.0</span> or above</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># This script is part of nixCraft shell script collection <span style="color: #7a0874;font-weight: bold">&#040;</span>NSSC<span style="color: #7a0874;font-weight: bold">&#041;</span></span>
<span style="color: #808080;font-style: italic"># Visit http://bash.cyberciti.biz/ <span style="color: #000000;font-weight: bold">for</span> <span style="color: #c20cb9;font-weight: bold">more</span> information.</span>
<span style="color: #808080;font-style: italic"># ----------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># /root is good place to store <span style="color: #c20cb9;font-weight: bold">clear</span> text password</span>
<span style="color: #007800">FILE=</span><span style="color: #ff0000">&quot;/root/batch.passwd&quot;</span>
&nbsp;
<span style="color: #808080;font-style: italic"># get all non-root user account</span>
<span style="color: #808080;font-style: italic"># By default on most linux non-root uid starts</span>
<span style="color: #808080;font-style: italic"># from <span style="color: #000000">1000</span></span>
<span style="color: #007800">USERS=</span>$<span style="color: #7a0874;font-weight: bold">&#040;</span><span style="color: #c20cb9;font-weight: bold">awk</span> -F: <span style="color: #ff0000">'{ if ( $3 &gt; 1000 ) print $1}'</span> /etc/<span style="color: #c20cb9;font-weight: bold">passwd</span><span style="color: #7a0874;font-weight: bold">&#041;</span>
&nbsp;
<span style="color: #808080;font-style: italic"># create <span style="color: #c20cb9;font-weight: bold">file</span> with random password</span>
<span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;Generating file, please wait...&quot;</span>
&nbsp;
<span style="color: #808080;font-style: italic"># overwrite <span style="color: #c20cb9;font-weight: bold">file</span>, this is bash specific a better solution is <span style="color: #c20cb9;font-weight: bold">cat</span> &gt; <span style="color: #007800">$FILE</span></span>
&gt;<span style="color: #007800">$FILE</span>
&nbsp;
<span style="color: #000000;font-weight: bold">for</span> u <span style="color: #000000;font-weight: bold">in</span> <span style="color: #007800">$USERS</span>
<span style="color: #000000;font-weight: bold">do</span>
   <span style="color: #007800">p=</span>$<span style="color: #7a0874;font-weight: bold">&#040;</span>pwgen <span style="color: #000000">-1</span> -n <span style="color: #000000">8</span><span style="color: #7a0874;font-weight: bold">&#041;</span> <span style="color: #808080;font-style: italic"># create random password</span>
   <span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;$u:$p&quot;</span> &gt;&gt; <span style="color: #007800">$FILE</span> <span style="color: #808080;font-style: italic"># save USERNAME:PASSWORD pair</span>
<span style="color: #000000;font-weight: bold">done</span>
<span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;&quot;</span>
<span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;Random password and username list stored in $FILE file&quot;</span>
<span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;Review $FILE file, once satisfied execute command: &quot;</span>
<span style="color: #7a0874;font-weight: bold">echo</span> <span style="color: #ff0000">&quot;chpasswd &amp;lt; $FILE&quot;</span>
&nbsp;
<span style="color: #808080;font-style: italic"># Uncomment following line <span style="color: #000000;font-weight: bold">if</span> you want immediately update all <span style="color: #c20cb9;font-weight: bold">users</span> password,</span>
<span style="color: #808080;font-style: italic"># be careful with this option, it is recommended that you review <span style="color: #007800">$FILE</span> first</span>
<span style="color: #808080;font-style: italic"># chpasswd &lt; <span style="color: #007800">$FILE</span></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/496-script-to-update-user-password-in-batch-mode-using-pwgen-and-chpasswd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change password shell script</title>
		<link>http://www.doyourself.org/security/497-change-password-shell-script/</link>
		<comments>http://www.doyourself.org/security/497-change-password-shell-script/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=497</guid>
		<description><![CDATA[#!/usr/local/bin/expect -f # Password change shell script, tested on Linux and FreeBSD # ---------------------------------- # It need expect tool. If you are using Linux use following command # to install expect # apt-get install expect # FreeBSD user can use ports or following command: # pkg_add -r -v expect # ---------------------------------- # If you are [...]]]></description>
			<content:encoded><![CDATA[<p></p><pre><span style="color: #808080;font-style: italic">#!/usr/<span style="color: #7a0874;font-weight: bold">local</span>/bin/expect -f</span>
<span style="color: #808080;font-style: italic"># Password change shell script, tested on Linux and FreeBSD</span>
<span style="color: #808080;font-style: italic"># ----------------------------------</span>
<span style="color: #808080;font-style: italic"># It need expect tool. If you are using Linux use following command</span>
<span style="color: #808080;font-style: italic"># to <span style="color: #c20cb9;font-weight: bold">install</span> expect</span>
<span style="color: #808080;font-style: italic"># apt-get <span style="color: #c20cb9;font-weight: bold">install</span> expect</span>
<span style="color: #808080;font-style: italic"># FreeBSD user can use ports or following <span style="color: #7a0874;font-weight: bold">command</span>:</span>
<span style="color: #808080;font-style: italic"># pkg_add -r -v expect</span>
<span style="color: #808080;font-style: italic"># ----------------------------------</span>
<span style="color: #808080;font-style: italic"># If you are using linux change first line</span>
<span style="color: #808080;font-style: italic"># From:</span>
<span style="color: #808080;font-style: italic">#!/usr/<span style="color: #7a0874;font-weight: bold">local</span>/bin/expect -f</span>
<span style="color: #808080;font-style: italic"># To:</span>
<span style="color: #808080;font-style: italic">#!/usr/bin/expect -f</span>
<span style="color: #808080;font-style: italic"># -----------------------------------------------</span>
<span style="color: #808080;font-style: italic"># Copyright <span style="color: #7a0874;font-weight: bold">&#040;</span>c<span style="color: #7a0874;font-weight: bold">&#041;</span> <span style="color: #000000">2006</span> nixCraft project</span>
<span style="color: #808080;font-style: italic"># This script is licensed under GNU GPL version <span style="color: #000000">2.0</span> or above</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># This script is part of nixCraft shell script collection <span style="color: #7a0874;font-weight: bold">&#040;</span>NSSC<span style="color: #7a0874;font-weight: bold">&#041;</span></span>
<span style="color: #808080;font-style: italic"># Visit http://bash.cyberciti.biz/ <span style="color: #000000;font-weight: bold">for</span> <span style="color: #c20cb9;font-weight: bold">more</span> information.</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># display usage</span>
<span style="color: #000000;font-weight: bold">if</span> <span style="color: #7a0874;font-weight: bold">&#123;</span><span style="color: #007800">$argc</span>!=<span style="color: #000000">2</span><span style="color: #7a0874;font-weight: bold">&#125;</span> <span style="color: #7a0874;font-weight: bold">&#123;</span>
   send_user <span style="color: #ff0000">&quot;usage: $argv0 username password <span style="color: #000099;font-weight: bold">n</span>&quot;</span>
   <span style="color: #7a0874;font-weight: bold">exit</span>
<span style="color: #7a0874;font-weight: bold">&#125;</span>
<span style="color: #808080;font-style: italic"># script must be run by root user</span>
<span style="color: #000000;font-weight: bold">set</span> <span style="color: #c20cb9;font-weight: bold">whoami</span> <span style="color: #7a0874;font-weight: bold">&#091;</span><span style="color: #7a0874;font-weight: bold">exec</span> <span style="color: #c20cb9;font-weight: bold">id</span> -u<span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #000000;font-weight: bold">if</span> <span style="color: #7a0874;font-weight: bold">&#123;</span><span style="color: #007800">$whoami</span>!=<span style="color: #000000">0</span><span style="color: #7a0874;font-weight: bold">&#125;</span> <span style="color: #7a0874;font-weight: bold">&#123;</span>
   send_user <span style="color: #ff0000">&quot;You must be a root user to run this script<span style="color: #000099;font-weight: bold">n</span>&quot;</span>
   <span style="color: #7a0874;font-weight: bold">exit</span>
<span style="color: #7a0874;font-weight: bold">&#125;</span>
<span style="color: #808080;font-style: italic">#</span>
<span style="color: #000000;font-weight: bold">set</span> timeout <span style="color: #000000">-1</span>
match_max <span style="color: #000000">100000</span>
<span style="color: #808080;font-style: italic"># stopre password</span>
<span style="color: #000000;font-weight: bold">set</span> password <span style="color: #7a0874;font-weight: bold">&#091;</span>lindex <span style="color: #007800">$argv</span> <span style="color: #000000">1</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #808080;font-style: italic"># username</span>
<span style="color: #000000;font-weight: bold">set</span> user <span style="color: #7a0874;font-weight: bold">&#091;</span>lindex <span style="color: #007800">$argv</span> <span style="color: #000000">0</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #808080;font-style: italic"># opem shell</span>
spawn <span style="color: #007800">$env</span><span style="color: #7a0874;font-weight: bold">&#040;</span>SHELL<span style="color: #7a0874;font-weight: bold">&#041;</span>
<span style="color: #808080;font-style: italic"># send <span style="color: #c20cb9;font-weight: bold">passwd</span> command</span>
send -- <span style="color: #ff0000">&quot;passwd $user<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
expect <span style="color: #ff0000">&quot;assword:&quot;</span>
send <span style="color: #ff0000">&quot;$password<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
expect  <span style="color: #ff0000">&quot;assword:&quot;</span>
send <span style="color: #ff0000">&quot;$password<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
send <span style="color: #ff0000">&quot;<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
expect eof</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/497-change-password-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH login expect shell script to supply username and password</title>
		<link>http://www.doyourself.org/security/498-ssh-login-expect-shell-script-to-supply-username-and-password/</link>
		<comments>http://www.doyourself.org/security/498-ssh-login-expect-shell-script-to-supply-username-and-password/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Ssh]]></category>
		<category><![CDATA[supply]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=498</guid>
		<description><![CDATA[#!/usr/bin/expect -f # Expect script to supply root/admin password for remote ssh server # and execute command. # This script needs three argument to&#040;s&#041; connect to remote server: # password = Password of remote UNIX server, for root user. # ipaddr = IP Addreess of remote UNIX server, no hostname # scriptname = Path to [...]]]></description>
			<content:encoded><![CDATA[<p></p><pre><span style="color: #808080;font-style: italic">#!/usr/bin/expect -f</span>
<span style="color: #808080;font-style: italic"># Expect script to supply root/admin password <span style="color: #000000;font-weight: bold">for</span> remote <span style="color: #c20cb9;font-weight: bold">ssh</span> server</span>
<span style="color: #808080;font-style: italic"># and execute <span style="color: #7a0874;font-weight: bold">command</span>.</span>
<span style="color: #808080;font-style: italic"># This script needs three argument to<span style="color: #7a0874;font-weight: bold">&#040;</span>s<span style="color: #7a0874;font-weight: bold">&#041;</span> connect to remote server:</span>
<span style="color: #808080;font-style: italic"># password = Password of remote UNIX server, <span style="color: #000000;font-weight: bold">for</span> root user.</span>
<span style="color: #808080;font-style: italic"># ipaddr = IP Addreess of remote UNIX server, no hostname</span>
<span style="color: #808080;font-style: italic"># scriptname = Path to remote script <span style="color: #c20cb9;font-weight: bold">which</span> will execute on remote server</span>
<span style="color: #808080;font-style: italic"># For example:</span>
<span style="color: #808080;font-style: italic">#  ./sshlogin.exp password <span style="color: #000000">192.168</span><span style="color: #000000">.1</span><span style="color: #000000">.11</span> who</span>
<span style="color: #808080;font-style: italic"># ------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># Copyright <span style="color: #7a0874;font-weight: bold">&#040;</span>c<span style="color: #7a0874;font-weight: bold">&#041;</span> <span style="color: #000000">2004</span> nixCraft project &lt;http://cyberciti.biz/fb/&gt;</span>
<span style="color: #808080;font-style: italic"># This script is licensed under GNU GPL version <span style="color: #000000">2.0</span> or above</span>
<span style="color: #808080;font-style: italic"># -------------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># This script is part of nixCraft shell script collection <span style="color: #7a0874;font-weight: bold">&#040;</span>NSSC<span style="color: #7a0874;font-weight: bold">&#041;</span></span>
<span style="color: #808080;font-style: italic"># Visit http://bash.cyberciti.biz/ <span style="color: #000000;font-weight: bold">for</span> <span style="color: #c20cb9;font-weight: bold">more</span> information.</span>
<span style="color: #808080;font-style: italic"># ----------------------------------------------------------------------</span>
<span style="color: #808080;font-style: italic"># <span style="color: #000000;font-weight: bold">set</span> Variables</span>
<span style="color: #000000;font-weight: bold">set</span> password <span style="color: #7a0874;font-weight: bold">&#091;</span>lrange <span style="color: #007800">$argv</span> <span style="color: #000000">0</span> <span style="color: #000000">0</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #000000;font-weight: bold">set</span> ipaddr <span style="color: #7a0874;font-weight: bold">&#091;</span>lrange <span style="color: #007800">$argv</span> <span style="color: #000000">1</span> <span style="color: #000000">1</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #000000;font-weight: bold">set</span> scriptname <span style="color: #7a0874;font-weight: bold">&#091;</span>lrange <span style="color: #007800">$argv</span> <span style="color: #000000">2</span> <span style="color: #000000">2</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #000000;font-weight: bold">set</span> arg1 <span style="color: #7a0874;font-weight: bold">&#091;</span>lrange <span style="color: #007800">$argv</span> <span style="color: #000000">3</span> <span style="color: #000000">3</span><span style="color: #7a0874;font-weight: bold">&#093;</span>
<span style="color: #000000;font-weight: bold">set</span> timeout <span style="color: #000000">-1</span>
<span style="color: #808080;font-style: italic"># now connect to remote UNIX box <span style="color: #7a0874;font-weight: bold">&#040;</span>ipaddr<span style="color: #7a0874;font-weight: bold">&#041;</span> with given script to execute</span>
spawn <span style="color: #c20cb9;font-weight: bold">ssh</span> root@<span style="color: #007800">$ipaddr</span> <span style="color: #007800">$scriptname</span> <span style="color: #007800">$arg1</span>
match_max <span style="color: #000000">100000</span>
<span style="color: #808080;font-style: italic"># Look <span style="color: #000000;font-weight: bold">for</span> passwod prompt</span>
expect <span style="color: #ff0000">&quot;*?assword:*&quot;</span>
<span style="color: #808080;font-style: italic"># Send password aka <span style="color: #007800">$password</span></span>
send -- <span style="color: #ff0000">&quot;$password<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
<span style="color: #808080;font-style: italic"># send blank line <span style="color: #7a0874;font-weight: bold">&#040;</span>r<span style="color: #7a0874;font-weight: bold">&#041;</span> to <span style="color: #c20cb9;font-weight: bold">make</span> sure we get back to gui</span>
send -- <span style="color: #ff0000">&quot;<span style="color: #000099;font-weight: bold">r</span>&quot;</span>
expect eof</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/498-ssh-login-expect-shell-script-to-supply-username-and-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 easy steps to a more secure WordPress blog</title>
		<link>http://www.doyourself.org/security/13-7-easy-steps-to-a-more-secure-wordpress-blog/</link>
		<comments>http://www.doyourself.org/security/13-7-easy-steps-to-a-more-secure-wordpress-blog/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 19:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[a]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[more]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[steps]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=13</guid>
		<description><![CDATA[There are many things you can do to secure your wordpress blog &#8211; a lot of them are pretty technical are require programming and/or sysadmin knowledge. Here&#8217;s a list of easy things that YOU can do to secure your wordpress blog: Remove unused themes (by removing the whole directory) Disable and remove unused plugins. Keep [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>There are many things you can do to secure your wordpress blog &#8211; a lot of them are pretty technical are require programming and/or sysadmin knowledge. Here&#8217;s a list of easy things that YOU can do to secure your wordpress blog:</p>
<ol>
<li>Remove unused themes (by removing the whole directory)</li>
<li>Disable and remove unused plugins.</li>
<li>Keep your wordpress version up to date.</li>
<li>Keep your used plugins up to date.</li>
<li>Add an empty index.html file into the themes and plugins directories. This stop people from browsing to see what themes/plugins you have installed.</li>
<li>Install the <a href="http://www.securitycompass.com/exploitme.shtml">XSS-Me and SQLInject-Me Firefox plugins</a> and run them against your site.</li>
<li>Remove the XMLRPC.PHP file from the root directory of your blog if you are not using <a href="http://codex.wordpress.org/XML-RPC_Support">XML RPC</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/13-7-easy-steps-to-a-more-secure-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing WordPress</title>
		<link>http://www.doyourself.org/security/74-securing-wordpress/</link>
		<comments>http://www.doyourself.org/security/74-securing-wordpress/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 19:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Securing]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=74</guid>
		<description><![CDATA[Danial Cuthbert has written and excellent paper about securing WordPress using mod_security for Apache. Read it on BlogSecurity.]]></description>
			<content:encoded><![CDATA[<p></p><p>Danial Cuthbert has written and excellent paper about securing WordPress using mod_security for Apache.</p>
<p>Read it on <a href="http://blogsecurity.net/wordpress/modsecurity-and-wordpress-defense-in-depth/">BlogSecurity</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/74-securing-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stronger passwords?</title>
		<link>http://www.doyourself.org/security/83-stronger-passwords/</link>
		<comments>http://www.doyourself.org/security/83-stronger-passwords/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 19:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[passwords?]]></category>
		<category><![CDATA[Stronger]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=83</guid>
		<description><![CDATA[There&#8217;s a great article at Coding Horror that makes an interesting proposal for strengthening passwords: using pass-phrases rather than pass-words. The idea is to use a phrase rather than a single word. For example, a worst-case scenario would be: old password: password new password: this is my password Whilst I agree that a passphrase may [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>There&#8217;s a great article at <a href="http://www.codinghorror.com/blog/archives/000360.html" title="Stronger passwords">Coding Horror</a> that makes an interesting proposal for strengthening passwords: using pass-phrases rather than pass-words.</p>
<p>The idea is to use a phrase rather than a single word. For example, a worst-case scenario would be:</p>
<p>old password: password</p>
<p>new password: this is my password</p>
<p>Whilst I agree that a passphrase may be marginally stronger than a password, I still think they will suffer the same weakness: the user. User&#8217;s pick passwords that they can remember and these are nearly always weak &#8211; their dog&#8217;s name, their favourite book, etc. A phrase would be no different, people would use a quote from a film, a common saying or something else easily recognisable.</p>
<p>As stated in the comments of the Coding Horror post, the problem with passwords will always exist: a user needs to remember a password and because of that they will nearly always choose weak ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/83-stronger-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The best software security ever seen</title>
		<link>http://www.doyourself.org/security/86-the-best-software-security-ever-seen/</link>
		<comments>http://www.doyourself.org/security/86-the-best-software-security-ever-seen/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 19:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[best]]></category>
		<category><![CDATA[ever?]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[seen]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[the]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=86</guid>
		<description><![CDATA[This is impressive. It&#8217;s a user&#8217;s story submitted to the Worse Than Failure blog. The story was submitted by Noah &#8211; one of his relatives had a problem with an expired application that they wanted to use and they wondered if he could help: http://worsethanfailure.com/Articles/Classic-WTF-Lock-In-Key-Security.aspx He quickly gained some l33t hax0r skills and managed to [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This is impressive. It&#8217;s a user&#8217;s story submitted to the Worse Than Failure blog. The story was submitted by Noah &#8211; one of his relatives had a problem with an expired application that they wanted to use and they wondered if he could help:</p>
<p><a href="http://worsethanfailure.com/Articles/Classic-WTF-Lock-In-Key-Security.aspx">http://worsethanfailure.com/Articles/Classic-WTF-Lock-In-Key-Security.aspx</a></p>
<p>He quickly gained some l33t hax0r skills and managed to get the app to run.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/security/86-the-best-software-security-ever-seen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

