当前位置:首页 » 文件管理 » cftp源码

cftp源码

发布时间: 2022-06-22 17:51:19

1. 高分求C语言数据结构题源代码

数据结构C源代码,数据结构(严慰敏)配套纯C代码
ftp://218.16.224.142/testdoc/%B5%C8%BC%B6%BF%BC%CA%D4/%CA%FD%BE%DD%BD%E1%B9%B9%A3%A8%D1%CF%CE%BF%C3%F4%A3%A9%C5%E4%CC%D7%B4%BFc%B4%FA%C2%EB.rar
树和二叉树在第6章,文件在ch6文件夹
数据结构(严慰敏)原书配套的光盘是伪C/C++源代码

2. 哪儿有linux下的ftp server的c程序源码

ftp server ? 可以到sourceforge或者github开源软件仓库上去查找下载。流行的开源软件也可以,比如ftp filezilla server就是比较流行的。不过不一定是c代码了,也许是c++的。

3. C语言如何连接FTP,连接成功后遍历FTP下目录,包括子目录,要源代码,而且是成功案例,自以为是的靠边站!

用libcurl实现,具体代码看
http://curl.haxx.se/libcurl/c/ftpget.html

4. linux下ftp客户端源码

sudo apt-get source $packagename
$packagename 换成ftp客户端名字,如lftp,我猜lftp是最简单的。
其他常见的有
kftpgrabber
KDE下ftp客户端,支持编码选择。对中文支持较好
gftp
gnome下ftp客户端,目前对中文支持尚不太好,受抱怨颇多。
fireftp
firefox的ftp客户端插件,新版对中文支持较好。
FileZilla
对中文支持较好
CrossFTP
基于java的稳定ftp客户端和同步工具。优良的中文/Unicode支持。

5. c库函数源码

不是你表达不清,也许只是你根本不想仔细看一睛VC下面目录的源码,事实上就是有的。后附其中的qsort.c,以证明所言不虚。

VC的库是提供源码的,这东西也不值钱。
X:\Program Files\Microsoft Visual Studio\VCXX\CRT\SRC
注意有些可能本身是用汇编写的。

/***
*qsort.c - quicksort algorithm; qsort() library function for sorting arrays
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* To implement the qsort() routine for sorting arrays.
*
*******************************************************************************/

#include <cruntime.h>
#include <stdlib.h>
#include <search.h>

/* prototypes for local routines */
static void __cdecl shortsort(char *lo, char *hi, unsigned width,
int (__cdecl *comp)(const void *, const void *));
static void __cdecl swap(char *p, char *q, unsigned int width);

/* this parameter defines the cutoff between using quick sort and
insertion sort for arrays; arrays with lengths shorter or equal to the
below value use insertion sort */

#define CUTOFF 8 /* testing shows that this is good value */

/***
*qsort(base, num, wid, comp) - quicksort function for sorting arrays
*
*Purpose:
* quicksort the array of elements
* side effects: sorts in place
*
*Entry:
* char *base = pointer to base of array
* unsigned num = number of elements in the array
* unsigned width = width in bytes of each array element
* int (*comp)() = pointer to function returning analog of strcmp for
* strings, but supplied by user for comparing the array elements.
* it accepts 2 pointers to elements and returns neg if 1<2, 0 if
* 1=2, pos if 1>2.
*
*Exit:
* returns void
*
*Exceptions:
*
*******************************************************************************/

/* sort the array between lo and hi (inclusive) */

void __cdecl qsort (
void *base,
unsigned num,
unsigned width,
int (__cdecl *comp)(const void *, const void *)
)
{
char *lo, *hi; /* ends of sub-array currently sorting */
char *mid; /* points to middle of subarray */
char *loguy, *higuy; /* traveling pointers for partition step */
unsigned size; /* size of the sub-array */
char *lostk[30], *histk[30];
int stkptr; /* stack for saving sub-array to be processed */

/* Note: the number of stack entries required is no more than
1 + log2(size), so 30 is sufficient for any array */

if (num < 2 || width == 0)
return; /* nothing to do */

stkptr = 0; /* initialize stack */

lo = base;
hi = (char *)base + width * (num-1); /* initialize limits */

/* this entry point is for pseudo-recursion calling: setting
lo and hi and jumping to here is like recursion, but stkptr is
prserved, locals aren't, so we preserve stuff on the stack */
recurse:

size = (hi - lo) / width + 1; /* number of el's to sort */

/* below a certain size, it is faster to use a O(n^2) sorting method */
if (size <= CUTOFF) {
shortsort(lo, hi, width, comp);
}
else {
/* First we pick a partititioning element. The efficiency of the
algorithm demands that we find one that is approximately the
median of the values, but also that we select one fast. Using
the first one proces bad performace if the array is already
sorted, so we use the middle one, which would require a very
wierdly arranged array for worst case performance. Testing shows
that a median-of-three algorithm does not, in general, increase
performance. */

mid = lo + (size / 2) * width; /* find middle element */
swap(mid, lo, width); /* swap it to beginning of array */

/* We now wish to partition the array into three pieces, one
consisiting of elements <= partition element, one of elements
equal to the parition element, and one of element >= to it. This
is done below; comments indicate conditions established at every
step. */

loguy = lo;
higuy = hi + width;

/* Note that higuy decreases and loguy increases on every iteration,
so loop must terminate. */
for (;;) {
/* lo <= loguy < hi, lo < higuy <= hi + 1,
A[i] <= A[lo] for lo <= i <= loguy,
A[i] >= A[lo] for higuy <= i <= hi */

do {
loguy += width;
} while (loguy <= hi && comp(loguy, lo) <= 0);

/* lo < loguy <= hi+1, A[i] <= A[lo] for lo <= i < loguy,
either loguy > hi or A[loguy] > A[lo] */

do {
higuy -= width;
} while (higuy > lo && comp(higuy, lo) >= 0);

/* lo-1 <= higuy <= hi, A[i] >= A[lo] for higuy < i <= hi,
either higuy <= lo or A[higuy] < A[lo] */

if (higuy < loguy)
break;

/* if loguy > hi or higuy <= lo, then we would have exited, so
A[loguy] > A[lo], A[higuy] < A[lo],
loguy < hi, highy > lo */

swap(loguy, higuy, width);

/* A[loguy] < A[lo], A[higuy] > A[lo]; so condition at top
of loop is re-established */
}

/* A[i] >= A[lo] for higuy < i <= hi,
A[i] <= A[lo] for lo <= i < loguy,
higuy < loguy, lo <= higuy <= hi
implying:
A[i] >= A[lo] for loguy <= i <= hi,
A[i] <= A[lo] for lo <= i <= higuy,
A[i] = A[lo] for higuy < i < loguy */

swap(lo, higuy, width); /* put partition element in place */

/* OK, now we have the following:
A[i] >= A[higuy] for loguy <= i <= hi,
A[i] <= A[higuy] for lo <= i < higuy
A[i] = A[lo] for higuy <= i < loguy */

/* We've finished the partition, now we want to sort the subarrays
[lo, higuy-1] and [loguy, hi].
We do the smaller one first to minimize stack usage.
We only sort arrays of length 2 or more.*/

if ( higuy - 1 - lo >= hi - loguy ) {
if (lo + width < higuy) {
lostk[stkptr] = lo;
histk[stkptr] = higuy - width;
++stkptr;
} /* save big recursion for later */

if (loguy < hi) {
lo = loguy;
goto recurse; /* do small recursion */
}
}
else {
if (loguy < hi) {
lostk[stkptr] = loguy;
histk[stkptr] = hi;
++stkptr; /* save big recursion for later */
}

if (lo + width < higuy) {
hi = higuy - width;
goto recurse; /* do small recursion */
}
}
}

/* We have sorted the array, except for any pending sorts on the stack.
Check if there are any, and do them. */

--stkptr;
if (stkptr >= 0) {
lo = lostk[stkptr];
hi = histk[stkptr];
goto recurse; /* pop subarray from stack */
}
else
return; /* all subarrays done */
}

/***
*shortsort(hi, lo, width, comp) - insertion sort for sorting short arrays
*
*Purpose:
* sorts the sub-array of elements between lo and hi (inclusive)
* side effects: sorts in place
* assumes that lo < hi
*
*Entry:
* char *lo = pointer to low element to sort
* char *hi = pointer to high element to sort
* unsigned width = width in bytes of each array element
* int (*comp)() = pointer to function returning analog of strcmp for
* strings, but supplied by user for comparing the array elements.
* it accepts 2 pointers to elements and returns neg if 1<2, 0 if
* 1=2, pos if 1>2.
*
*Exit:
* returns void
*
*Exceptions:
*
*******************************************************************************/

static void __cdecl shortsort (
char *lo,
char *hi,
unsigned width,
int (__cdecl *comp)(const void *, const void *)
)
{
char *p, *max;

/* Note: in assertions below, i and j are alway inside original bound of
array to sort. */

while (hi > lo) {
/* A[i] <= A[j] for i <= j, j > hi */
max = lo;
for (p = lo+width; p <= hi; p += width) {
/* A[i] <= A[max] for lo <= i < p */
if (comp(p, max) > 0) {
max = p;
}
/* A[i] <= A[max] for lo <= i <= p */
}

/* A[i] <= A[max] for lo <= i <= hi */

swap(max, hi, width);

/* A[i] <= A[hi] for i <= hi, so A[i] <= A[j] for i <= j, j >= hi */

hi -= width;

/* A[i] <= A[j] for i <= j, j > hi, loop top condition established */
}
/* A[i] <= A[j] for i <= j, j > lo, which implies A[i] <= A[j] for i < j,
so array is sorted */
}

/***
*swap(a, b, width) - swap two elements
*
*Purpose:
* swaps the two array elements of size width
*
*Entry:
* char *a, *b = pointer to two elements to swap
* unsigned width = width in bytes of each array element
*
*Exit:
* returns void
*
*Exceptions:
*
*******************************************************************************/

static void __cdecl swap (
char *a,
char *b,
unsigned width
)
{
char tmp;

if ( a != b )
/* Do the swap one character at a time to avoid potential alignment
problems. */
while ( width-- ) {
tmp = *a;
*a++ = *b;
*b++ = tmp;
}
}

6. 怎样用c或c++语言编写ftp程序 客户端和服务器端的源代码

这个问题太大了点,你可以去starforge等开源网站上去找这方面的工程。。。

7. 诸位大神谁有java 实现FTP客户端的源码

您好,/ **
*创建日期:2008年12月23日

*类名:Ftp.java

*类路径:组织结构

*更改日志:

* / 包组织结构;

进口的java.io.File;

进口java.io.FileInputStream中;

进口java.io.FileOutputStream中;

进口的java。 io.IOException;

进口sun.net.TelnetInputStream;

进口sun.net.TelnetOutputStream;

进口sun.net.ftp.FtpClient;

> / **

* @作者南山地狱

* @说明FTP操作

* /

公共类的Ftp {

/ **

* BR />获取FTP目录* / 公共无效getftpList(){

字符串服务器=“IP地址 /输入FTP服务器/>弦乐用户=”“;/ / FTP服务器的登录用户名

字符串密码=“”;/ /登录FTP服务器的用户名

字符串路径密码=“”;/ / FTP路径上的服务器

尝试{
> FtpClient的FTP客户端=新FtpClient的();/ /创建FtpClient的对象

ftpClient.openServer(服务器);/ /连接到FTP服务器

ftpClient.login(用户名,密码);/ / FTP服务器 BR />如果(path.length()= 0){

ftpClient.cd(路径);

}

TelnetInputStream是= ftpClient.list();

诠释三;

而{

System.out.print((char)的C)((C = is.read())= -1!);

}

掉} is.close ();

ftpClient.closeServer();/ /退出FTP服务器

}赶上(IOException异常前){

System.out.println(ex.getMessage());

}

}

/ **

*
* /

公共无效getFtpFile(){

字符串服务器=“”;/ / IP地址中输入FTP服务器

弦乐用户=“”;/ / FTP服务器的登录用户名

字符串密码=“”;/ /登录密码为FTP服务器的用户名

字符串路径=“路径

字符串文件名“;/ /上=的FTP服务器”“;/ /下载文件名称

尝试{

FtpClient的FTP客户端=新FtpClient的();

ftpClient.openServer(服务器);

ftpClient.login(用户名,密码);

如果(路径。长度()= 0)

ftpClient.cd(路径);!

ftpClient.binary();

TelnetInputStream是= ftpClient.get(文件名);

文件file_out =新的文件(文件名);

文件输出流OS =新的文件输出流(file_out);

字节[]字节=新字节[1024];

诠释三;

而((C = is.read(字节))= -1){

os.write (字节,0,C);

}!

掉} is.close();

os.close();

ftpClient.closeServer();

}赶上(IOException异常前){

System.out.println (ex.getMessage());

}

FTP}

/ **

*文件上传到FTP

* /

公共无效putFtpFile() {

字符串服务器=“”;/ /输入IP地址对服务器

字符串用户的地址=“”;/ / FTP服务器的登录用户名

字符串密码=“”;/ / FTP服务器登录用户名密码

字符串路径=“”就 / FTP服务器/>字符串文件名=“”;/ /上传的文件名

FtpClient的FTP客户端=新的try { FtpClient的();

ftpClient.openServer(服务器);

ftpClient.login(用户名,密码);

如果(!path.length()= 0)

ftpClient.cd (路径);

ftpClient.binary();

TelnetOutputStream OS = ftpClient.put(文件名);

文件file_in =新的文件(文件名);

文件输入流是=新的文件输入流(file_in);

字节[]字节=新字节[1024];

诠释三;

同时(! (C = is.read(字节))= -1){

操作系统。写(字节,0,C);

}

掉} is.close();

os.close();

ftpClient.closeServer();

}赶上(IOException异常前){

System.out.println(ex.getMessage());

}

}
}

8. 我有源码怎么搭建

看你是什么源码,如果是c端,就得进行编译成安装包,譬如电脑一般是exe,手机安卓的是apk等,如果带是b端就得放在服务器上配置环境,还有的有参数,安装就可以了,在浏览器就可以正常访问,所以要清楚你是啥类型的,才好办,不会弄可以直接找额代搭建,有长期技术支持

9. 在哪里可以找到C语言标准库的实现源代码

Linux下的glic库的源码链接:
http://ftp.gnu.org/gnu/glibc/,你可以下载最新版本的glibc-2.24.tar.gz这个压缩文件,在Windows系统下直接用WinRAR解压即可,如果在Linux系统下用命令行解压的话,命令如下:tar -xzvf glibc-2.24.tar.gz。

10. 求易语言绕过cfTP安全的源码

用vmp保护模块

VMP保护开始()

欲保护的程序

VMP保护结束()

这个是模块 送上

热点内容
招标服务器云 发布:2024-05-19 20:04:19 浏览:583
搭建小米云服务器 发布:2024-05-19 19:43:17 浏览:130
苹果手机备忘录怎么加密 发布:2024-05-19 18:57:57 浏览:16
光荣脚本 发布:2024-05-19 18:57:48 浏览:997
pythonjson字符串 发布:2024-05-19 18:51:43 浏览:253
什么是服务器厂商介绍 发布:2024-05-19 18:50:09 浏览:371
服务器网卡硬件型号怎么看 发布:2024-05-19 18:36:41 浏览:666
修改pve服务器ip 发布:2024-05-19 18:31:52 浏览:469
微信密码忘记了如何取出里面的钱 发布:2024-05-19 18:27:35 浏览:330
vs2005反编译 发布:2024-05-19 18:26:34 浏览:364