FFFTPのソースコードです。
Revisão | a6ad52fc660a65af4a3a9680a2aeaf1aebceaeb5 (tree) |
---|---|
Hora | 2013-10-19 20:03:05 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix spelling mistakes.
@@ -316,7 +316,7 @@ | ||
316 | 316 | // uClinux |
317 | 317 | #define LIST_UNIX_17 51 /* UNIX 17 */ |
318 | 318 | // Windows Server 2008 R2 |
319 | -#define LIST_DOS_5 52 /* MS-DOS 4 */ | |
319 | +#define LIST_DOS_5 52 /* MS-DOS 5 */ | |
320 | 320 | |
321 | 321 | #define LIST_MELCOM 0x100 /* MELCOM80 */ |
322 | 322 |
@@ -99,7 +99,7 @@ extern int FwallPort; | ||
99 | 99 | extern int FwallType; |
100 | 100 | extern int FwallDefault; |
101 | 101 | extern int FwallSecurity; |
102 | -extern int FwallResolv; | |
102 | +extern int FwallResolve; | |
103 | 103 | extern int FwallLower; |
104 | 104 | extern int FwallDelimiter; |
105 | 105 | extern int PasvDefault; |
@@ -2018,7 +2018,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
2018 | 2018 | if((Type == MD4) || (Type == MD5) || (Type == SHA1)) |
2019 | 2019 | { |
2020 | 2020 | /* シーケンス番号を見つけるループ */ |
2021 | - DoPrintf("Analize OTP"); | |
2021 | + DoPrintf("Analyze OTP"); | |
2022 | 2022 | DoPrintf("%s", Pos); |
2023 | 2023 | Sts = FFFTP_FAIL; |
2024 | 2024 | while((Pos = GetNextField(Pos)) != NULL) |
@@ -2248,7 +2248,7 @@ SOCKET connectsockIPv4(char *host, int port, char *PreMsg, int *CancelCheckWork) | ||
2248 | 2248 | // ホスト名が指定された |
2249 | 2249 | // ホスト名からアドレスを求める |
2250 | 2250 | if(((Fwall == FWALL_SOCKS5_NOAUTH) || (Fwall == FWALL_SOCKS5_USER)) && |
2251 | - (FwallResolv == YES)) | |
2251 | + (FwallResolve == YES)) | |
2252 | 2252 | { |
2253 | 2253 | // ホスト名解決はSOCKSサーバに任せる |
2254 | 2254 | pHostEntry = NULL; |
@@ -2453,7 +2453,7 @@ SOCKET connectsockIPv6(char *host, int port, char *PreMsg, int *CancelCheckWork) | ||
2453 | 2453 | // ホスト名が指定された |
2454 | 2454 | // ホスト名からアドレスを求める |
2455 | 2455 | if(((Fwall == FWALL_SOCKS5_NOAUTH) || (Fwall == FWALL_SOCKS5_USER)) && |
2456 | - (FwallResolv == YES)) | |
2456 | + (FwallResolve == YES)) | |
2457 | 2457 | { |
2458 | 2458 | // ホスト名解決はSOCKSサーバに任せる |
2459 | 2459 | pHostEntry = NULL; |
@@ -98,14 +98,14 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd); | ||
98 | 98 | static int MakeDirPath(char *Str, int ListType, char *Path, char *Dir); |
99 | 99 | static void MakeLocalTree(char *Path, FILELIST **Base); |
100 | 100 | static void AddFileList(FILELIST *Pkt, FILELIST **Base); |
101 | -static int AnalizeFileInfo(char *Str); | |
101 | +static int AnalyzeFileInfo(char *Str); | |
102 | 102 | static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day); |
103 | 103 | static int CheckHHMMformat(char *Str); |
104 | 104 | static int CheckYYMMDDformat(char *Str, char Sym, int Dig3); |
105 | 105 | static int CheckYYYYMMDDformat(char *Str, char Sym); |
106 | 106 | // Windows Server 2008 R2 |
107 | 107 | static int CheckMMDDYYYYformat(char *Str, char Sym); |
108 | -static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, FILETIME *Time, int *Attr, char *Owner, int *Link, int *InfoExist); | |
108 | +static int ResolveFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, FILETIME *Time, int *Attr, char *Owner, int *Link, int *InfoExist); | |
109 | 109 | static int FindField(char *Str, char *Buf, int Num, int ToLast); |
110 | 110 | // MLSD対応 |
111 | 111 | static int FindField2(char *Str, char *Buf, char Separator, int Num, int ToLast); |
@@ -1303,9 +1303,9 @@ void GetRemoteDirForWnd(int Mode, int *CancelCheckWork) | ||
1303 | 1303 | |
1304 | 1304 | while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS) |
1305 | 1305 | { |
1306 | - if((ListType = AnalizeFileInfo(Str)) != LIST_UNKNOWN) | |
1306 | + if((ListType = AnalyzeFileInfo(Str)) != LIST_UNKNOWN) | |
1307 | 1307 | { |
1308 | - if((Type = ResolvFileInfo(Str, ListType, Buf, &Size, &Time, &Attr, Owner, &Link, &InfoExist)) != NODE_NONE) | |
1308 | + if((Type = ResolveFileInfo(Str, ListType, Buf, &Size, &Time, &Attr, Owner, &Link, &InfoExist)) != NODE_NONE) | |
1309 | 1309 | { |
1310 | 1310 | if(AskFilterStr(Buf, Type) == YES) |
1311 | 1311 | { |
@@ -3195,7 +3195,7 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base) | ||
3195 | 3195 | |
3196 | 3196 | while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS) |
3197 | 3197 | { |
3198 | - if((ListType = AnalizeFileInfo(Str)) == LIST_UNKNOWN) | |
3198 | + if((ListType = AnalyzeFileInfo(Str)) == LIST_UNKNOWN) | |
3199 | 3199 | { |
3200 | 3200 | if(MakeDirPath(Str, ListType, Path, Dir) == FFFTP_SUCCESS) |
3201 | 3201 | { |
@@ -3215,7 +3215,7 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base) | ||
3215 | 3215 | } |
3216 | 3216 | else |
3217 | 3217 | { |
3218 | - Node = ResolvFileInfo(Str, ListType, Name, &Size, &Time, &Attr, Owner, &Link, &InfoExist); | |
3218 | + Node = ResolveFileInfo(Str, ListType, Name, &Size, &Time, &Attr, Owner, &Link, &InfoExist); | |
3219 | 3219 | |
3220 | 3220 | if(AskFilterStr(Name, Node) == YES) |
3221 | 3221 | { |
@@ -3576,7 +3576,7 @@ FILELIST *SearchFileList(char *Fname, FILELIST *Base, int Caps) | ||
3576 | 3576 | * int リストタイプ (LIST_xxx) |
3577 | 3577 | *----------------------------------------------------------------------------*/ |
3578 | 3578 | |
3579 | -static int AnalizeFileInfo(char *Str) | |
3579 | +static int AnalyzeFileInfo(char *Str) | |
3580 | 3580 | { |
3581 | 3581 | int Ret; |
3582 | 3582 | char Tmp[FMAX_PATH+1]; |
@@ -4403,7 +4403,7 @@ static int CheckMMDDYYYYformat(char *Str, char Sym) | ||
4403 | 4403 | * int 種類 (NODE_xxxx) |
4404 | 4404 | *----------------------------------------------------------------------------*/ |
4405 | 4405 | |
4406 | -static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, FILETIME *Time, int *Attr, char *Owner, int *Link, int *InfoExist) | |
4406 | +static int ResolveFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, FILETIME *Time, int *Attr, char *Owner, int *Link, int *InfoExist) | |
4407 | 4407 | { |
4408 | 4408 | SYSTEMTIME sTime; |
4409 | 4409 | SYSTEMTIME sTimeNow; |
@@ -6177,10 +6177,10 @@ int AnalyzeNameKanjiCode(int Num) | ||
6177 | 6177 | { |
6178 | 6178 | while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS) |
6179 | 6179 | { |
6180 | - if((ListType = AnalizeFileInfo(Str)) != LIST_UNKNOWN) | |
6180 | + if((ListType = AnalyzeFileInfo(Str)) != LIST_UNKNOWN) | |
6181 | 6181 | { |
6182 | 6182 | strcpy(Name, ""); |
6183 | - Node = ResolvFileInfo(Str, ListType | LIST_RAW_NAME, Name, &Size, &Time, &Attr, Owner, &Link, &InfoExist); | |
6183 | + Node = ResolveFileInfo(Str, ListType | LIST_RAW_NAME, Name, &Size, &Time, &Attr, Owner, &Link, &InfoExist); | |
6184 | 6184 | p = Name; |
6185 | 6185 | while(*p != '\0') |
6186 | 6186 | { |
@@ -209,7 +209,7 @@ int FwallPort = PORT_NOR; | ||
209 | 209 | int FwallType = 1; |
210 | 210 | int FwallDefault = NO; |
211 | 211 | int FwallSecurity = SECURITY_AUTO; |
212 | -int FwallResolv = NO; | |
212 | +int FwallResolve = NO; | |
213 | 213 | int FwallLower = NO; |
214 | 214 | int FwallDelimiter = '@'; |
215 | 215 | // ルータ対策 |
@@ -136,7 +136,7 @@ extern int FwallPort; | ||
136 | 136 | extern int FwallType; |
137 | 137 | extern int FwallDefault; |
138 | 138 | extern int FwallSecurity; |
139 | -extern int FwallResolv; | |
139 | +extern int FwallResolve; | |
140 | 140 | extern int FwallLower; |
141 | 141 | extern int FwallDelimiter; |
142 | 142 | extern int PasvDefault; |
@@ -1428,7 +1428,7 @@ static INT_PTR CALLBACK FireSettingProc(HWND hDlg, UINT message, WPARAM wParam, | ||
1428 | 1428 | |
1429 | 1429 | SendDlgItemMessage(hDlg, FIRE_USEIT, BM_SETCHECK, FwallDefault, 0); |
1430 | 1430 | SendDlgItemMessage(hDlg, FIRE_PASV, BM_SETCHECK, PasvDefault, 0); |
1431 | - SendDlgItemMessage(hDlg, FIRE_RESOLV, BM_SETCHECK, FwallResolv, 0); | |
1431 | + SendDlgItemMessage(hDlg, FIRE_RESOLV, BM_SETCHECK, FwallResolve, 0); | |
1432 | 1432 | SendDlgItemMessage(hDlg, FIRE_LOWER, BM_SETCHECK, FwallLower, 0); |
1433 | 1433 | |
1434 | 1434 | SendDlgItemMessage(hDlg, FIRE_SECURITY, CB_ADDSTRING, 0, (LPARAM)MSGJPN212); |
@@ -1455,7 +1455,7 @@ static INT_PTR CALLBACK FireSettingProc(HWND hDlg, UINT message, WPARAM wParam, | ||
1455 | 1455 | FwallDelimiter = Tmp[0]; |
1456 | 1456 | FwallDefault = SendDlgItemMessage(hDlg, FIRE_USEIT, BM_GETCHECK, 0, 0); |
1457 | 1457 | PasvDefault = SendDlgItemMessage(hDlg, FIRE_PASV, BM_GETCHECK, 0, 0); |
1458 | - FwallResolv = SendDlgItemMessage(hDlg, FIRE_RESOLV, BM_GETCHECK, 0, 0); | |
1458 | + FwallResolve = SendDlgItemMessage(hDlg, FIRE_RESOLV, BM_GETCHECK, 0, 0); | |
1459 | 1459 | FwallLower = SendDlgItemMessage(hDlg, FIRE_LOWER, BM_GETCHECK, 0, 0); |
1460 | 1460 | FwallSecurity = SendDlgItemMessage(hDlg, FIRE_SECURITY, CB_GETCURSEL, 0, 0); |
1461 | 1461 | break; |
@@ -94,12 +94,12 @@ _CryptCATAdminCalcHashFromFileHandle p_CryptCATAdminCalcHashFromFileHandle; | ||
94 | 94 | |
95 | 95 | #define MAX_LOCKED_THREAD 16 |
96 | 96 | #define MAX_TRUSTED_FILENAME_TABLE 16 |
97 | -#define MAX_TRUSTED_MD5_HASH_TABLE 16 | |
97 | +#define MAX_TRUSTED_SHA1_HASH_TABLE 16 | |
98 | 98 | |
99 | 99 | DWORD g_ProcessProtectionLevel; |
100 | 100 | DWORD g_LockedThread[MAX_LOCKED_THREAD]; |
101 | 101 | WCHAR* g_pTrustedFilenameTable[MAX_TRUSTED_FILENAME_TABLE]; |
102 | -BYTE g_TrustedMD5HashTable[MAX_TRUSTED_MD5_HASH_TABLE][20]; | |
102 | +BYTE g_TrustedSHA1HashTable[MAX_TRUSTED_SHA1_HASH_TABLE][20]; | |
103 | 103 | WNDPROC g_PasswordEditControlProc; |
104 | 104 | |
105 | 105 | // 以下フック関数 |
@@ -379,9 +379,9 @@ BOOL FindTrustedModuleSHA1Hash(void* pHash) | ||
379 | 379 | int i; |
380 | 380 | bResult = FALSE; |
381 | 381 | i = 0; |
382 | - while(i < MAX_TRUSTED_MD5_HASH_TABLE) | |
382 | + while(i < MAX_TRUSTED_SHA1_HASH_TABLE) | |
383 | 383 | { |
384 | - if(memcmp(&g_TrustedMD5HashTable[i], pHash, 20) == 0) | |
384 | + if(memcmp(&g_TrustedSHA1HashTable[i], pHash, 20) == 0) | |
385 | 385 | { |
386 | 386 | bResult = TRUE; |
387 | 387 | break; |
@@ -852,11 +852,11 @@ BOOL RegisterTrustedModuleSHA1Hash(void* pHash) | ||
852 | 852 | else |
853 | 853 | { |
854 | 854 | i = 0; |
855 | - while(i < MAX_TRUSTED_MD5_HASH_TABLE) | |
855 | + while(i < MAX_TRUSTED_SHA1_HASH_TABLE) | |
856 | 856 | { |
857 | - if(memcmp(&g_TrustedMD5HashTable[i], &NullHash, 20) == 0) | |
857 | + if(memcmp(&g_TrustedSHA1HashTable[i], &NullHash, 20) == 0) | |
858 | 858 | { |
859 | - memcpy(&g_TrustedMD5HashTable[i], pHash, 20); | |
859 | + memcpy(&g_TrustedSHA1HashTable[i], pHash, 20); | |
860 | 860 | bResult = TRUE; |
861 | 861 | break; |
862 | 862 | } |
@@ -874,11 +874,11 @@ BOOL UnregisterTrustedModuleSHA1Hash(void* pHash) | ||
874 | 874 | int i; |
875 | 875 | bResult = FALSE; |
876 | 876 | i = 0; |
877 | - while(i < MAX_TRUSTED_MD5_HASH_TABLE) | |
877 | + while(i < MAX_TRUSTED_SHA1_HASH_TABLE) | |
878 | 878 | { |
879 | - if(memcmp(&g_TrustedMD5HashTable[i], pHash, 20) == 0) | |
879 | + if(memcmp(&g_TrustedSHA1HashTable[i], pHash, 20) == 0) | |
880 | 880 | { |
881 | - memcpy(&g_TrustedMD5HashTable[i], &NullHash, 20); | |
881 | + memcpy(&g_TrustedSHA1HashTable[i], &NullHash, 20); | |
882 | 882 | bResult = TRUE; |
883 | 883 | break; |
884 | 884 | } |
@@ -165,7 +165,7 @@ extern int FwallPort; | ||
165 | 165 | extern int FwallType; |
166 | 166 | extern int FwallDefault; |
167 | 167 | extern int FwallSecurity; |
168 | -extern int FwallResolv; | |
168 | +extern int FwallResolve; | |
169 | 169 | extern int FwallLower; |
170 | 170 | extern int FwallDelimiter; |
171 | 171 | extern int PasvDefault; |
@@ -455,7 +455,7 @@ void SaveRegistry(void) | ||
455 | 455 | WriteIntValueToReg(hKey4, "FwallDef", FwallDefault); |
456 | 456 | WriteIntValueToReg(hKey4, "FwallSec", FwallSecurity); |
457 | 457 | WriteIntValueToReg(hKey4, "PasvDef", PasvDefault); |
458 | - WriteIntValueToReg(hKey4, "FwallRes", FwallResolv); | |
458 | + WriteIntValueToReg(hKey4, "FwallRes", FwallResolve); | |
459 | 459 | WriteIntValueToReg(hKey4, "FwallLow", FwallLower); |
460 | 460 | WriteIntValueToReg(hKey4, "FwallDel", FwallDelimiter); |
461 | 461 |
@@ -906,7 +906,7 @@ int LoadRegistry(void) | ||
906 | 906 | ReadIntValueFromReg(hKey4, "FwallDef", &FwallDefault); |
907 | 907 | ReadIntValueFromReg(hKey4, "FwallSec", &FwallSecurity); |
908 | 908 | ReadIntValueFromReg(hKey4, "PasvDef", &PasvDefault); |
909 | - ReadIntValueFromReg(hKey4, "FwallRes", &FwallResolv); | |
909 | + ReadIntValueFromReg(hKey4, "FwallRes", &FwallResolve); | |
910 | 910 | ReadIntValueFromReg(hKey4, "FwallLow", &FwallLower); |
911 | 911 | ReadIntValueFromReg(hKey4, "FwallDel", &FwallDelimiter); |
912 | 912 |