.
22
Return normal
The webpage cannot be found in HTTP. The requested URL cannot be found or another HTTP 400 or later error is returned.The returned code only appears after the-f/-- fail option is used.
23
Data writing failed
Write error. CURL cannot write data to a local file system or for similar purposes.
25
Unable to Start Upload
FTP cannot STOR files. The server rejects the
First, capture an image from the camera:
Copy codeThe Code is as follows:While 1: # test the existence of the cameraTry:Cam = Device ()Except t:Print "no webcam found! "ContinueBreak
Then upload the image to the ftp server:
Copy codeThe Code is as follows:Remote = ftplib. FTP ('127. 0.0.1 ') # log on to the serverRemote. login ()File = open('{s.jpg '% cur_time, 'rb') # name the image by TimeRemote. storbinary ('stor upload s.jpg '% cur_time, file) # u
Use Python for file backup1. The server needs to be backed up
Because of business needs, there is a Windows Server 2008 Server. The above files need to be backed up, but the windows cmd command is not well written. I started to write a cmd script with my head and found that I had been searching for time processing for half a day. It is really too difficult to use.2. Use python to solve the problem
Install Python directly on Windows and run the scheduled tasks in Windows.I searched for the ftp ba
The Ftplib module, which is installed by default in Python, defines the FTP class, where functions are limited and can be used to implement a simple FTP client for uploading or downloading filesFTP Workflow and basic operation can refer to protocol RFC959FTP Login ConnectionFrom ftplib import FTP #加载ftp模块Ftp=ftp () #设置变量Ftp.set_debuglevel (2) #打开调试级别2, show detailsFtp.connect ("IP", "Port") #连接的ftp Sever and portsFtp.login ("User", "password") #连接的用户名, passwordPrint Ftp.getwelcome () #打印出欢迎信息Ftp
Normal
HTTP could not find the Web page. The requested URL could not be found or another HTTP 400 or more error was returned.This return code only appears after using the-f/--fail option.
23
Data Write Failed
Write error. CURL cannot write data to local file systems or similar purposes.
25
Unable to start upload
FTP cannot stor files. The server rejected the Stor
In some cases, for security and anti-virus purposes, we need to disable the USB device in WinXP. refer to the following methods.
If the USB interface is not connected to a USB device, you can directly modify the user or group's "deny" permission on the USB stor. pnf and USB stor. inf in the "inf" directory in the system directory. Start the resource manager, find the % SystemRoot % Inf folder, and right-cl
# Exploit title:android ftpserver 1.9.0 Remote DoS# DATE:03/20/12# AUTHOR:G13# Twitter: @g13net# software site:https://sites.google.com/site/andreasliebigapps/ftpserver/# Download link:http://www.g13net.com/ftpserver.apk# version:1.9.0# Category:dos (Android)###### Vulnerability #####Ftpserver is vulnerable to a DoS condition when long file names beRepeatedly attempted to be written via the STOR command.Successful exploitation would causes devices to
This example describes how Python implements a simple FTP client using Ftplib. Share to everyone for your reference. The implementation method is as follows:
#!/usr/bin/python #-*-coding:utf-8-*-from ftplib import FTP #加载ftp模块 ftp=ftp () #设置变量 ftp.set_debuglevel (2) c2/> #打开调试级别2, Show Details ftp.connect ("IP", "Port") #连接的ftp Sever and Port Ftp.login ("User", "password") #连接的用户名, password print Ftp.getwelcome () #打印出欢迎信息 ftp.cmd ("xxx/xxx") #更改远程目录 bufsize=1024 #设置的缓
The first is to capture an image from the camera:
Copy the Code code as follows:
While 1: #测试摄像头的存在
Try
Cam = Device ()
Except
Print "No webcam found!"
Continue
Break
Then upload the image to the FTP server:
Copy the Code code as follows:
Remote = Ftplib. FTP (' 127.0.0.1 ') #登陆服务器
Remote.login ()
File = open ('%s.jpg '%cur_time, ' RB ') #用时间来命名图片
Remote.storbinary (' STOR%s.jpg '%cur_time,file) #上传图片
File.close ()
Of course, finally, delete th
speed.
First, create the FTP_log data table in the MySQL database. The Code is as follows:
Create table FTP_log (id int (12) unsigned DEFAULT '0' not null auto_increment, // primary keyword filename varchar (255), // file name filesize int (10) unsigned, // file size email varchar (20) not null, // the user's account ip address varchar (15) not null, // the user's ip address action varchar (255 ), // user-operated content ftime datetime, // operation time primary
directory tree, the front processor, and the back part selector separately. When I wrote the test code, I wrote nine states of the mesh structure, and the results were a bit dazzling. It would be better to unify them.
Note the construction of the first State and the final state. Otherwise, the system will not be able to stop or embed an endless loop.
// Test code // --------- create part --------- string mess = "";
// 3 IState s3 = new State () {Name = "s3"}; // 2 IState s2 = new State () {Name
recorded in files, and ProFTPD provides the function to record logs to the database. This not only facilitates log query, but also greatly improves the log query speed.
First, create the FTP_log data table in the MySQL database. The Code is as follows:
Create table FTP_log (id int (12) unsigned DEFAULT '0' not null auto_increment, // primary keyword filename varchar (255), // file name filesize int (10) unsigned, // file size email varchar (20) not null, // the us
anonymous login220 You will be disconnected after 15 minutes of inactivity.530 You aren't logged in500 ?500 ?500 ?500 ?500 ?500 ?500 ?500 ?500 ?500 ?500 ?500 ?331 User secforce OK. Password required500 ?500 ?500 ?230 OK. Current directory is /500 ?
If you test it yourself, you may find that not all FTP commands work properly. like MKD/RMD and DEL, GET/PUT, RETR/STOR cannot work normally. this is because FTP is an out-of-band protocol, and its data an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.