Skip to content

Surely There Must Be A Better Way; Hacker’s Corner (1)

Vector 3:1, page 101

programming techniques system interfaces

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 101

This issue of VECTOR includes an article by Robert Pullman on apportioning data in APL. You’ll find it later on in the technical section. Can anyone find an alternative solution to Robert’s \<CROSS> function?

Hacker’s Corner (1)

by Adrian Smith

Following up on my attempt on the integrity of the TSO/APL Session Manager, I thought it might be time to explore the hacking potential of the workspace access processor (AP102 – authorized personnel only). Here is an alternative route to your TSO Logon Id, for which many thanks to Andy Chadwick of our Technical Support Group:

     R←TSOID;C;CTLMS;DATHS;BASE;OFF;XX;ZC
     ------------------------------------
[1]   ⍝DIG OUT YOUR USER ID, HAVING CHAINED DOWN
[2]   ⍝THREE LOTS OF CONTROL BLOCKS TO FIND IT.
[3]   ⍝
[4]    C←102 ⎕SVO 2 5 ⍴'CTLMSDATMS'
[5]    C← 1 0 1 0 ⎕SVC 2 5 ⍴'CTLMSDATMS'
[6]    CTLMS←1,540,4
[7]    BASE←DATHS
[8]    CTLMS←1,(BASE+180),4
[9]    OFF←DATHS
[10]   CTLMS←1,(OFF+264),4
[11]   OFF←DATHS
[12]   CTLMS←1,OFF,8
[13]   XX←,⍉(4⍴256)⊤DATHS
[14]   ZC←'ABCDEFGHI∆∆∆∆∆∆∆JKLMNOPQR∆∆∆∆∆∆∆STUVWXYZ'
[15]   ZC←ZC,'∆∆∆∆∆∆0123456789?'
[16]   R←ZC[(⍴ZC)⌊¯192+(¯1↑XX)↑XX]
     ∇

Unfortunately, this operates only in ⎕PEEK mode; real hackerdom begins with ⎕POKE, as illustrated.