⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sha1.idel

📁 idel虚拟机源码
💻 IDEL
📖 第 1 页 / 共 2 页
字号:
\ Mostly generated by examples/borednet/sha1.py\ Compute the SHA-1 hash of a string of 2 million "a"s.ints: H0 0 0 0 0;intsints: W0 0 0 00 0 0 00 0 0 00 0 0 0;intsints: hbits  0  ;intsints: lbits  0  ;intsints: SHA1-IV0x674523010xEFCDAB890x98BADCFE0x103254760xC3D2E1F0;intsbss-data: collision 100string: target "09948flame"bss-data: target-digest 20bss-data: try 100def 0 1 main  4096 0 find-collision  u.  '\n' emit  try  target.size 16 +  type  '\n' emit  0 ;#define desiredbits 8def 2 1 find-collision  { tries trial --    try target.addr target.size memcpy    try target.size +  7  trial  sprintf-hex    desiredbits 7 and    { partial-byte --      desiredbits 3 >>>       1  8 partial-byte - <<  1 -  -1 xor      { partial-byte-index partial-byte-mask --        partial-byte-index  partial-byte if 1 + then        { check-bytes --          target-digest target.addr target.size digest          partial-byte if            target-digest partial-byte-index +            { a -- a c@  partial-byte-mask and  a c! }          then          try target.size + 8 +  7  0  sprintf-hex          target.size 16 +          tries 8 + 4 >>>          { try-strlen tries2 --            partial-byte partial-byte-index partial-byte-mask check-bytes            try-strlen tries2 trial 0 outer-loop } } } } } ;bss-data: precomputed-ctx 92def 8 1 outer-loop  { try-strlen tries2 trial i --    i tries2 < if      SHA1-init      try target.size + 8 +  7  trial  sprintf-hex      try  try-strlen 1 -  type 10 emit      try  try-strlen 1 -  SHA1-update      precomputed-ctx H 92 wordcpy      try-strlen tries2 trial i 0 inner-loop    else      { partial-byte partial-byte-index partial-byte-mask check-bytes -- 0 }    then } ;bss-data: last-char 4string: hex "0123456789abcdef"def 9 1 inner-loop  { j --    j 16 < if      H precomputed-ctx 92 wordcpy      hex.addr j + c@  last-char c!      last-char 1 SHA1-update      SHA1-final      H c@  target-digest c@ - if        '.' emit        j 1 +  inner-loop      else        'C' emit        { partial-byte partial-byte-index partial-byte-mask check-bytes          try-strlen tries2 trial i --          partial-byte if            H partial-byte-index +             { a -- a c@  partial-byte-mask and  a c! }          then          target-digest H check-bytes memcmp if            'D' emit            partial-byte partial-byte-index partial-byte-mask check-bytes            try-strlen tries2 trial i  j 1 +  inner-loop          else            '\n' emit            hex.addr j + c@  try try-strlen + 1 - c!            collision try try-strlen memcpy            dump-H            i 4 << j + 1 +          then }      then    else      '|' emit      { trial i --        trial 16 +  i 1 +  outer-loop }    then } ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -