add SendUsrChk and test it
This commit is contained in:
@@ -7,7 +7,7 @@ const str2byte = (s: string): number[] => {
|
||||
return Array.from(s).map((_, i) => s.charCodeAt(i));
|
||||
};
|
||||
|
||||
const SendUsrChk = (username: string, password: string): DataView => {
|
||||
export const SendUsrChk = (username: string, password: string): DataView => {
|
||||
// type is char account[0x20]; char password[0x80];
|
||||
let buf = new Uint8Array(0x20 + 0x80);
|
||||
buf.fill(0);
|
||||
@@ -40,4 +40,4 @@ const SendUsrChk = (username: string, password: string): DataView => {
|
||||
return retret;
|
||||
};
|
||||
|
||||
console.log(hexdump(SendUsrChk("admin", "admin").buffer, { ansi: true }));
|
||||
//console.log(hexdump(SendUsrChk("admin", "admin").buffer, { ansi: true }));
|
||||
|
||||
Reference in New Issue
Block a user