visible:
 A;mx;my;size;column;row;value;count;key; zoneselected ; page = 1 
 panel1
 mode = 2
 event = 1
 File[ 1002000]
 filename$ = "No file loaded"
 Button[25]
hidden:
set redraw off
procedure start()
 ThisIsAPlaceHolder = 1
endproc
set window 0, 0, 1360, 700

proc Setup
proc SetupPanels
set color 200,200,200
cls
  
 mode = 2                                
 do
  rem cls
   wait 50
     
 

    if event = 2 
        set color 55,55,55
        cls
      ' wait 400
       set color 255,255,255
       proc MouseCheck
       proc MakePanels
       
       proc KeyBoard
       proc DisplayText
       proc MakeButtons
       set color 250,250,250
       proc DisplayFile

     endif
   if event = 1 
       
      proc Menu
      wait 100
      set color 255,255,255
   endif
    redraw
 until event = 3

  end

procedure ClearMemory()

 for a = 1 to 1000000
     File[ a ] = 1
 next
endproc



procedure KeyBoard()
  a = 1
  value = inkey(1)
  if value = 27 then    event = 3                 
         
  if value > 0 then key = value
  

endproc 


procedure MouseCheck()
   
   mx =  mousex()
   my =  mousey()

   if mousebutton(0,1)  
   zoneselected = zone(mx,my)
   endif
   if zoneselected = 1 then proc LoadFile
   if zoneselected = 2 then page = page + 1
   if zoneselected = 3 then page = page - 1
   if zoneselected = 4  
       mode = mode + 1
       if mode > 2 then mode = 1
   endif
   if zoneselected = 5 then page = page + 10
   if zoneselected = 6 then page = page - 10
   if zoneselected = 7 then page = page + 100
   if zoneselected = 8 then page = page - 100
   if page > 1250 then page = 1250
   if page < 1 then page = 1
   if zoneselected = 9 then proc Scan

   zoneselected = 0
  ' if page < 1 then page = 1
  ' if page > 1250 then page = page - 1
endproc 

 procedure MakePanels()
 
 draw image panel1,100,20


endproc
  
procedure DisplayText()

  set color 255,255,255
  
  set caret 10,20 ; write str$( mx )  
  set caret 10,40 ; write str$( my )
  set caret 10,60 ; write str$( size )


  set caret 2,420 ; write "Page ="
  set caret 70,420 ; write str$( page )
  set caret 2,435 ; write "Page Start ="
  set caret 2,450 ; write str$( page * 800 - 800 )
  set caret 2,600 ; write str$( key )
  set caret 2,620 ;  ' write str$( mode )
   if mode = 1 then write " Hex mode "
   if mode = 2 then write " Text mode "  
  set caret 10,675 ; write str$( filename )

endproc


procedure SetupPanels()

 panel1 = 11
 create image panel1, 1200,650

 set image panel1
 set color 200,200,255
 draw rect 0,0,1200,650,1
 set color 255,255,255
 draw rect 4,4,1192,642,1
   set image primary

endproc

procedure Setup()
   a
   proc ClearMemory
   for a = 1 to 20
      Button[a] = a
   next
   for a = 1 to 10
     create image  Button[a] ,60,20
     create zone a,20,30*a+100,60,20
   next

   for a = 1 to 10
     set image Button[a]
     set color 100,100,150
     draw rect 0,0,60,20,1
     set color 200,200,250
     draw rect 2,2,56,16,1
     set color 0,0,0
     if a = 1 then   set caret 5,2 ; wln " Load"
     if a = 2 then   set caret 1,2 ; write "Pg Down "
     if a = 3 then   set caret 4,2 ; write " Pg up "
     if a = 4 then   set caret 4,2 ; write " Mode  "
     if a = 5 then   set caret 4,2 ; write " Dn10 "
     if a = 6 then   set caret 4,2 ; write " Up10 "
     if a = 7 then   set caret 4,2 ; write " Dn100"
     if a = 8 then   set caret 4,2 ; write " Up100"
     if a = 9 then   set caret 4,2 ; write " Scan  "

   next

   set image primary
   count = 1
 
endproc

procedure MakeButtons()
   for a = 1 to 10
      draw image Button[a],10,30*a+100
   next

endproc

procedure LoadFile()
  cnt = 1
  filein
  N = 0
  page = 1
   proc ClearMemory
   filename$ = openfile$("")
   open file filein, filename$,1
  while not eof(filein)
    N = read8( filein )
    File [ cnt ] = N
    cnt = cnt + 1
    if cnt > 1000000 then break
  wend
    free file filein   
    size = cnt
endproc

procedure Scan()
   pg = page + 1 ; found = 0
   b= pg * 800 - 800
    do
      b= pg * 800 - 800

      for a = 1 to 900
         c = File[a+b]

         if c = 104 and  File[a+b+1] = 116 and File[a+b+2] = 116 and File[a+b+3] = 112 
            page = pg
            found = 1
         endif
         if c = 72 and  File[a+b+1] = 84 and File[a+b+2] = 84 and File[a+b+3] = 80
            page = pg
            found = 1
         endif

      next
      pg = pg + 1
      if found = 1 then proc DisplayFile
      if found = 1 then break
    until pg > 1249
endproc

procedure DisplayFile()
   x=115
   y=30
   d$ = " "
   s = 1
   MarkColor = 0
   draw image panel1,100,20
   set color 5,5,5

   b= page * 800 - 800
   for a = 1 to 900
      if MarkColor < 1 then set color 5,5,5
      if MarkColor > 0 then MarkColor = MarkColor - 1
      c = File[a+b]
      if c < 33 then MarkColor = 0
      if c = 104 and  File[a+b+1] = 116 and File[a+b+2] = 116 and File[a+b+3] = 112   
         set color 0,0,255
         MarkColor = 40
      endif
      if c = 72 and  File[a+b+1] = 84 and File[a+b+2] = 84 and File[a+b+3] = 80   
         set color 0,0,255
         MarkColor = 40
      endif

      if mode = 1 
         set caret x,y 
         write str$( c )
      endif
      if mode = 2 
           d$ = chr$(c) 
           set caret x,y ; write d$
      
      endif
 
      x=x+38
      if x> 1250 
        x=115
        y = y+20
      endif 
   next
   set color 255,255,255
endproc


procedure SaveFile()
  cnt = 1
  fileout
  open file fileout, "temp.wav",1
  while cnt<1000000
    N =  File[ cnt ] 
    write8 fileout,N
    
    cnt = cnt + 1
    if cnt > 999990 then break

  wend
   
    free file fileout  
    size = cnt
endproc

 procedure Menu()
    a = 1
 
    set color 0,0,0
    cls
    set color 250,250,250

    wln ; wln ; wln ; wln ; wln ; wln ; wln

    wln  "                       THIS IS A SIMPLE SCANNER FOR POSSIBLE SPYWARE "
    wln
    wln  "           It looks for web addresses located in a programs's text that may tell who the program is reporting to. "
    wln  "            "
    wln  "           First, hit the button labeled 'Load' "
    wln  "         It gives you a standard Load File dialog to select a program or file to look at.    "
    wln  "         Web addresses will be in color. "
    wln
    wln  "           After you select a file you can operate    "
    wln  "         the other buttons.     "
    wln  "            "
    wln  "          Pg Dwn, Pg Up, Dn10, Up10, Dn100, Up100       These buttons change the pages.   "
    wln  "            "
    wln  "          Mode ...   Toggles between text and Hex modes.   "
    wln  "            "
    wln  "          Scan ...   Finds next Web Addresss.  "
    wln  "            "
    wln  "          If the Scan button did nothing, then no web addresses were found."
    wln  "            "
    wln  "          Only the first Megabyte of the file is scanned. "

    wln  "          Click mouse to start. "
    wln
    wln  "          http://rb23.yolasite.com "
    wln
  
    redraw

    while a = 1
      wait 20 
      if mousebutton(0) then a = 2
    wend
    set color 0,0,0
    cls   
    write ; write ; wln a
    event = 2
    '  JESUS IS COMMING ..... PASS IT ON
endproc 

