<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Enviar hilo al foro vía curl desde pfSense]]></title><description><![CDATA[<p dir="auto">Hola.</p>
<p dir="auto">Estoy intentando enviar (publicar)  un hilo al foro vía shell desde pfSense.</p>
<p dir="auto">Uso curl.</p>
<p dir="auto">Para iniciar la sesión:</p>
<pre><code>curl -k -L -b cookies.txt -c cookies.txt --verbose -d "user=TUUSUARIO&amp;passwrd=LACLAVE" "https://forum.pfsense.org/index.php?action=login2"

</code></pre>
<p dir="auto">Para enviar el hilo:</p>
<pre><code>curl  -k -L -b cookies.txt -c cookies.txt -F "subject=Test-Post-curl" -F "icon=Standard" -F "message=Hola
test" -F "SubmitAction=Yes" 'https://forum.pfsense.org/index.php?action=post2;start=0;board=10' 
</code></pre>
<p dir="auto">Pero no funciona. ¿Alguien lo ha intentado o sabe como hacerlo?.</p>
<p dir="auto">Salu2</p>
]]></description><link>https://forum.netgate.com/topic/99347/enviar-hilo-al-foro-vía-curl-desde-pfsense</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Mar 2026 00:08:24 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/99347.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 May 2016 14:57:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Enviar hilo al foro vía curl desde pfSense on Tue, 03 May 2016 19:58:24 GMT]]></title><description><![CDATA[<p dir="auto">Puedes probas el script que está publicado en [1]<br />
[1] <a href="http://blog.cristianmartin.org/2012/11/curl-php-mantener-sesion-o-login-para-moverse-en-una-web.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://blog.cristianmartin.org/2012/11/curl-php-mantener-sesion-o-login-para-moverse-en-una-web.html</a></p>
<p dir="auto">Como te comenté, lo del user agent depende es del portal, si el portal lo evalua o no. Si dices que no hace nada, puedes quitarlo.</p>
<p dir="auto">Saludos.</p>
]]></description><link>https://forum.netgate.com/post/621926</link><guid isPermaLink="true">https://forum.netgate.com/post/621926</guid><dc:creator><![CDATA[rodria]]></dc:creator><pubDate>Tue, 03 May 2016 19:58:24 GMT</pubDate></item><item><title><![CDATA[Reply to Enviar hilo al foro vía curl desde pfSense on Tue, 03 May 2016 19:40:55 GMT]]></title><description><![CDATA[<p dir="auto">Hola.</p>
<p dir="auto">Con esto sí se valida (no hace falta el user agent, ya que el curl aporta su propio user-agent, pero lo pongo, por si..)</p>
<blockquote>
<p dir="auto">curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" –cookie cookies.txt --cookie-jar cookies.txt -F "user=TUUSUARIO" -F "passwrd=TUCLAVE" -F "cookielength=60" -F "cookieneverexp=0" -F "submit=Login" -L "https://forum.pfsense.org/index.php?action=login2" &gt; resultado.html</p>
</blockquote>
<p dir="auto">Pero cuando posteo:</p>
<blockquote>
<p dir="auto">curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" -k -L -b cookies.txt -c cookies.txt -F "subject=Quinto intento test con curl" -F "icon=Standard" -F "message=Hola<br />
msg con curl<br />
Salu2" -F "notify=0" -F "lock=0" -F "additional_options=0" -F "message_mode=0" -F "ns=NS" 'https://forum.pfsense.org/index.php?action=post2;start=0;board=10' &gt; resultado2.html</p>
</blockquote>
<p dir="auto">Me da el error:</p>
<blockquote>
<p dir="auto">Your session timed out while posting. Please try to re-submit your message.</p>
</blockquote>
<p dir="auto">Por lo tanto algo hago mal con la cookie …¿?</p>
<p dir="auto">Salu2</p>
]]></description><link>https://forum.netgate.com/post/621919</link><guid isPermaLink="true">https://forum.netgate.com/post/621919</guid><dc:creator><![CDATA[javcasta]]></dc:creator><pubDate>Tue, 03 May 2016 19:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to Enviar hilo al foro vía curl desde pfSense on Tue, 03 May 2016 16:46:00 GMT]]></title><description><![CDATA[<p dir="auto">No es discriminación, muchos portales necesitan el userAgent para saber cómo responder las peticiones http, digo firefox porque es el más standar, pero si el sistema no reconoce un UserAgent, posiblemente no responda, ya me ha pasado, no he probado con pfsense.org… pero algunos portales me han dado problema si no se identifica un userAgent...</p>
<p dir="auto">Saludos</p>
]]></description><link>https://forum.netgate.com/post/621878</link><guid isPermaLink="true">https://forum.netgate.com/post/621878</guid><dc:creator><![CDATA[rodria]]></dc:creator><pubDate>Tue, 03 May 2016 16:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to Enviar hilo al foro vía curl desde pfSense on Tue, 03 May 2016 16:37:25 GMT]]></title><description><![CDATA[<p dir="auto">Hola.</p>
<p dir="auto">Gracias. Lo probaré, lo del user agent, pero no deberian discriminar por user agent, pero nunca se sabe.<br />
Me da que la cosa va más por la encriptación que usa el foro, tlsv1.2, ya probaré más cosas<br />
Seguramente lo mejor será que lo termine intentando con php más que con comandos de shell, ya veré.</p>
<p dir="auto">Salu2</p>
]]></description><link>https://forum.netgate.com/post/621874</link><guid isPermaLink="true">https://forum.netgate.com/post/621874</guid><dc:creator><![CDATA[javcasta]]></dc:creator><pubDate>Tue, 03 May 2016 16:37:25 GMT</pubDate></item><item><title><![CDATA[Reply to Enviar hilo al foro vía curl desde pfSense on Tue, 03 May 2016 15:04:34 GMT]]></title><description><![CDATA[<p dir="auto">Buenos días</p>
<p dir="auto">Prueba usando la opción -A y colocale el userAgent de firefox</p>
<p dir="auto">Saludos</p>
]]></description><link>https://forum.netgate.com/post/621848</link><guid isPermaLink="true">https://forum.netgate.com/post/621848</guid><dc:creator><![CDATA[rodria]]></dc:creator><pubDate>Tue, 03 May 2016 15:04:34 GMT</pubDate></item></channel></rss>