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
2020-07-11 00:44:05 +00:00
parent 86013b1125
commit 739898068b
7 changed files with 338 additions and 116 deletions
-1
View File
@@ -207,7 +207,6 @@ type
Server_Hostname : Array[0..63] of uint8;
Boot_File : Array[0..127] of uint8;
Magic_Cookie : Array[0..3] of uint8;
Option_start : char;
end;
PDHCPHeader = ^TDHCPHeader;
TDHCPOpCode = (
File diff suppressed because it is too large Load Diff
+111 -97
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -21,7 +21,6 @@ type
hresult = cardinal;
dword = cardinal;
integer = longint;
pchar = ^char;
//Standard Types
+2 -2
View File
@@ -502,7 +502,7 @@ begin
for i:=0 to Dist-1 do begin
asm
MOV EAX, result
ROL result, 1
ROL EAX, 1
MOV result, EAX
end;
end;
@@ -525,7 +525,7 @@ begin
for i:=0 to Dist-1 do begin
asm
MOV EAX, result
ROR result, 1
ROR EAX, 1
MOV result, EAX
end;
end;
+3 -11
View File
@@ -46,7 +46,7 @@ uses
edit,
udpcat,
cpu,
md5,
md5, md5sum,
rand;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@@ -99,8 +99,6 @@ var
test : puint8;
fb : puint16;
l : PLinkedListBase;
MD5_Data : array [0..4] of Char = ('h','e','l','l','o');
MD5_Hash : PMD5Digest;
begin
{ Serial Init }
@@ -210,7 +208,7 @@ begin
net.init;
tracer.push_trace('kmain.VMINIT');
vm.init();
//vm.init();
{ Init Progs }
tracer.push_trace('kmain.SHELLINIT');
@@ -228,19 +226,13 @@ begin
tracer.push_trace('kmain.EDIT');
edit.init();
udpcat.init();
md5sum.init();
terminal.run();
{ Init Splash }
//tracer.push_trace('kmain.SPLASHINIT');
//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 }
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.