- 2


----------------------------------------------------------------------------*/

#include <stdio.h> #include <windows.h> #include "CD.h" #include "SPTI.h" #include "ASPI32.h"

// ,

//------------------------------------------------------

#define _N_SESSION 2 // - #define _TRACK 1 // #define _TRACK_LBA 0x6B124 // LBA- _TRACK

//

//--------------------

#define MAX_TRY 3 // . - TOC'a #define TRY_DELAY 100 // #define MAX_TOC_SIZE (2352) // TOC'a

main(int argc, char **argv)

{

long a, real_len, try = 1; // unsigned char TOC[MAX_TOC_SIZE]; // TOC unsigned char CDB[ATAPI_CDB_SIZE];// SCSI CDB SCSI/ATAPI

// TITLE fprintf(stderr,"crackme 9822C095 by Kris Kaspersky\n"); if (argc <2) { fprintf(stderr,"USAGE:crackme.9822C095h.exe drive\n"); fprintf(stderr,"\tdrive - \\\\.\\X: or Trg.Lun\n"); return -1; } // memset(CDB, 0, ATAPI_CDB_SIZE); memset(TOC, 0, MAX_TOC_SIZE); // CDB-

CDB[0] = 0x43; // READ TOC CDB[2] = 0x2; // RAW TOC CDB[6] = 0; // CDB[7] = HIBYTE(MAX_TOC_SIZE); // ... CDB[8] = LOBYTE(MAX_TOC_SIZE); // ...

// TOC while(1) { // CDB- SCSI/ATAPI

a = SEND_SCSI_CMD(argv[1], CDB, ATAPI_CDB_SIZE, NO_SENSE, TOC, MAX_TOC_SIZE, SCSI_DATA_IN); if (a == SCSI_OK) break; // TOC ,