home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-10 | 74.3 KB | 2,257 lines |
- //////////////////////////// TH100.SLT ///////////////////////////////////////
-
- // The muther fuckin awesome Telix Hacker (TH, duh) script.
-
- // Shawn-da-Lay Boy Productions (tm) (c) 1989, 1990, 2001...
-
-
- // Maintanence and Version Notes:
-
- // Version 0.00 Alpha dude... like I just started, ya know... 891218
-
- // Version 0.01 First Alpha release. 900124
-
- // Version 0.02 First functional Alpha release. 900125
-
- // Version 0.03 Aplha: Make SEEDHn and SEEDLn work... 900127
-
- // Version 0.10 Beta.. have at it!!! 900129
-
- // Version 0.11 Beta.. Fix everything that didn't work 900130
-
- // Version 0.12 Beta.. clean up some code... 900131
-
- // Version 0.20 Beta.. add lower case letters... 900201
-
- // Version 0.30 Beta.. add password filez.... 900203
-
- // Version 0.40 Beta.. add master password list 900206
-
- // Version 0.45 Beta.. add password positioning 900208
-
- // Version 0.50 Beta.. minor code cleanup... 900215
-
- // Version 0.75 Beta.. and NOGOOD and cleanup... 900226
-
- // Version 1.00 The first full boddied release... 900419
-
- // Version 1.10 Allow specification of Ctrl-char combos 900510
-
- //////////////////////////////////////////////////////////////////////////////
-
- int cfgfile, logfile, goodfile, ctlfile;
- str string[80] = " ", word[270] = " ";
- str data[80] = " ";
- str data1[18] = "";
- str data2[216] = "";
-
- str dialnum[60] = "0"; // inital dial to bad value
- int hackcount = 0; // unlimited attempts
- int force = 0; // force to 0
- int trycount = 0; // hack tries before redialing
- str cracked[40] = ""; // init good string.
- int no_good = 0; // good flag
-
- str sendtxt[400] = ""; // stash send strings
- str send_ptr[40] = ""; // pointer to the strings
-
- str wait[400] = ""; // stash wait strings
- str wait_ptr[40] = ""; // pointer to wait strings
-
- str passfile[12] = ""; // hack password file
- int passfh = 0; // file handle...
- str password[60] = ""; // password
- int seek_record = 0;
-
- int master_file = 0; // master_file flag
- int got_master = 0; // master file opened flag
-
- str plate[90] = ""; // plates
- str plt_ptr[30] = ""; // pointers to plate fields
- str plt0[9] = ""; // init 1st plt string
- str plt1[9] = ""; // init 2nd plt string
- str plt2[9] = ""; // init 3th plt string
- str plt3[9] = ""; // init 4th plt string
- str plt4[9] = ""; // init 5th plt string
- str plt5[9] = ""; // init 6th plt string
- str plt6[9] = ""; // init 7th plt string
- str plt7[9] = ""; // init 8th plt string
- str plt8[9] = ""; // init 9th plt string
- str plt9[9] = ""; // init last plt string
-
- str seedl[90] = ""; // seedls
- str seedl_ptr[30] = ""; // pointers to seedl fields
- str seedl0[9] = ""; // init 1st seedl string
- str seedl1[9] = ""; // init 2nd seedl string
- str seedl2[9] = ""; // init 3th seedl string
- str seedl3[9] = ""; // init 4th seedl string
- str seedl4[9] = ""; // init 5th seedl string
- str seedl5[9] = ""; // init 6th seedl string
- str seedl6[9] = ""; // init 7th seedl string
- str seedl7[9] = ""; // init 8th seedl string
- str seedl8[9] = ""; // init 9th seedl string
- str seedl9[9] = ""; // init last seedl string
-
- str seedh[90] = ""; // seedhs
- str seedh_ptr[30] = ""; // pointers to seedh fields
- str seedh0[9] = ""; // init 1st seedh string
- str seedh1[9] = ""; // init 2nd seedh string
- str seedh2[9] = ""; // init 3th seedh string
- str seedh3[9] = ""; // init 4th seedh string
- str seedh4[9] = ""; // init 5th seedh string
- str seedh5[9] = ""; // init 6th seedh string
- str seedh6[9] = ""; // init 7th seedh string
- str seedh7[9] = ""; // init 8th seedh string
- str seedh8[9] = ""; // init 9th seedh string
- str seedh9[9] = ""; // init last seedh string
-
- str hck0_seed[216] = ""; // seed values *matches hck_val
- str hck1_seed[216] = ""; // seed values *matches hck_val
- str hck2_seed[216] = ""; // seed values *matches hck_val
- str hck3_seed[216] = ""; // seed values *matches hck_val
- str hck4_seed[216] = ""; // seed values *matches hck_val
- str hck5_seed[216] = ""; // seed values *matches hck_val
- str hck6_seed[216] = ""; // seed values *matches hck_val
- str hck7_seed[216] = ""; // seed values *matches hck_val
- str hck8_seed[216] = ""; // seed values *matches hck_val
- str hck9_seed[216] = ""; // seed values *matches hck_val
- str hck0_sdptr[18] = ""; // seed pointers
- str hck1_sdptr[18] = ""; // seed pointers
- str hck2_sdptr[18] = ""; // seed pointers
- str hck3_sdptr[18] = ""; // seed pointers
- str hck4_sdptr[18] = ""; // seed pointers
- str hck5_sdptr[18] = ""; // seed pointers
- str hck6_sdptr[18] = ""; // seed pointers
- str hck7_sdptr[18] = ""; // seed pointers
- str hck8_sdptr[18] = ""; // seed pointers
- str hck9_sdptr[18] = ""; // seed pointers
-
- str hck0_val[270] = ""; // pointer to hack substitutions.
- str hck1_val[270] = ""; // pointer to hack substitutions.
- str hck2_val[270] = ""; // pointer to hack substitutions.
- str hck3_val[270] = ""; // pointer to hack substitutions.
- str hck4_val[270] = ""; // pointer to hack substitutions.
- str hck5_val[270] = ""; // pointer to hack substitutions.
- str hck6_val[270] = ""; // pointer to hack substitutions.
- str hck7_val[270] = ""; // pointer to hack substitutions.
- str hck8_val[270] = ""; // pointer to hack substitutions.
- str hck9_val[270] = ""; // pointer to hack substitutions.
-
- str hckl0_val[270] = ""; // pointer to hack substitutions.
- str hckl1_val[270] = ""; // pointer to hack substitutions.
- str hckl2_val[270] = ""; // pointer to hack substitutions.
- str hckl3_val[270] = ""; // pointer to hack substitutions.
- str hckl4_val[270] = ""; // pointer to hack substitutions.
- str hckl5_val[270] = ""; // pointer to hack substitutions.
- str hckl6_val[270] = ""; // pointer to hack substitutions.
- str hckl7_val[270] = ""; // pointer to hack substitutions.
- str hckl8_val[270] = ""; // pointer to hack substitutions.
- str hckl9_val[270] = ""; // pointer to hack substitutions.
-
- str hck0_ptr[24] = ""; // pointer to hack string. ppl
- str hck1_ptr[24] = ""; // pointer to hack string.
- str hck2_ptr[24] = ""; // pointer to hack string.
- str hck3_ptr[24] = ""; // pointer to hack string.
- str hck4_ptr[24] = ""; // pointer to hack string.
- str hck5_ptr[24] = ""; // pointer to hack string.
- str hck6_ptr[24] = ""; // pointer to hack string.
- str hck7_ptr[24] = ""; // pointer to hack string.
- str hck8_ptr[24] = ""; // pointer to hack string.
- str hck9_ptr[24] = ""; // pointer to hack string.
-
- int offset = 0; //offset of PASSFILE into hack
- int pwl = 0; // length of last password tried
- int hacko0 = 0; // offset into hachn
- int hacko1 = 0; // offset into hachn
- int hacko2 = 0; // offset into hachn
- int hacko3 = 0; // offset into hachn
- int hacko4 = 0; // offset into hachn
- int hacko5 = 0; // offset into hachn
- int hacko6 = 0; // offset into hachn
- int hacko7 = 0; // offset into hachn
- int hacko8 = 0; // offset into hachn
- int hacko9 = 0; // offset into hachn
- int hackpwl0 = 0; // length of pw in hachn
- int hackpwl1 = 0; // length of pw in hachn
- int hackpwl2 = 0; // length of pw in hachn
- int hackpwl3 = 0; // length of pw in hachn
- int hackpwl4 = 0; // length of pw in hachn
- int hackpwl5 = 0; // length of pw in hachn
- int hackpwl6 = 0; // length of pw in hachn
- int hackpwl7 = 0; // length of pw in hachn
- int hackpwl8 = 0; // length of pw in hachn
- int hackpwl9 = 0; // length of pw in hachn
- int hacklpwl0 = 0; // length of last pw in hachn
- int hacklpwl1 = 0; // length of last pw in hachn
- int hacklpwl2 = 0; // length of last pw in hachn
- int hacklpwl3 = 0; // length of last pw in hachn
- int hacklpwl4 = 0; // length of last pw in hachn
- int hacklpwl5 = 0; // length of last pw in hachn
- int hacklpwl6 = 0; // length of last pw in hachn
- int hacklpwl7 = 0; // length of last pw in hachn
- int hacklpwl8 = 0; // length of last pw in hachn
- int hacklpwl9 = 0; // length of last pw in hachn
-
- str hack0[60] = ""; // init 1st hack string
- str hack1[60] = ""; // init 2nd hack string
- str hack2[60] = ""; // init 3th hack string
- str hack3[60] = ""; // init 4th hack string
- str hack4[60] = ""; // init 5th hack string
- str hack5[60] = ""; // init 6th hack string
- str hack6[60] = ""; // init 7th hack string
- str hack7[60] = ""; // init 8th hack string
- str hack8[60] = ""; // init 9th hack string
- str hack9[60] = ""; // init last hack string
-
- str hackl0[60] = ""; // init 1st last hack string
- str hackl1[60] = ""; // init 2nd last hack string
- str hackl2[60] = ""; // init 3th last hack string
- str hackl3[60] = ""; // init 4th last hack string
- str hackl4[60] = ""; // init 5th last hack string
- str hackl5[60] = ""; // init 6th last hack string
- str hackl6[60] = ""; // init 7th last hack string
- str hackl7[60] = ""; // init 8th last hack string
- str hackl8[60] = ""; // init 9th last hack string
- str hackl9[60] = ""; // init last last hack string
-
- str order[60] = ""; // funky string for the order of shit..
- int ord_ptr = 0; // pointer to order...
- int loop = 0; // loop value
- int carry = 0; // hack carry
- int bump_good = 0; // remember retcode from bump
-
- int snd_ptr = 0; // pointer to send strings
- int snd_lop = 0; // pointer to send strings
- int wt_ptr = 0; // pointer to wait strings
- int wt_lop = 0; // pointer to wait strings
- int hack_ptr = 0; // pointer to hack strings
-
- str alphameric[62] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz";
-
- int auto = 0; // init auto to off
- str autotxt[3] = "OFF"; // and it's text value
- str control[12] = "TH.HAK"; // init control filename
- str log[12] = "NO"; // init log to no
- int logit = 0; // and it's boolein equalavant
- str good[12] = "TH.FND"; // init good filename
- int stop = 1; // init stop to true
- int testmode = 0; // init test mode to false
- int delay_tim = 6; // good string delay time in seconds
- int show_hack = 0; // display hacking strings flag
- int x, y; // vidieo corrdinates
-
- str carret[2] = ""; // expanded cr
- str cr[1] = "^M"; // real cr
- str linfed[2] = ""; // expanded lf
- str lf[1] = "^J"; // real linefeed
- str cntrlz[1] = "^Z"; // real control-z...
- str cntrlall[26] = "^A^B^C^D^E^F^G^H^I^J^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z";
- str cntrlkey[1] = ""; // expanded cntrl char
-
- int count = 0, pos = 0, ret_code = 0;
-
- main()
-
- {
-
- str last_word[12] = " ";
-
- Clear_scr(); // Let's start with a clear screen.
-
- //////////////////////// start config file processing ///////////////
-
- Prints(" Awesome Telix Hacker Version 1.10");
- Prints("");
- Prints(" Processing TH.CFG file.");
-
- cfgfile = fopen("th.cfg", "r");
-
- if (cfgfile == 0) // error if no file.
- {
- alarm(1);
- Prints(" Cannot locate TH.CFG file.");
- return -1;
- }
-
- string = read_file(cfgfile); // Get the first record.
-
- while (string != "EOF") // Process the records
- {
-
- pos = 0; // start scan at beginning
-
- ret_code = Get_next_word(32); // find next word
-
- if (ret_code > 0) // process control word
- {
- pos = pos + 2; // bump over equal
- last_word = word;
- strupper(last_word);
- ret_code = Get_next_word(32); // and get the next word
-
- if (last_word == "AUTO")
- {
- if (word == "ON") auto = 1; // Turn auto on
- else auto = 0; // Turn auto off
- }
- if (last_word == "CONTROL") control = word; // stash control fn
- if (last_word == "CR") carret = word; // stash carriage return
- if (last_word == "LF") linfed = word; // stash linefeed
- if (last_word == "CTRL") cntrlkey = word; // stash control key
- }
-
- string = read_file(cfgfile); // get next record
- }
-
- fclose(cfgfile);
-
- If (auto) autotxt = "ON"; // set autotxt to proper value
-
- if (strlen(carret) != 2) // missing something
- {
- Prints("CR config missing or invalid, run aborted.");
- return -1;
- }
- if (strlen(linfed) != 2) // missing something
- {
- Prints("LF config missing or invalid, run aborted.");
- return -1;
- }
- if (strlen(cntrlkey) != 1) // missing something
- {
- Prints("CTRL config missing or invalid, run aborted.");
- return -1;
- }
-
- Prints(" "); // blank line, duh...
- ret_code = Display_shit("Automatic operation is ", autotxt, ".");
- ret_code = Display_shit("Control file is: ", control, ".");
- ret_code = Display_shit("Carriage return is: ", carret, ".");
- ret_code = Display_shit("Linefeed is: ", linfed, ".");
- ret_code = Display_shit("Control key is: ", cntrlkey, ".");
-
- ////////////////////////// end config file processing ///////////////
-
- if (!auto) // handle manual mode...
- {
- Prints(" ");
- Prints(" Entering Manual Mode.");
-
- ret_code = Display_shit("Enter Control file name - default is :", control, ".");
- ret_code = Read_kb();
- if (ret_code > 0) control = word; // save control filename
- prints("");
-
- }
-
- ////////////////////////// end manual mode //////////////////////////
-
- prints("");
- Ret_code = display_shit(" Processing ", control, " control file.");
-
- ctlfile = fopen(control, "r");
-
- if (ctlfile == 0) // error if no file.
- {
- alarm(1);
- ret_code = Display_shit (" Cannot locate ", control, " file.");
- return -1;
- }
-
- string = read_file(ctlfile); // read the first record
-
- while (string != "EOF") // Process the records
- {
- pos = 0; // start scan at beginning
- ret_code = Get_next_word(32); // find keyword
-
- if (ret_code > 0) // process control word
- {
- pos = pos + 2; // bump over equal
- last_word = word; // save keyword
- strupper(last_word); // upcase the bitch...
-
- if (last_word == "TEST") // check testmode
- {
- ret_code = Get_next_word(32); // and get the next word
- strupper(word);
- if (word == "YES") testmode = 1;
- else testmode = 0;
- }
-
- if (last_word == "LOG")
- {
- ret_code = Get_next_word(32); // and get the next word
- log = word; // stash log filename
- strupper(log);
- If (log != "NO") logit = 1; // and logit to true if needed
- else logit = 0;
- }
- if (last_word == "CODEZ")
- {
- ret_code = Get_next_word(32); // and get the next word
- good = word; // stash good file name.
- }
- if (last_word == "DIAL")
- {
- ret_code = Get_next_word(32); // and get the next word
- dialnum = word; // stash it.
- }
-
- if (last_word == "STOP")
- {
- ret_code = Get_next_word(32); // and get the next word
- strupper(word);
- if (word == "NO") stop = 0;
- else stop = 1;
- }
-
- if (last_word == "MASTERFILE")
- {
- ret_code = Get_next_word(32); // and get the next word
- strupper(word);
- if (word == "NO") master_file = 0;
- else master_file = 1;
- }
-
- if (last_word == "SHOW")
- {
- ret_code = Get_next_word(32); // and get the next word
- strupper(word);
- if (word == "NO") show_hack = 0;
- else show_hack = 1;
- }
-
- if (last_word == "FORCE")
- {
- ret_code = Get_next_word(32); // and get the next word
- force = stoi(word); // and stash it
- }
-
- if (last_word == "COUNT")
- {
- ret_code = Get_next_word(32); // and get the next word
- hackcount = stoi(word); // and stash it
- }
-
- if (last_word == "SKIP")
- {
- ret_code = Get_next_word(32); // and get the next word
- seek_record = stoi(word); // and stash it
- }
-
- if (last_word == "DELAY")
- {
- ret_code = Get_next_word(32); // and get the next word
- delay_tim = stoi(word); // and stash it
- }
-
- if (last_word == "GOOD")
- {
- ret_code = Get_next_word(42); // and get the next string
- No_good = 0;
- cracked = word; // stash logged on string
- }
-
- if (last_word == "NOGOOD")
- {
- ret_code = Get_next_word(42); // and get the next string
- No_good = 1;
- cracked = word; // stash logged on string
- }
-
- if (last_word == "LOOP") loop = strlen(order); // save loop
-
- if (last_word == "SEND")
- {
- strcat(order, "1"); // put send in the order chain
- itos(snd_lop, data1); // ascii
- strcat(order, data1); // and ptr to send
- snd_lop = snd_lop + 1;
- ret_code = Get_next_word(42); // and get the next string
- string = word; // stash word
- ret_code = conv_crlf(); // convert cr and lf
- word = string; // and save it
- count = strlen(word); // get length
- itos(count, data); // convert to ascii
- if (strlen(data) == 1) inschrs("0", data, 0, 1); // two digits plz
- itos(snd_ptr, string);
- if (strlen(string) == 1) inschrs("0", string, 0, 1); // two digits plz
- strcat(sendtxt, word); // stash send string
- strcat(send_ptr, string); // it's position
- strcat(send_ptr, data); // and length
- snd_ptr = snd_ptr + count;
- }
-
- if (last_word == "WAIT")
- {
- strcat(order, "2"); // put wait in the order chain
- itos(wt_lop, data1); // ascii
- strcat(order, data1); // and ptr to send
- wt_lop = wt_lop + 1;
- ret_code = Get_next_word(42); // and get the next string
- count = strlen(word); // get length
- itos(count, data); // convert to ascii
- if (strlen(data) == 1) inschrs("0", data, 0, 1); // two digits plz
- itos(wt_ptr, string);
- if (strlen(string) == 1) inschrs("0", string, 0, 1); // two digits plz
- strcat(wait, word); // stash wait string
- strcat(wait_ptr, string); // it's position
- strcat(wait_ptr, data); // and length
- wt_ptr = wt_ptr + count;
- }
-
- if (last_word == "HACK")
- {
- if (!loop) loop = strlen(order); // save loop (if needed)...
- strcat(order, "3"); // put hack in the order chain
- itos(hack_ptr, data1); // ascii
- strcat(order, data1); // and ptr to hack
- hack_ptr = hack_ptr + 1; // point to next hack string
- ret_code = Get_next_word(42); // and get the string into word
- if (hack_ptr == 1) hack0 = word; // and stash it
- if (hack_ptr == 2) hack1 = word; // and stash it
- if (hack_ptr == 3) hack2 = word; // and stash it
- if (hack_ptr == 4) hack3 = word; // and stash it
- if (hack_ptr == 5) hack4 = word; // and stash it
- if (hack_ptr == 6) hack5 = word; // and stash it
- if (hack_ptr == 7) hack6 = word; // and stash it
- if (hack_ptr == 8) hack7 = word; // and stash it
- if (hack_ptr == 9) hack8 = word; // and stash it
- if (hack_ptr == 10) hack9 = word; // and stash it
- }
-
- if (last_word == "PLATE0")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt0 = word; // stash logged on string
- }
-
- if (last_word == "PLATE1")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt1 = word; // stash logged on string
- }
-
- if (last_word == "PLATE2")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt2 = word; // stash logged on string
- }
-
- if (last_word == "PLATE3")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt3 = word; // stash logged on string
- }
-
- if (last_word == "PLATE4")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt4 = word; // stash logged on string
- }
-
- if (last_word == "PLATE5")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt5 = word; // stash logged on string
- }
-
- if (last_word == "PLATE6")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt6 = word; // stash logged on string
- }
-
- if (last_word == "PLATE7")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt7 = word; // stash logged on string
- }
-
- if (last_word == "PLATE8")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt8 = word; // stash logged on string
- }
-
- if (last_word == "PLATE9")
- {
- ret_code = Get_next_word(32); // and get the next string
- plt9 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL0")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl0 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL1")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl1 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL2")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl2 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL3")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl3 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL4")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl4 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL5")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl5 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL6")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl6 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL7")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl7 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL8")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl8 = word; // stash logged on string
- }
-
- if (last_word == "SEEDL9")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedl9 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH0")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh0 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH1")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh1 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH2")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh2 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH3")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh3 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH4")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh4 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH5")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh5 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH6")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh6 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH7")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh7 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH8")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh8 = word; // stash logged on string
- }
-
- if (last_word == "SEEDH9")
- {
- ret_code = Get_next_word(32); // and get the next string
- seedh9 = word; // stash logged on string
- }
-
- if (last_word == "PASSFILE")
- {
- ret_code = Get_next_word(32); // and get the next string
- strupper(word);
- passfile = word; // stash filename
- if (passfile == "THPASS.LST") got_master = 1; // tried thpass
- }
-
- }
-
- string = read_file(ctlfile); // get next record
- } // end of control record reading
-
- fclose(ctlfile); // whew...close the file...
-
- if (dialnum == "0")
- {
- prints("No DIAL record found.");
- return -99;
- }
-
- if (cracked == "")
- {
- prints("No GOOD or NOGOOD record found.");
- return -99;
- }
-
- if (hack0 == "")
- {
- prints("No HACK record found.");
- return -99;
- }
-
- count = 0;
- Ret_code = strlen(plt0);
- if (ret_code > 0) strcat(plate, plt0); // shove in plate 0
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt1);
- if (ret_code > 0) strcat(plate, plt1); // shove in plate 1
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt2);
- if (ret_code > 0) strcat(plate, plt2); // shove in plate 2
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt3);
- if (ret_code > 0) strcat(plate, plt3); // shove in plate 3
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt4);
- if (ret_code > 0) strcat(plate, plt4); // shove in plate 4
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt5);
- if (ret_code > 0) strcat(plate, plt5); // shove in plate 5
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt6);
- if (ret_code > 0) strcat(plate, plt6); // shove in plate 6
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt7);
- if (ret_code > 0) strcat(plate, plt7); // shove in plate 7
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt8);
- if (ret_code > 0) strcat(plate, plt8); // shove in plate 8
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(plt9);
- if (ret_code > 0) strcat(plate, plt9); // shove in plate 9
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(plt_ptr, word); // save start
- strcat(plt_ptr, data); // and length
-
- count = 0;
- Ret_code = strlen(seedl0);
- if (ret_code > 0) strcat(seedl, seedl0); // shove in seedl 0
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl1);
- if (ret_code > 0) strcat(seedl, seedl1); // shove in seedl 1
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl2);
- if (ret_code > 0) strcat(seedl, seedl2); // shove in seedl 2
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl3);
- if (ret_code > 0) strcat(seedl, seedl3); // shove in seedl 3
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl4);
- if (ret_code > 0) strcat(seedl, seedl4); // shove in seedl 4
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl5);
- if (ret_code > 0) strcat(seedl, seedl5); // shove in seedl 5
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl6);
- if (ret_code > 0) strcat(seedl, seedl6); // shove in seedl 6
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl7);
- if (ret_code > 0) strcat(seedl, seedl7); // shove in seedl 7
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl8);
- if (ret_code > 0) strcat(seedl, seedl8); // shove in seedl 8
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedl9);
- if (ret_code > 0) strcat(seedl, seedl9); // shove in seedl 9
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedl_ptr, word); // save start
- strcat(seedl_ptr, data); // and length
-
- count = 0;
- Ret_code = strlen(seedh0);
- if (ret_code > 0) strcat(seedh, seedh0); // shove in seedh 0
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh1);
- if (ret_code > 0) strcat(seedh, seedh1); // shove in seedh 1
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh2);
- if (ret_code > 0) strcat(seedh, seedh2); // shove in seedh 2
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh3);
- if (ret_code > 0) strcat(seedh, seedh3); // shove in seedh 3
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh4);
- if (ret_code > 0) strcat(seedh, seedh4); // shove in seedh 4
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh5);
- if (ret_code > 0) strcat(seedh, seedh5); // shove in seedh 5
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh6);
- if (ret_code > 0) strcat(seedh, seedh6); // shove in seedh 6
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh7);
- if (ret_code > 0) strcat(seedh, seedh7); // shove in seedh 7
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh8);
- if (ret_code > 0) strcat(seedh, seedh8); // shove in seedh 8
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- count = count + ret_code;
- Ret_code = strlen(seedh9);
- if (ret_code > 0) strcat(seedh, seedh9); // shove in seedh 9
- itos(count, word); // convert number to ascii rep..
- if (strlen(word) == 1) inschrs("0", word, 0, 1); // make it two digits
- itos(Ret_code, data); // convert length to ascii
- strcat(seedh_ptr, word); // save start
- strcat(seedh_ptr, data); // and length
-
- if (hack_ptr > 0) // parse out hack0
- {
- string = hack0; // stash hack0
-
- ret_code = parse_hack(); // parse the mother
- hack0 = data; // save parsed hack string.
- hck0_ptr = word; // and hack0 pointers
- hck0_sdptr = data1; // and seed pointers
- if (hck0_ptr == "") // bummer no plates
- {
- Prints("No PLATEn or file found in HACK record #1.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack0; // stash hack
- data = hck0_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck0_val = word; // and save values...
- hack0 = string;
- hck0_seed = data2; // seeds dudez...
- hacko0 = offset; // PASSFILE offset
- hackpwl0 = pwl;
- }
- }
-
- if (hack_ptr > 1) // parse out hack1
- {
- string = hack1; // stash hack1
-
- ret_code = parse_hack(); // parse the mother
- hack1 = data; // save parsed hack string.
- hck1_ptr = word; // and hack0 pointers
- hck1_sdptr = data1; // and seed pointers
- if (hck1_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #2.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack1; // stash hack
- data = hck1_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck1_val = word; // and save values...
- hack1 = string;
- hck1_seed = data2; // seeds dudez...
- hacko1 = offset; // PASSFILE offset
- hackpwl1 = pwl;
- }
- }
-
- if (hack_ptr > 2) // parse out hack2
- {
- string = hack2; // stash hack2
-
- ret_code = parse_hack(); // parse the mother
- hack2 = data; // save parsed hack string.
- hck2_ptr = word; // and hack0 pointers
- hck2_sdptr = data1; // and seed pointers
- if (hck2_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #3.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack2; // stash hack
- data = hck2_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck2_val = word; // and save values...
- hack2 = string;
- hck2_seed = data2; // seeds dudez...
- hacko2 = offset; // PASSFILE offset
- hackpwl2 = pwl;
- }
- }
-
- if (hack_ptr > 3) // parse out hack3
- {
- string = hack3; // stash hack3
-
- ret_code = parse_hack(); // parse the mother
- hack3 = data; // save parsed hack string.
- hck3_ptr = word; // and hack3 pointers
- hck3_sdptr = data1; // and seed pointers
- if (hck3_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #4.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack3; // stash hack
- data = hck3_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck3_val = word; // and save values...
- hack3 = string;
- hck3_seed = data2; // seeds dudez...
- hacko3 = offset; // PASSFILE offset
- hackpwl3 = pwl;
- }
- }
-
- if (hack_ptr > 4) // parse out hack4
- {
- string = hack4; // stash hack4
-
- ret_code = parse_hack(); // parse the mother
- hack4 = data; // save parsed hack string.
- hck4_ptr = word; // and hack0 pointers
- hck4_sdptr = data1; // and seed pointers
- if (hck4_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #5.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack4; // stash hack
- data = hck4_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck4_val = word; // and save values...
- hack4 = string;
- hck4_seed = data2; // seeds dudez...
- hacko4 = offset; // PASSFILE offset
- hackpwl4 = pwl;
- }
- }
-
- if (hack_ptr > 5) // parse out hack5
- {
- string = hack5; // stash hack5
-
- ret_code = parse_hack(); // parse the mother
- hack5 = data; // save parsed hack string.
- hck5_ptr = word; // and hack pointers
- hck5_sdptr = data1; // and seed pointers
- if (hck5_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #6.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack5; // stash hack
- data = hck5_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck5_val = word; // and save values...
- hack5 = string;
- hck5_seed = data2; // seeds dudez...
- hacko5 = offset; // PASSFILE offset
- hackpwl5 = pwl;
- }
- }
-
- if (hack_ptr > 6) // parse out hack6
- {
- string = hack6; // stash hack6
-
- ret_code = parse_hack(); // parse the mother
- hack6 = data; // save parsed hack string.
- hck6_ptr = word; // and hack pointers
- hck6_sdptr = data1; // and seed pointers
- if (hck6_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #7.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack6; // stash hack
- data = hck6_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck6_val = word; // and save values...
- hack6 = string;
- hck6_seed = data2; // seeds dudez...
- hacko6 = offset; // PASSFILE offset
- hackpwl6 = pwl;
- }
- }
-
- if (hack_ptr > 7) // parse out hack7
- {
- string = hack7; // stash hack7
-
- ret_code = parse_hack(); // parse the mother
- hack7 = data; // save parsed hack string.
- hck7_ptr = word; // and hack pointers
- hck7_sdptr = data1; // and seed pointers
- if (hck7_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #8.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack7; // stash hack
- data = hck7_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck7_val = word; // and save values...
- hack7 = string;
- hck7_seed = data2; // seeds dudez...
- hacko7 = offset; // PASSFILE offset
- hackpwl7 = pwl;
- }
- }
-
- if (hack_ptr > 8) // parse out hack8
- {
- string = hack8; // stash hack8
-
- ret_code = parse_hack(); // parse the mother
- hack8 = data; // save parsed hack string.
- hck8_ptr = word; // and hack0 pointers
- hck8_sdptr = data1; // and seed pointers
- if (hck8_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #9.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack8; // stash hack
- data = hck8_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck8_val = word; // and save values...
- hack8 = string;
- hck8_seed = data2; // seeds dudez...
- hacko8 = offset; // PASSFILE offset
- hackpwl8 = pwl;
- }
- }
-
- if (hack_ptr > 9) // parse out hack9
- {
- string = hack9; // stash hack9
-
- ret_code = parse_hack(); // parse the mother
- hack9 = data; // save parsed hack string.
- hck9_ptr = word; // and hack0 pointers
- hck9_sdptr = data1; // and seed pointers
- if (hck9_ptr == "") // bummer no plates
- {
- Prints("No PLATEn found in HACK record #10.");
- if (passfh) fclose(passfh);
- return -99;
- }
- else
- {
- string = hack9; // stash hack
- data = hck9_ptr; // stash pointers
- Ret_code = init_hack(); // get locations
- hck9_val = word; // and save values...
- hack9 = string;
- hck9_seed = data2; // seeds dudez...
- hacko9 = offset; // PASSFILE offset
- hackpwl9 = pwl;
- }
- }
-
- if (loop == strlen(order))
- {
- Prints("LOOP cannot be the last record.");
- if (passfh) fclose(passfh);
- return -99;
- }
-
- ///////////////// end control file processing ///////////////////////
-
- flushbuf(); // clear any shit in the remote input buffer.
-
- Clear_scr(); // Let's start with a clear screen.
-
- prints("");
- prints(" Control file accepted, off to the races!!!!!");
- ret_code = Display_shit(" Logging is: ", log, ".");
- ret_code = Display_shit(" Good codes file is: ", good, ".");
- prints("");
-
- if (testmode) Prints(" TEST = YES run only.");
- prints("");
-
- goodfile = fopen(good, "a"); // open good file
- if (logit) logfile = fopen(log, "a"); // open log file if needed
-
- count = 1; // init count...
- while (1)
- {
- if (!testmode) dial(dialnum, 0, 1);
-
- carry = 1; // set hack carry true
- ord_ptr = -2;
- trycount = 0;
-
- while (ord_ptr < strlen(order))
- {
- ord_ptr = ord_ptr + 2;
- if (ord_ptr == strlen(order))
- {
- ord_ptr = loop; // loop back
- carry = 1; // set hack carry true...
- count = count + 1;
- if ((count > hackcount) and (hackcount > 0))
- {
- Prints("");
- Prints(" Hack count exceeded...");
- if (!testmode) hangup();
- if (passfh) fclose(passfh);
- return -99; // time to quit
- }
- }
-
- substr(order, ord_ptr, 1, data); // get value
- substr(order, ord_ptr + 1, 1, data1); // and pointer
-
- if (data == "1")
- {
- snd_ptr = stoi(data1);
- pos = snd_ptr * 4;
- substr(send_ptr, pos, 2, string);
- substr(send_ptr, pos + 2, 2, data);
- pos = stoi(string); // get position
- ret_code = stoi(data); // and length
- substr(sendtxt, pos, ret_code, string); // get actual string
- if (testmode) ret_code = display_shit(" Sending: ",string, " ");
- else cputs(string); // and send it
- }
-
- if (data == "2")
- {
- wt_ptr = stoi(data1);
- pos = wt_ptr * 4;
- substr(wait_ptr, pos, 2, string);
- substr(wait_ptr, pos + 2, 2, data);
- pos = stoi(string); // get position
- ret_code = stoi(data); // and length
- substr(wait, pos, ret_code, string); // get actual string
- ret_code = 1; // init ret_code to true.
- for (pos = 0; pos < strlen(string); pos = pos + 1)
- {
- substr(string, pos, 1, data); // get one char
- if ( data < "0" or data > "9") ret_code = 0;
- }
- if (ret_code)
- {
- pos = stoi(string); // get numeric delay time
- if (testmode) ret_code = display_shit(" Delaying ", string, " tenths of seconds");
- else delay(pos); // and wait...
- }
- else
- {
- if (testmode) Ret_code = display_shit(" Waiting for: ", string,".");
- else
- {
- ret_code = waitfor(string, 300); // wait for 5 minutes
- if (!ret_code and !carrier())
- {
- pos = display_shit(" Expected string ", string, "not received.");
- if (passfh) fclose(passfh);
- return -99;
- }
- }
- }
- }
-
- if (data == "3")
- {
- hack_ptr = stoi(data1);
- if (hack_ptr == 0)
- {
- string = hack0;
- word = hck0_val;
- data2 = hck0_seed;
- offset = hacko0;
- pwl = hackpwl0;
- hackl0 = string;
- hckl0_val = word;
- hacklpwl0 = pwl;
- }
- if (hack_ptr == 1)
- {
- string = hack1;
- word = hck1_val;
- data2 = hck1_seed;
- offset = hacko1;
- pwl = hackpwl1;
- hackl1 = string;
- hckl1_val = word;
- hacklpwl1 = pwl;
- }
- if (hack_ptr == 2)
- {
- string = hack2;
- word = hck2_val;
- data2 = hck2_seed;
- offset = hacko2;
- pwl = hackpwl2;
- hackl2 = string;
- hckl2_val = word;
- hacklpwl2 = pwl;
- }
- if (hack_ptr == 3)
- {
- string = hack3;
- word = hck3_val;
- data2 = hck3_seed;
- offset = hacko3;
- pwl = hackpwl3;
- hackl3 = string;
- hckl3_val = word;
- hacklpwl3 = pwl;
- }
- if (hack_ptr == 4)
- {
- string = hack4;
- word = hck4_val;
- data2 = hck4_seed;
- offset = hacko4;
- pwl = hackpwl4;
- hackl4 = string;
- hckl4_val = word;
- hacklpwl4 = pwl;
- }
- if (hack_ptr == 5)
- {
- string = hack5;
- word = hck5_val;
- data2 = hck5_seed;
- offset = hacko5;
- pwl = hackpwl5;
- hackl5 = string;
- hckl5_val = word;
- hacklpwl5 = pwl;
- }
- if (hack_ptr == 6)
- {
- string = hack6;
- word = hck6_val;
- data2 = hck6_seed;
- offset = hacko6;
- pwl = hackpwl6;
- hackl6 = string;
- hckl6_val = word;
- hacklpwl6 = pwl;
- }
- if (hack_ptr == 7)
- {
- string = hack7;
- word = hck7_val;
- data2 = hck7_seed;
- offset = hacko7;
- pwl = hackpwl7;
- hackl7 = string;
- hckl7_val = word;
- hacklpwl7 = pwl;
- }
- if (hack_ptr == 8)
- {
- string = hack8;
- word = hck8_val;
- data2 = hck8_seed;
- offset = hacko8;
- pwl = hackpwl8;
- hackl8 = string;
- hckl8_val = word;
- hacklpwl8 = pwl;
- }
- if (hack_ptr == 9)
- {
- string = hack9;
- word = hck9_val;
- data2 = hck9_seed;
- offset = hacko9;
- pwl = hackpwl8;
- hackl9 = string;
- hckl9_val = word;
- hacklpwl9 = pwl;
- }
- if (logit) // logit
- {
- fputs(string, logfile); // write it
- fputs("^M^J", logfile); // with cr lf
- }
- if (testmode) Ret_code = display_shit(" Hacking: ", string," ");
- else
- {
- if (show_hack)
- {
- x = getx();
- y = gety();
- gotoxy(40, y);
- printsc(string);
- gotoxy(x, y);
- }
- cputs(string); // send it
- }
- if (!carrier() and !testmode)
- {
- Prints("");
- Prints("");
- Ret_code = display_shit(" Connection lost, will resume hacking at: ",hack0, " ");
- break;
- }
- if (carry)
- {
- Bump_good = bump_hack();
- if (hack_ptr == 0)
- {
- hack0 = string;
- hck0_val = word; // stash it
- hackpwl0 = pwl;
- }
- if (hack_ptr == 1)
- {
- hack1 = string;
- hck1_val = word; // stash it
- hackpwl1 = pwl;
- }
- if (hack_ptr == 2)
- {
- hack2 = string;
- hck2_val = word; // stash it
- hackpwl2 = pwl;
- }
- if (hack_ptr == 3)
- {
- hack3 = string;
- hck3_val = word; // stash it
- hackpwl3 = pwl;
- }
- if (hack_ptr == 4)
- {
- hack4 = string;
- hck4_val = word; // stash it
- hackpwl4 = pwl;
- }
- if (hack_ptr == 5)
- {
- hack5 = string;
- hck5_val = word; // stash it
- hackpwl5 = pwl;
- }
- if (hack_ptr == 6)
- {
- hack6 = string;
- hck6_val = word; // stash it
- hackpwl6 = pwl;
- }
- if (hack_ptr == 7)
- {
- hack7 = string;
- hck7_val = word; // stash it
- hackpwl7 = pwl;
- }
- if (hack_ptr == 8)
- {
- hack8 = string;
- hck8_val = word; // stash it
- hackpwl8 = pwl;
- }
- if (hack_ptr == 9)
- {
- hack9 = string;
- hck9_val = word; // stash it
- hackpwl9 = pwl;
- }
- }
-
- } // end data=3 loop
-
- if (strlen(order) - 2 == ord_ptr) // checked for cracked
- {
- if (testmode) ret_code = display_shit(" Waiting for :", cracked, " string.");
- else
- {
- trycount = trycount + 1; // increment try crack count
- ret_code = waitfor(cracked, delay_tim); // wait for cracked ?
- if ((Ret_code and !no_good) or (!ret_code and NO_good)) // log success !!!!
- {
- fputs(hackl0, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- if (hackl1 != "")
- {
- fputs(hackl1, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl2 != "")
- {
- fputs(hackl2, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl3 != "")
- {
- fputs(hackl3, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl4 != "")
- {
- fputs(hackl4, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl5 != "")
- {
- fputs(hackl5, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl6 != "")
- {
- fputs(hackl6, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl7 != "")
- {
- fputs(hackl7, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl8 != "")
- {
- fputs(hackl8, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- if (hackl9 != "")
- {
- fputs(hackl9, goodfile); // write it
- fputs("^M^J", goodfile); // with cr lf
- }
- fflush(goodfile); // force disk write
- hangup(); // hang up and start again (maybe)
- if (stop) // close files
- {
- fclose(goodfile); // close it
- if (logit) fclose(logfile); // and this tooo!!!
- Prints("");
- Prints("");
- Prints(" Hacker cracked a code and ended!!!!");
- if (passfh) fclose(passfh);
- return 0;
- }
- }
- if (!testmode and force > 0 and trycount == force)
- {
- hangup();
- Prints("");
- Prints("");
- Ret_code = display_shit(" Connection terminated, will resume hacking at: ",hack0, " ");
- break;
- }
- if (!carrier() and !testmode)
- {
- hack0 = hackl0; // reset hack
- hack1 = hackl1; // reset hack
- hack2 = hackl2; // reset hack
- hack3 = hackl3; // reset hack
- hack4 = hackl4; // reset hack
- hack5 = hackl5; // reset hack
- hack6 = hackl6; // reset hack
- hack7 = hackl7; // reset hack
- hack8 = hackl8; // reset hack
- hack9 = hackl9; // reset hack
- hck0_val = hckl0_val;
- hck1_val = hckl1_val;
- hck2_val = hckl2_val;
- hck3_val = hckl3_val;
- hck4_val = hckl4_val;
- hck5_val = hckl5_val;
- hck6_val = hckl6_val;
- hck7_val = hckl7_val;
- hck8_val = hckl8_val;
- hck9_val = hckl9_val;
- hackpwl0 = hacklpwl0;
- hackpwl1 = hacklpwl1;
- hackpwl2 = hacklpwl2;
- hackpwl3 = hacklpwl3;
- hackpwl4 = hacklpwl4;
- hackpwl5 = hacklpwl5;
- hackpwl6 = hacklpwl6;
- hackpwl7 = hacklpwl7;
- hackpwl8 = hacklpwl8;
- hackpwl9 = hacklpwl9;
- Prints("");
- Prints("");
- Ret_code = display_shit(" Connection lost, will resume hacking at: ",hack0, " ");
- break;
- }
- }
- } // end wait for cracked
-
- if (!bump_good and strlen(order) - 2 == ord_ptr)
- {
- if (passfh and !got_master and master_file)
- {
- ret_code = display_shit("End of file for ", passfile, ", switching to THPASS.LST.");
- got_master = 1;
- passfile = "THPASS.LST";
- fclose(passfh);
- passfh = fopen(passfile, "r");
- if (passfile == 0)
- {
- Prints("Unable to open master file, THPASS.LST");
- if (!testmode) hangup();
- return -99;
- }
- }
- else
- {
- Prints("");
- Prints("");
- Prints("Phuck.. no more hack possibilities.");
- if (!testmode) hangup();
- if (passfh) fclose(passfh);
- Return 0;
- }
- }
-
- } // end ord_prt < strlen loop
-
- } // end dial loop
-
- if (!testmode) hangup();
- fclose(goodfile); // close it
- if (logit) fclose(logfile); // and this tooo!!!
- if (passfh) fclose(passfh);
-
- }
- //////////////////////// end main program //////////////////////////
-
- //////// functions called from main //////////////////
-
- read_file(int fh) // reads the next record in file fh.
-
- {
- if (feof(fh)) return "EOF"; // at end, return nothing
- fgets(data,80,fh);
- return data;
- }
-
- Get_next_word(str char) // puts the next word into word from string
-
- {
- int len = 0;
- word = ""; // clear out word
-
- if (pos > strlen(string)) // to far, just return with notfound
- return -2;
-
- len = strchr(string, pos, char); // look for char
-
- if (len == -1) // not found assume rest of string
- len = strlen(string);
-
- len = len - pos; // get # of charecters
-
- if (len == 0) // if zero return with not found
- return -1;
-
- substr(string, pos, len, word); // move chars to word
- pos = pos + len + 1; // point past last char found
-
- return len; // and get the fuck outta here...
- }
-
- Display_shit( str str1, str str2, str str3)
-
- {
- printsc(str1); // display 3 strings on 1 line...
- printsc(str2);
- prints(str3);
- return 0;
- }
-
- Read_kb() // read keyboard
-
- {
- count = gets(word, 60);
- if (count == -1) count = 0;
- return count;
- }
-
- Parse_hack() // parse hack stringss
-
- {
- int num1, num2, num3, pfpos, pf;
- str char[1], alpha[2];
- str temp[60];
- int fp = 0; // Found Plate
-
- pos = 0; // set pos to zero....
- data = ""; // init data to null.......... new hack string
- data1 = ""; // init data1 to null.......... hckn_sdptr
- word = ""; // init word to null hckn_ptr
-
- ret_code = conv_crlf(); // convert those CRs and LFs....
-
- pfpos = strpos(string, "PASSFILE", 0); // look for file hacking
- if (pfpos >= 0) pf = 1;
- else pf = 0;
-
- while (pos < strlen(string)) // search until end of word
- {
- ret_code = strpos(string, "PLATE", pos); // look for it...
-
- if (ret_code < 0) Break; // no more plates
- else
- {
- num1 = Ret_code - pos;
- if (num1 > 0) // stash non plate shit...
- {
- substr(string, pos, num1, temp); // isolate it
- strcat(data, temp); // and shove it in...
- pos = pos + num1; // bump pos
- }
- if (pf and !fp and ret_code > pfpos) // stash
- {
- fp = 1; // set Found Plate to true
- pfpos = strpos(data, "PASSFILE", 0); // look for file hacking
- itos(pfpos, alpha); // staring pos (in ascii)
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- strcat(word, alpha); // stash position
- strcat(word, "F"); // and file indicator
- strcat(data1, "000"); // and hckn_sdptr
- }
- count = ret_code + 5; // point to the plate #
- substr(string, count, 1, char);
- num1 = stoi(char); // get it numerically
- num3 = num1; // and save number for seeds....
- num1 = num1 * 3; // mutiply by three...
- substr(plt_ptr, num1, 2, alpha); // get plate posotion
- substr(plt_ptr, num1 + 2, 1, char); // and length
- num1 = stoi(alpha); // numericly
- num2 = stoi(char); // numericly
- substr(plate, num1, num2, temp); // put plate into temp
- num1 = strlen(data); // now get current length...
- strcat(data, temp); // append plate
- itos(num1, alpha); // convert to ascii
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- itos(num2, char); // convert to ascii
- strcat(word, alpha); // and save position
- strcat(word, char); // and lenght
- itos(num3, char); // seed number in ascii
- strcat(data1, alpha); // save position
- strcat(data1, char); // and seed number
- pos = pos + 6; // bump pos
- }
- }
-
- num1 = strlen(string) - pos; // get number of characters left
- if (num1 > 0) // more non plate at the end to stash..
- {
- substr(string, pos, num1, temp); // isolate it
- strcat(data, temp); // and apppend
- }
-
- if (!fp and pf) // stash password file
- {
- pfpos = strpos(data, "PASSFILE", 0); // look for file hacking
- itos(pfpos, alpha); // staring pos (in ascii)
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- strcat(word, alpha); // stash position
- strcat(word, "F"); // and file indicator
- }
-
- if (pf) // open password file.
- {
- passfh = fopen(passfile, "r");
- if (passfh == 0) // error if no file.
- {
- alarm(1);
- Ret_code = display_shit("Error opening PASSFILE", passfile, ".");
- word = "";
- }
- if (seek_record)
- {
- Prints("");
- Printsc("Skipping the first ");
- Printn(seek_record);
- prints(" records.");
- for(num1 = 1; num1 < seek_record; num1 = num1 + 1)
- {
- fgets(password,80,passfh); // get password
- if (password == cntrlz or feof(passfh)) // end of file
- {
- if (master_file and !got_master)
- {
- ret_code = display_shit("End of file for ", passfile, ", switching to THPASS.LST.");
- got_master = 1;
- passfile = "THPASS.LST";
- fclose(passfh);
- passfh = fopen(passfile, "r");
- }
- else
- {
- Prints("SKIP went past the end of file.");
- word = "";
- Break;
- }
- }
- }
- }
- }
-
- return 0;
- }
-
- init_hack() // init some more shit - fuck I need real arrays
-
- {
- // hackn in string and returned there ...
- // hckn_ptr in data
- // hckn_sdptr in data1
- // returns hckn_val in word
- // returns hckn_seed in data2
- // returns PASSFILE offset in offset
- // returns password length in pwl
-
- int num1, num2, num3;
- int num4, num5, num6;
- int num7;
- int adjust = 0;
- str char[2], alpha[2], temp1[2], temp2[2];
- str templ[9]; // stash seedl
- str temph[9]; // sand seedh
- int templl, temphl; // lenght of tempz...
-
- word = ""; // null it dude...
- data2 = ""; // null it dude...
- count = 0; // zero it
- offset = 0;
- pwl = 0;
-
- while (count < strlen(data))
- {
- substr(data, count, 2, alpha); // get position in alpha
- substr(data, count + 2, 1, char); // get len into char
- if (char == "F") // file, not char
- {
- strcat(word, "900"); // stash file indic. and 00 pointer
- strcat(word, alpha); // and position in hack string
- strcat(data2, "0000"); // and 0 seed ptrs
- offset = stoi(alpha); // stash PASSFILE offset in hack
- if (feof(passfh)) PASSWORD = "EOF";
- else fgets(password,80,passfh); // get password
- pwl = strlen(password);
- adjust = pwl - 8;
- delchrs(string, offset, 8); // delete PASSFILE
- inschrs(password, string, offset, pwl); // and insert password
- } // end file
- else //handle plate
- {
- num1 = stoi(alpha); // numericly
- num2 = stoi(char); // numericly
-
- substr(data1, count + 2, 1, char); // get associated seed...
- num4 = stoi(char); // numerically
- num4 = num4 * 3;
- templ = "";
- temph = "";
- substr(seedl_ptr, num4, 2, alpha); // get seed position
- substr(seedl_ptr, num4 + 2, 1, char); // and length
- num6 = stoi(alpha); // numerically
- num5 = stoi(char); // numerically
- templl = num5; // and save it
- if (num5 > 0) substr(seedl, num6, num5, templ); // get seedl
- substr(seedh_ptr, num4, 2, alpha); // get seed position
- substr(seedh_ptr, num4 + 2, 1, char); // and length
- num6 = stoi(alpha); // numerically
- num5 = stoi(char); // numerically
- temphl = num5; // and save it
- if (num5 > 0) substr(seedh, num6, num5, temph); // get seedh
-
- num2 = num2 + num1; // get ending value...
- num4 = -1; // init to -1..duh
- for (num3 = num1; num3 < num2; num3 = num3 + 1)
- {
- num7 = num3 + adjust;
- num4 = num4 + 1;
- substr(string, num7, 1, char); // get char...
- alpha = "0";
- num5 = 0; // low offset in alphameric
- num6 = 61; // high offest in alphameric
-
- if (char == "&")
- {
- alpha = "1"; // alpha only
- temp1 = "A";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "Z";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- if (char == "#")
- {
- alpha = "2"; // number only
- temp1 = "0";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "9";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- if (char == "@")
- {
- alpha = "3"; // both
- temp1 = "0";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "Z";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- if (char == "%")
- {
- alpha = "4"; // lower case
- temp1 = "a";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "z";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- if (char == "$")
- {
- alpha = "5"; // both upper and lower case
- temp1 = "A";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "z";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- if (char == "*")
- {
- alpha = "6"; // both
- temp1 = "0";
- if (templl) // check for lower bound
- {
- substr(templ, num4, 1, temp2); // get seed
- if (temp2 != char) temp1 = temp2;
- }
- num5 = strpos(alphameric, temp1, 0); // get offset
- copychrs(temp1, string, num7, 1); // stash it
- temp1 = "z";
- if (temphl)
- {
- substr(temph, num4, 1, temp2); // get high seed
- if (temp2 != char) temp1 = temp2; // get it
- }
- num6 = strpos(alphameric, temp1, 0);
- }
-
- strcat(word, alpha); // append type
- itos(num5, alpha); // convert to ascii stash hi and low seed.
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- strcat(data2, alpha); // and stash it here
- strcat(word, alpha); // and here
-
- itos(num3, alpha); // convert to ascii
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- strcat(word, alpha);
-
- itos(num6, alpha); // convert to ascii
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- strcat(data2, alpha);
- }
- } // end plate handling
- count = count + 3; // bump count
- }
-
- return 0;
- }
-
- Bump_hack() // increment hack record (in string)...
- // hckn_val passed in word...
- // hckn_seed passed in data2
- // hackon passed in offset
- // hackpwln passed and returned in pwl
- {
- int num1, num2, num3, num4, num5, num6;
- str char[2], alpha[2], letter[2], char1[2];
- str temp[2];
- int adjust = 0;
- int oldpwl;
- int max = 35, min = 0;
- int done = 0;
-
- oldpwl = pwl;
- num2 = strlen(word);
- num6 = -4; // hckn_seed pointer
- carry = 0; // set hack carry off
-
- for (num1 = 0; num1 < num2; num1 = num1 + 5)
- {
- num6 = num6 + 4;
- substr(word, num1, 1, char); // get type
- substr(word, num1 + 1, 2, alpha); // get alphameric pointer
- substr(word, num1 + 3, 2, letter); // get position in hack record
- if (char == "0") continue; // skip non substitues
-
- if (char == "9") // passfile....
- {
- if (feof(passfh))
- {
- Fclose(passfh);
- passfh = Fopen(passfile, "r");
- fgets(password,80,passfh); // get password
- }
- else
- {
- fgets(password,80,passfh); // get password
- if (password == cntrlz) // end of file
- {
- Fclose(passfh);
- passfh = Fopen(passfile, "r");
- fgets(password,80,passfh); // get password
- }
- else done = 1;
- }
- pwl = strlen(password);
- delchrs(string, offset, oldpwl);
- inschrs(password, string, offset, pwl);
- adjust = pwl - 8;
- } // end file handling
- else // plate
- {
- substr(data2, num6, 2, temp); // get low seed val
- min = stoi(temp); // numerically
- substr(data2, num6 + 2, 2, temp); // get high seed val
- max = stoi(temp); // numerically
-
- num3 = stoi(alpha); // numeric pointer
- num4 = stoi(letter); // numeric position in string
- num4 = num4 + adjust; // with adjustment
- num3 = num3 + 1; // bump alphameric pointer
- if (num3 > max) num3 = min;
- else done = 1;
- itos (num3, alpha);
- if (strlen(alpha) == 1) inschrs("0", alpha, 0, 1); // two digits plz
- copychrs(alpha, word, num1 + 1, 2); // stash new pointer
- substr(alphameric, num3, 1, char1); // get new value
- copychrs(char1, string, num4, 1); // new value
- } // end plate handling
- if (done) break;
- }
- carry = !done;
- return done;
- }
-
- conv_crlf() // convert cr and lf charscters in string
-
- {
- str char[1] = "";
- str alpha[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- int num = 0;
- int num1 = 0;
-
- while (1)
- {
- ret_code = strpos(string, carret, num); // look for CRs..
- if (ret_code < 0) Break; // nomore CRs..
- else
- {
- delchrs(string, ret_code, 2); // delete those 2 chars
- inschrs(cr, string, ret_code, 1); // and insert CR
- num = Ret_code + 1;
- }
- }
-
- num = 0;
- while (1)
- {
- ret_code = strpos(string, cntrlkey, num); // look for control key
- if (ret_code < 0) Break; // nomore LFs..
- else
- {
- num = Ret_code + 1; // point to next char
- subchrs(string, num, 1, char); // get it
- strupper(char); // upcase it
- num1 = strpos(alpha, char, 0); // locate char
- if (num1 < 0) Num = num + 1; // skip it
- else
- {
- subchrs(cntrlall, num1, 1, char); // stash cntrlcode in char
- delchrs(string, ret_code, 2); // delete those 2 chars
- inschrs(char, string, ret_code, 1); // and insert char
- }
- }
- }
-
- return 0;
- }