<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/7762" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-06-26T10:27:22-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/7762</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-06-26T10:27:22-04:00</updated>

		<published>2004-06-26T10:27:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37898#p37898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37898#p37898"/>
		<title type="html"><![CDATA[CGI Expect TCL Script Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37898#p37898"><![CDATA[
if anyone can help me get this working or write something that will work then please contact me with a offer on dean_dodd at yahoo.com<br><br>I'm hoping to get a script working on my host that will work with the Horde project "passwd" <a href="http://www.horde.org" class="postlink">www.horde.org</a><br><br>It can written in either PHP, Perl or Expect TCL, if you can do it get in touch with a offer.<br><br>Thanks<p>Statistics: Posted by Guest — Sat Jun 26, 2004 10:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-06-23T09:04:36-04:00</updated>

		<published>2004-06-23T09:04:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37754#p37754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37754#p37754"/>
		<title type="html"><![CDATA[CGI Expect TCL Script Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37754#p37754"><![CDATA[
I have this Expect TCL script which is working but I need a small alteration.<br><br>#!/usr/bin/expect --<br><br>puts "Content-type: text/html\n" ;# note extra newline<br><br>puts "<br>&lt;head&gt;<br>&lt;title&gt;Password Change Result&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;h2&gt;Password Change Result&lt;/h2&gt;<br>"<br><br>proc cgi2ascii {buf} {<br>regsub -all {\+} $buf { } buf<br>regsub -all {([\\["$])} $buf {\\\1} buf<br>regsub -all -nocase "%0d%0a" $buf "\n" buf<br>regsub -all -nocase {%([a-f0-9][a-f0-9])} $buf {[format %c 0x\1]} buf<br>eval return \"$buf\"<br>}<br><br>foreach pair [split [read stdin $env(CONTENT_LENGTH)] &amp;] {<br>regexp (.*)=(.*) $pair dummy varname val<br>set val [cgi2ascii $val]<br>set var($varname) $val<br>}<br><br>log_user 0<br><br>proc errormsg {s} {puts "&lt;h3&gt;Password Not Changed: $s&lt;/h3&gt;"}<br>proc successmsg {s} {puts "&lt;h3&gt;$s&lt;/h3&gt;"}<br><br>spawn /bin/su $var(name) -c "/usr/bin/passwd $var(name)"<br><br>expect {<br>"/bin/su:" {<br>errormsg "check your username"<br>exit<br>} default {<br>errormsg "$expect_out(buffer)"<br>exit<br>} "Password:"<br>}<br>send "$var(old)\r"<br>expect {<br>"/bin/su:" {<br>errormsg "old password incorrect"<br>exit<br>} default {<br>errormsg "$expect_out(buffer)"<br>exit<br>} "password:"<br>}<br>send "$var(old)\r"<br>expect "password:"<br>send "$var(new1)\r"<br>expect "password:"<br>send "$var(new2)\r"<br>close<br>wait<br><br>if {[info exists error]} {<br>errormsg "$error"<br>} else {<br>successmsg "Password changed successfully&lt;/p&gt;<br>Please login with your new details"<br>}<br><br><br>If the security requirements are not met on the new password the script still reports the password was changed. If the password is not changed passwd reports:<br><br>passwd: "the error"<br><br>I need the script to not say the password was changed or not.  If "passwd:" was the last message then error else give the success message.<br><br>Thanks<br>Dean.[/code]<p>Statistics: Posted by Guest — Wed Jun 23, 2004 9:04 am</p><hr />
]]></content>
	</entry>
	</feed>
