<?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/9349" />

	<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>2005-03-16T12:32:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[TurboChicken]]></name></author>
		<updated>2005-03-16T12:32:45-04:00</updated>

		<published>2005-03-16T12:32:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47754#p47754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47754#p47754"/>
		<title type="html"><![CDATA[reading command from an ftp site]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47754#p47754"><![CDATA[
need to make a script that will login into an ftp and run a command and return the reply... which i am then going to parse and put into a mysqldb...<br><br>i've found this script on the forum and to test i am trying to make it just display the ftp reply in a channel... unfortunately it doesn't seem to be working.<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !monty ftpcheckproc ftpcheck {n u h t a} {  putserv "PRIVMSG #turbo-test :users working"  set host "ip of site"  set port "port of site"  set user "user"  set pass "pass"  catch {socket $host $port} sock  if {[string match -nocase "sock?" $sock]} {    puts $sock "USER $user"    puts $sock "PASS $pass"    puts $sock "site monthdn 3"    set i 0    while {![eof $sock]} {      flush $sock      gets $sock line      if {[string match -nocase 200 [lindex $line 0]]} {        putserv "#Turbo-test $line"      }      if $i==100 { close $sock }      incr i 1    }  } else {    putserv "PRIVMSG #Turbo-test :Error No Route Host."    return 0  }}</code></pre></div>the first privmsg to turbo-test works but nothing else<br>** EDIT ** i get the no route to host reply now so something wrong with the socket syntax?<br><br>i've logged into the ftp manually from the shell and it works... the reply to site monthdn 3 looks a lil like this<div class="codebox"><p>Code: </p><pre><code>200-     __  _______  _   __________  ______  ____ _       ___   __200-    /  |/  / __ \/ | / /_  __/ / / / __ \/ __ \ |     / / | / /200-   / /|_/ / / / /  |/ / / / / /_/ / / / / / / / | /| / /  |/ /200-  / /  / / /_/ / /|  / / / / __  / /_/ / /_/ /| |/ |/ / /|  /200- /_/  /_/\____/_/ |_/ /_/ /_/ /_/_____/\____/ |__/|__/_/ |_/200-200-   ## User         Tagline                  Files   Amount     Speed200- [ 1] user1        no tagline                6395     242.6GB    - k/s200- [ 2] user2          no tagline                5908     221.1GB  7.4GB/s200- [ 3] user3        no tagline                4167     198.8GB    - k/s200</code></pre></div>now i don't understand alot of the code but i understand enough to think that it should work as it is.... any ideas?<br><br>regards<br>Turbo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5488">TurboChicken</a> — Wed Mar 16, 2005 12:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
