%constlonginteger password=987325576 %systemroutinespec phex(%integer i) %externalstring(255)%fnspec interrupt %externalroutinespec prompt(%string(255)p) %externalroutinespec setmode(%string(255)s) %integerfn encrypt(%longinteger n) %longlongreal lr %integer i %constlonglongreal const=131719.0478125 %for i=1,1,6 %cycle lr=n lr=lr*const n=longinteger(addr(lr)+4);!middle 64 bits %repeat %result=integer(addr(n)) %end %externalroutine privilege(%string(255)s) %longinteger n n=0 setmode("echo=off") prompt("Pass:") %while nextsymbol#nl %cycle n=n<<8+nextsymbol skipsymbol %repeat setmode("Echo=on") n=encrypt(n) %if n=password %then printstring("yes") %else printstring("no") newline printstring("encrypted=");write(n,30);newline %end %routine show string(%integer i) %string(4)s %integer b s="" %for b=0,1,3 %cycle %unless 32<=byteinteger(addr(i)+b*8)<=126 %start printstring(" contains unprintable characters") %return %finishelse s=s.tostring(byteinteger(addr(i)+b*8)) %repeat printstring(s) %stop %end %externalroutine findpass(%string(255)s) %integer i %for i=X'010101017',1,2147483647 %cycle %if interrupt#"" %start write(i,1) printstring(" X'") phex(i) printstring("'") newline %finish %if encrypt(i)=password %start printstring("Success!:") write(i,30) show string(i) newline %finish %repeat %end %endoffile