md5 complete + md5sum added as a prog.

git-svn-id: https://spexeah.com:8443/svn/Asuro@971 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron committed 2020-07-11 00:44:05 +00:00
1 parent 86013b1125
commit 739898068b
7 files changed
+320 -98

No files matched your search

-1
View File
@@ -207,7 +207,6 @@ type
Server_Hostname : Array[0..63] of uint8; Server_Hostname : Array[0..63] of uint8;
Boot_File : Array[0..127] of uint8; Boot_File : Array[0..127] of uint8;
Magic_Cookie : Array[0..3] of uint8; Magic_Cookie : Array[0..3] of uint8;
Option_start : char;
end; end;
PDHCPHeader = ^TDHCPHeader; PDHCPHeader = ^TDHCPHeader;
TDHCPOpCode = ( TDHCPOpCode = (
File diff suppressed because it is too large. Load diff
+95 -81
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -21,7 +21,6 @@ type
hresult = cardinal; hresult = cardinal;
dword = cardinal; dword = cardinal;
integer = longint; integer = longint;
pchar = ^char; pchar = ^char;
//Standard Types //Standard Types
+2 -2
View File
@@ -502,7 +502,7 @@ begin
for i:=0 to Dist-1 do begin for i:=0 to Dist-1 do begin
asm asm
MOV EAX, result MOV EAX, result
ROL result, 1 ROL EAX, 1
MOV result, EAX MOV result, EAX
end; end;
end; end;
@@ -525,7 +525,7 @@ begin
for i:=0 to Dist-1 do begin for i:=0 to Dist-1 do begin
asm asm
MOV EAX, result MOV EAX, result
ROR result, 1 ROR EAX, 1
MOV result, EAX MOV result, EAX
end; end;
end; end;
+3 -11
View File
@@ -46,7 +46,7 @@ uses
edit, edit,
udpcat, udpcat,
cpu, cpu,
md5, md5, md5sum,
rand; rand;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall; procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@@ -99,8 +99,6 @@ var
test : puint8; test : puint8;
fb : puint16; fb : puint16;
l : PLinkedListBase; l : PLinkedListBase;
MD5_Data : array [0..4] of Char = ('h','e','l','l','o');
MD5_Hash : PMD5Digest;
begin begin
{ Serial Init } { Serial Init }
@@ -210,7 +208,7 @@ begin
net.init; net.init;
tracer.push_trace('kmain.VMINIT'); tracer.push_trace('kmain.VMINIT');
vm.init(); //vm.init();
{ Init Progs } { Init Progs }
tracer.push_trace('kmain.SHELLINIT'); tracer.push_trace('kmain.SHELLINIT');
@@ -228,19 +226,13 @@ begin
tracer.push_trace('kmain.EDIT'); tracer.push_trace('kmain.EDIT');
edit.init(); edit.init();
udpcat.init(); udpcat.init();
md5sum.init();
terminal.run(); terminal.run();
{ Init Splash } { Init Splash }
//tracer.push_trace('kmain.SPLASHINIT'); //tracer.push_trace('kmain.SPLASHINIT');
//splash.init(); //splash.init();
writestring('MD5_Hash: ');
MD5_Hash := MD5Buffer(puint8(@MD5_Data[0]), 5);
for i := 0 to 15 do begin
writehexpair(MD5_Hash^[i]);
end;
writestringln(' ');
{ End of Boot } { End of Boot }
tracer.push_trace('kmain.EOB'); tracer.push_trace('kmain.EOB');
+40
View File
@@ -0,0 +1,40 @@
{
Prog->VMLog - Virtual Machine Event Log.
@author(Kieron Morris <[email protected]>)
}
unit md5sum;
interface
uses
console, terminal, keyboard, util, strings, tracer, md5;
procedure init();
implementation
procedure run(Params : PParamList);
var
md5word : pchar;
wordlen : uint32;
MD5_Hash : PMD5Digest;
i : uint32;
begin
md5word:= getParam(0, Params);
wordlen:= stringSize(md5word);
MD5_Hash := MD5Buffer(puint8(md5word), wordlen);
for i:=0 to 15 do begin
writehexpairWND(MD5_Hash^[i], getTerminalHWND);
end;
writestringlnWND(' ', getTerminalHWND);
end;
procedure init();
begin
tracer.push_trace('md5sum.init');
terminal.registerCommand('MD5SUM', @Run, 'Perform MD5SUM on a word.');
end;
end.