Version:0.9 StartHTML:0000000105 EndHTML:0000036366 StartFragment:0000001053 EndFragment:0000036350
PROGRAM SmallStack_Process3_Demo;
//#sign:max: MAXBOX8: 22/11/2016 19:25:15
//#tech:perf: 0:0:5.844 threads: 6 192.168.80.1 19:25:15 4.2.4.80
procedure P1;
begin
{@1} writeln('jump to P1 success...')
{@2}end; //pop
procedure P2;
begin
{@3} P1; //push @4 (=P1)
//goto @1
{@4} P1; //push @5
//goto @1
{@5}end; //pop
procedure P3;
begin
{@6} P1; //push @7 (=P2)
//goto @1
{@7} P2; //push @8
//goto @3
{@8}end; //pop
BEGIN //Main
//<Executable statements>
{@9} P3 //push @10
//goto @6
{@10}END. //pop
Training Script for IT-Security and Engineering.
Explain: the processor pushes the @ of the next following command on the stack!
Byte Code Ref:
[PROCS]
Proc [0] Export: !MAIN -1
[0] CALL 4
[5] RET
Proc [1] Export: P1 -1
[0] PUSHTYPE 24(String) // 1
[5] ASSIGN Base[1], ['jump to P1 success...']
[41] CALL 2
[46] POP // 0
[47] RET
Proc [2]: External Decl: \00\00 WRITELN
Proc [3] Export: P2 -1
[0] CALL 1
[5] CALL 1
[10] RET
Proc [4] Export: P3 -1
[0] CALL 1
[5] CALL 3
[10] RET
Proc [5] Export: !MASTERPROC -1
[0] CALL 0
[5] RET
Decompiled Code maXbox: 008_stack_ibz_process3.TXT
Doc Demo:
program xVerwechselt_Array;
type
TABarray = array[0..1] of byte;
var
marray: TABArray;
function Swap(va,vb: byte): TABarray;
var t: byte;
begin
writeln(Format('2: a,b,t= %d %d %d',[va,vb,t]));
t:= va;
va:= vb;
vb:= t;
result[0]:= va;
result[1]:= vb;
writeln(Format('3: a,b,t= %d %d %d',[va,vb,t]));
end;
begin //main
marray[0]:= 10;
marray[1]:= 20;
writeln(Format('1: a,b= %d %d',[marray[0],marray[1]]));
marray:= Swap(marray[0], marray[1]);
writeln(Format('4: a,b= %d %d',[marray[0],marray[1]]));
end.
-------------------------------------------------------
1: a,b,t= 10 20 30 //Aufruf der globalen Variablen
2: a,b,t= 20 10 0 //Tausch durch ander Parameterreihenfolge möglich
3: a,b,t= 10 20 20 // Rücknahme des Tausches lokal
4: a,b,t= 20 10 30 //Eigentlicher Tausch
//memo1 is script editor
//memo2 is output space
//max@kleiner.com
#include "stdafx.h"
#include <stdio.h>
typedef unsigned char byte;
byte a,b,t;
void Swap(byte *a, byte *b)
{
byte t=0;
printf("2: a,b,t= %d %d %d\n",*a,*b,t);
t = *a;
*a = *b;
*b = t;
printf("3: a,b,t= %d %d %d\n",*a,*b,t);
}
int _tmain(int argc, char* argv[])
{
a = 10;
b = 20;
t = 30;
printf("1: a,b,t= %d %d %d\n",a,b,t);
Swap(&b,&a);
printf("4: a,b,t= %d %d %d\n",a,b,t);
return 0;
}
22/11/2016 13:04:27.100 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
22/11/2016 13:04:27.100 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
22/11/2016 13:04:27.100 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
22/11/2016 13:04:27.100 [NOTICE] Opening Socks listener on 127.0.0.1:9150
22/11/2016 13:04:27.100 [NOTICE] Renaming old configuration file to "C:\Users\max\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\torrc.orig.1"
22/11/2016 13:04:28.000 [NOTICE] Bootstrapped 5%: Connecting to directory server
22/11/2016 13:04:28.000 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (No route to host [WSAEHOSTUNREACH ]; NOROUTE; count 1; recommendation warn; host 5525D0429BFE5DC4F1B0E9DE47A4CFA169661E33 at 5.175.233.86:443)
22/11/2016 13:04:34.100 [WARN] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (No route to host [WSAEHOSTUNREACH ]; NOROUTE; count 2; recommendation warn; host BD6A829255CB08E66FBE7D3748363586E46B3810 at 171.25.193.9:80)
22/11/2016 13:04:34.100 [NOTICE] Closing no-longer-configured Socks listener on 127.0.0.1:9150
22/11/2016 13:04:34.100 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
22/11/2016 13:04:34.100 [NOTICE] Closing old Socks listener on 127.0.0.1:9150
22/11/2016 13:04:34.100 [NOTICE] Delaying directory fetches: DisableNetwork is set.
----app_template_loaded----