當前位置:首頁 » 文件管理 » 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保護結束()

這個是模塊 送上

熱點內容
有沒有手機可以用的java編譯器 發布:2025-01-17 03:38:56 瀏覽:541
手把手教你學c語言版 發布:2025-01-17 03:38:52 瀏覽:780
最優化遺傳演算法 發布:2025-01-17 03:35:24 瀏覽:546
四代飛度家用需要加裝哪些配置 發布:2025-01-17 03:34:28 瀏覽:876
安卓手機貓和老鼠怎麼換號 發布:2025-01-17 03:23:58 瀏覽:469
安卓系統怎麼下蝙蝠 發布:2025-01-17 03:20:07 瀏覽:19
加密解密文件 發布:2025-01-17 03:16:32 瀏覽:83
抗震柱加密區 發布:2025-01-17 03:03:06 瀏覽:134
幼兒園源碼php 發布:2025-01-17 02:41:45 瀏覽:401
win引導Linux 發布:2025-01-17 02:36:49 瀏覽:263