<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>LinuxQuestions.org - Blogs - Marcelo_Vergara</title>
		<link>http://www.linuxquestions.org/questions/blog/marcelo_vergara-358874/</link>
		<description>LinuxQuestions.org offers a free Linux forum where Linux newbies can ask questions and Linux experts can offer advice. Topics include security, installation, networking and much more.</description>
		<language>en</language>
		<lastBuildDate>Thu, 23 May 2013 10:07:06 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>https://lqo-thequestionsnetw.netdna-ssl.com/questions/images/misc/rss.jpg</url>
			<title>LinuxQuestions.org - Blogs - Marcelo_Vergara</title>
			<link>http://www.linuxquestions.org/questions/blog/marcelo_vergara-358874/</link>
		</image>
		<item>
			<title>HTo - HTTP POST with BASH</title>
			<link>http://www.linuxquestions.org/questions/blog/marcelo_vergara-358874/hto-http-post-with-bash-985/</link>
			<pubDate>Fri, 01 Aug 2008 18:22:20 GMT</pubDate>
			<description><![CDATA[#!/bin/bash 
 
if [ -z $1 ] || [ -z "$2" ]; then 
        echo "Uso: $0 phone \"string\"" 
        exit 1 
fi 
 
TEL=$1 
MSG=$2]]></description>
			<content:encoded><![CDATA[<div>#!/bin/bash<br />
<br />
if [ -z $1 ] || [ -z &quot;$2&quot; ]; then<br />
        echo &quot;Uso: $0 phone \&quot;string\&quot;&quot;<br />
        exit 1<br />
fi<br />
<br />
TEL=$1<br />
MSG=$2<br />
<br />
HOST=&quot;172.26.1.75&quot;<br />
URL=&quot;/pluggingForward/sendMessage.jsp&quot;<br />
PORT=&quot;80&quot;<br />
<br />
PROF=&quot;hehehehehe&quot;<br />
PWD=&quot;hahahaha&quot;<br />
ANUM=&quot;927&quot;<br />
<br />
TAM=`echo &quot;&lt;REQUEST PROF=\&quot;war_sms_mt\&quot;&gt;<br />
&lt;PWD&gt;hahahaha&lt;/PWD&gt;<br />
&lt;APP_TAG&gt;&lt;/APP_TAG&gt;<br />
&lt;ANUM&gt;927&lt;/ANUM&gt;<br />
&lt;BNUM&gt;$TEL&lt;/BNUM&gt;<br />
&lt;PLOAD&gt;<br />
&lt;SMS&gt;$MSG&lt;/SMS&gt;<br />
&lt;/PLOAD&gt;<br />
&lt;/REQUEST&gt;&quot; | wc -c`<br />
<br />
echo &quot;POST $URL HTTP/1.1<br />
Host: $HOST<br />
Content-Length: $TAM<br />
Content-Type: text/wml<br />
<br />
&lt;REQUEST PROF=\&quot;war_sms_mt\&quot;&gt;<br />
&lt;PWD&gt;hahahaha&lt;/PWD&gt;<br />
&lt;APP_TAG&gt;&lt;/APP_TAG&gt;<br />
&lt;ANUM&gt;927&lt;/ANUM&gt;<br />
&lt;BNUM&gt;$TEL&lt;/BNUM&gt;<br />
&lt;PLOAD&gt;<br />
&lt;SMS&gt;$MSG&lt;/SMS&gt;<br />
&lt;/PLOAD&gt;<br />
&lt;/REQUEST&gt;&quot; |  /usr/bin/nc -w 10 $HOST $PORT &gt;&gt; /dev/null<br />
<br />
if [ $? -eq &quot;0&quot; ]; then<br />
        exit 0<br />
else<br />
        exit 1<br />
fi<br />
</div>

]]></content:encoded>
			<dc:creator>Marcelo_Vergara</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/marcelo_vergara-358874/hto-http-post-with-bash-985/</guid>
		</item>
	</channel>
</rss>
