Jump to content

Recommended Posts

Posted

Iis it just me, or are the ftp servers misbehaving? I can't access my ftp server, and I have people accessing it all the time, so it's a bit of a problem.

 

Username: eap17

ftp: ftp.eap17.heliohost.org

Posted

It's a custon jython script. I made a little part of my ftp server with a username and password for everyone. Don't ask why. Anyway, here's the jython script, with the credentials omited:

 

connected = false
from ftplib import FTP
def connect(host,username,password):
global ftp
global connected
if connected == false:
	ftp = FTP(host,username,password)
	connected = true

def upload(filename,name):
global ftp
global connected
if connected == true:
	test = open(filename, 'r')
	ftp.storbinary('STOR ' + name, test)
	test.close()

def download(filename,path):
global ftp
global connected
if connected == true:
	dir = open(path, 'w')
	file = ftp.retrbinary('RETR ' + filename, dir.write)
	dir.close()

def close():
global ftp
global connected
if connected == true:
	ftp.quit()
		connected = false

def getwelcome():
global ftp
global connected
if connected == true:
	world.output = ftp.getwelcome()

def rename(oldfile,newfile):
global ftp
global connected
if connected == true:
	ftp.rename(oldfile,newfile)

def delete(file):
global ftp
global connected
if connected == true:
	ftp.delete(file)

def setdir(dir):
global ftp
global connected
if connected == true:
	ftp.cwd(dir)

def makedir(dir):
global ftp
global connected
if connected == true:
	mkd(dir)

def deldir(dir):
global ftp
global connected
if connected == true:
	ftp.rmd(dir)

 

Right now, it just seeems to be running really slow. I need high speed. I'm only transmitting files of 5kb down, and they need to go FAST.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...