[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. $into_path = 'C:/image'  # 微信image文件路径
  2. $out_path = "C:/image/jpg"
  3. function imageDecode($temp_path, $dat_file_name, $out_path){
  4. $dat_read=gc $temp_path -enc byte # 读取.bat 文件
  5. $xo, $j = Format($temp_path) # 判断图片格式 并计算返回异或值 函数
  6. if($j -eq 1){$mat = '.png'}elseif($j -eq 2){$mat = '.gif'}elseif($j -eq 3){$mat = '.jpg'}
  7. $out = $out_path + '/' + dat_file_name + $mat  # 图片输出路径
  8. sc -enc byte $out $(foreach($now in $dat_read){$now -bxor $xo})# 图片写入
  9. }
  10. function Format($f){
  11. $a = @((0x89, 0x50, 0x4e), (0x47, 0x49, 0x46), (0xff, 0xd8, 0xff))
  12. $dat_r = gc $f -enc byte
  13. foreach($xor in $a){$j++;foreach($now in $xor){$res+=$now -bxor $dat_r[$i++]};if($res[0] -eq $res[1] -eq $res[2]){return $res[0], $j};rv i,res}
  14. }
  15. dir $into_path|%{
  16. $temp_path=$_.fullname # 拼接路径:微信图片路径+图片名
  17. $dat_file_name=$_.basename # 截取字符串 去掉.dat
  18. imageDecode($temp_path, $dat_file_name, $out_path) # 转码函数
  19. }
复制代码

TOP

本帖最后由 idwma 于 2022-2-5 13:28 编辑

回复 3# 5i365

改了
    密码是多少
  1. #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
  2. $into_path = '.\image'  # 微信image文件路径
  3. $out_path = "."
  4. function imageDecode($temp_path, $dat_file_name, $out_path){
  5. $dat_read=gc -readcount 0 $temp_path -enc byte # 读取.bat 文件
  6. $xo, $j = Format($temp_path) # 判断图片格式 并计算返回异或值 函数
  7. if($j -eq 1){$mat = '.png'}elseif($j -eq 2){$mat = '.gif'}elseif($j -eq 3){$mat = '.jpg'}
  8. $out = $out_path + '/' + $dat_file_name + $mat  # 图片输出路径
  9. [io.file]::writeallbytes($out,([byte[]]$(foreach($now in $dat_read){$now -bxor $xo}))) # 图片写入
  10. }
  11. function Format($f){
  12. $a = @((0x89, 0x50, 0x4e), (0x47, 0x49, 0x46), (0xff, 0xd8, 0xff))
  13. $dat_r = gc -readcount 0 $f -enc byte
  14. foreach($xor in $a){$j++;foreach($now in $xor){$res+=@($now -bxor $dat_r[$i++])};if($res[0] -eq $res[1] -eq $res[2]){return $res[0], $j};rv i,res}
  15. }
  16. dir $into_path|%{
  17. $temp_path=$_.fullname # 拼接路径:微信图片路径+图片名
  18. $dat_file_name=$_.basename # 截取字符串 去掉.dat
  19. imageDecode $temp_path $dat_file_name $out_path # 转码函数
  20. }
复制代码
1

评分人数

    • 5i365: 太牛X了, 感谢帮忙技术 + 1

TOP

回复 5# 5i365


    4楼改了

TOP

返回列表