文档章节

美团外卖json接口data数据解密

风情万种
 风情万种
发布于 2017/08/10 10:45
字数 411
阅读 68
收藏 0

前端都需要 CryptoJS

require代码

define("module/aesCrypto", [],
function(e) {
  const t = "240789B06A4D4FAG",
  n = "1513D520B9C1459C",
  r = "sxaa1k89dc";
  return {
    validate: function(e) {
      var t = this;
      if (e.length < 32) return ! 1;
      var n = e.slice(0, 32),
      r = e.slice(32),
      i = this.decrypto(r);
      return i
    },
    decrypto: function(e) {
      var r = CryptoJS.enc.Utf8.parse(t),
      i = CryptoJS.enc.Utf8.parse(n),
      s = CryptoJS.AES.decrypt(e, r, {
        iv: i,
        mode: CryptoJS.mode.CBC
      }),
      o = CryptoJS.enc.Utf8.stringify(s).toString();
      try {
        location.href.indexOf("debug") > -1 && console.log(JSON.parse(o || "{}"))
      } catch(u) {}
      return o
    }
  }
});
require(["module/aesCrypto"],function(l) {
	var data = 'BE913098F7F0168092A1CB0FE0D2234F0HFzT4iW96PEYHXp6B%2FqtuE8gwfQK5a74nCajEuHXiZdB%2Fv7Ysoe%2BVlNw7U7FhvfmBvPvvjVAwKoRxx2yuKhj0%2BwC0EBUmV0gYweUChgmHuEivna4hIhFCoEqYOyI5BqGklzGN7IYURxX9UxMsADLVKnSKvCmBe8xgC0cFVqz1K4QQMd2aL4e7HsIXiOLpCGXQ27sRT5wrNsAQy16pp0%2FASfurCeNJXCKZP%2BEGKggieZhTl0oY6S8a5V5n3dBXLvrI6PgyRgN7I9DehWJZJ0uVOTXei1d3nAiuHIAmz45TvmFnn7TG63s%2Bta3cARuPViJvXzTpC1q3pMAS1Bd9D6UOJCfEVzmfSd1AE124r979WhZAFXGqtzh%2B%2FNRei7t3tT5aT36oFXYpi81x8zi1XCD7FNAZoqDQ6s8Bor3yo%2FkPuWtMZIgQHx4Iy3vU9GvMZG%2FSC2UNSIufzL75Gmm6vAcMmPNwkgG3025TQwjmwHVCFuPCWL3xhzg%2BAVP5%2FKKJH%2BF8vLt2AIOQdQmxuYgPfhNcAQQ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JXqv1RquzNSub4%3D';
	data = decodeURIComponent(data),
	data = JSON.parse(l.validate(data) || "{}")
	console.log(data);
});

本来准备用php解密,但解密出来是串乱码 很奇怪,望高人指点

php代码如下:

<?php
$data = "7C1AD78D953258A6A8D2F5585C4BD5A8v17aeCeXo%2FoVLc9kar1ci6o4YnBD7iPOhRjZnL9sDoYilDdnIdGIK5d%2BO0hS0K%2F8jPdvzdAGvSYFdnesc4rMLmaQ0YP603vRId4%2BpvO06ljkpFwIrG1CIQZReZZlIVW79tN1TpplUPBvaC%2F%2BxPc1Qcqwsxv72G59bQPI1eaH1GMOAR1euEBirZ0YWTK%2FenUggh%2B1WbSJ7Tz%2FV3%2BjE7F827anXvMl52XeW07bEI2a31oDnJPKo5t0%2FdGHB0t%2FjXA6yHxcWHZEGHEQ2Terps3K0%2FcUjg1hNDQEqlLTihs0PunL%2Fk%2B9sy1tmiLuc%2F7sRYAzqdMmsSxq5H25td6yN%2FfwwJkgpRSHrpFo77zHzVUB9ToAnmsiAwXkKjkv%2FQMKX6wLeYfx0%2B5mWoMgV4MHQDk7K8gL2P9XiCsPc%2BM6S9hPwvwfVNhxe4RuuReTWsA5q%2Fq0o8u9Qxi1NiR12s%2FoUMWwOW9D78yVpibVlMcaPL4aPu3IdvOdRWrRWTl%2BmBbROy3PZDzhPTol2Ql8AmkjMqVdi9smzb15v9VlT6Zch0%2BmWX0euwh2QZR5qm86Gj3vaVxTEOlFGhmFsBjD03a8687wvSPdS9DwfxsBX%2BvbAZhGbQHCGxCly%2F1KOly%2FTtCgUG5DHucLK2R64xvGiPcBhENeSEEEQrGkf0y35fr8Oc9tW73WHmfb0F97uSP2xDt%2FQWoog%2FwQfamG3SrPw9wViokpvyaHMNPsTujg%2FJmVSDo17Ni8pT3Gfr8r47quwn7GU3d8qJf4n%2BZTFlyA7qB3oTgLHmSEE%2FhW8OCbIlNqlGyj2cgJLCuvXWn0Bp9yB1W%2BII5KyslLM8sDsvqzmvVli%2B7G4ww6KFnPNI9vmZ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erX6Q36OnM529euS0%2FLZAysi7beKXLgQ2HOLTrGcA1400in%2B714XxkKLGwNtiG97psEHGAy0AweYPho4xNSIr0iK9kXd9Uhr5ntXYBlydTbdIFqscTQsvrVYRLrK4ivF%2FPXYk2aPWDhJOmvFMse1%2F%2FHgjjsI%2FanLgAuJ87rMT3VgIM6k9fBV0RJ3g%2FQnddmXGH8ConVEyJG4UsOkpKDI6JyCDNCi6TLtuy%2B7jPkJZ5UlpVrAjQdcn8gHdLVllfd3WHJoBC8O2oxOK1rFBml%2Fy8l9wwKBmDxjYgOf18%2BAbUqfC5nFu5TMf26UwLzke0li88gBo48LlUJWEziBVXB7HRHRlsp1B51apzSgyeGDC2h7OZq9sZRRkHvX6B7kY%2FastQoDvaEiYJ9KlRMahAPebs%2FEEPS9irsE6CXyYGSaPNQiGOmcYJTrINEJnEIxWO7fc3BAcdzt4ACUYZ5c9%2BfBiktmf0jcKSdC8KvhRIthPMk9H2gHvNG5Cl3bIJ%2BlJIBHNMhBJ3IAbU9%2FF3rtIFQIGTwdaJGl%2BwGLRhmbyr0lwrpyExQeEINmiEOguemtcRSPm6xlLLZIH9gxFY7uqks4CCjJ7Bxd0zeCxHOXy30D2KZKH8oz1s2o2LrqR%2Fd7PXqKms%3D";
$data = urldecode($data);
$ase = new aesCrypto();
$str = $ase->validate($data);
echo $str;

class aesCrypto
{
    //private $t = "240789B06A4D4FAG";
    private $iv = "1513D520B9C1459C";
    private $key = "sxaa1k89dc";

    public function validate($e){
        if(strlen($e) < 32){ return 0;}
        //$n = substr($e, 0, 32);
        $r = substr($e, 32);
        $i = $this->decrypto($r);
        return  $i;
    }
    public  function decrypto($e){
        //$this->key = pack('H*', $this->key);
        //$this->iv = pack('H*', $this->iv);
        $e = base64_decode($e);
        $s = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->key, $e, MCRYPT_MODE_CBC, $this->iv);
        $s = rtrim($s,"\t\0");
        return $s;
    }
    public  function encrypted($e){
        $s = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->key, $e, MCRYPT_MODE_CBC, $this->iv);
        return base64_encode($s);
    }
}
?>

 

© 著作权归作者所有

共有 人打赏支持
风情万种
粉丝 22
博文 15
码字总数 13902
作品 0
杭州
后端工程师
私信 提问
加载中

评论(1)

w
wjysjtu
vitas,你好 http://wx.qlogo.cn/mmopen/pzHE73wrpMpkwHxJY2OuYR6coggctxcnicylSpibCrsfIgpK56bYe1Hibl0LwhbsTnG7owfRhRGVibEcA5MGcth0xVFuF2Hrbtu9/0
饿了么CTO雪峰:“拔错网线太离谱...”

谣言从这里产生 饿了么CTO张雪峰12月6号的一条朋友圈:饿了么开始做IDC断开测试...,史无前例... 然鹅12月7日中午,有网友爆料称 自己在“美团”点了外卖 然而 下了单付了钱,却一直显示没付...

k6t9q8xks6iikzppifq
2017/12/07
0
0
外卖聚合系统

帮助商户在收银系统实现外卖订单的全部处理流程 1.商户无需切换多个系统端处理外卖业务 a.门店的映射及解绑; b.可操作开关店; c.菜品上下架和数据维护; 2.减少商户在收银系统录入外卖订单...

广州鼎牛网络科技有限公司
07/05
0
0
美团开始在乎外卖骑士了 推智能语音助手

  智察网讯 继美团内部构架调整,成立新零售&打车事业群并将餐饮外卖业务划归到此群后,不足一个月时间,美团又有大动作了,而这次是针对外卖旗手送餐路上的安全问题。12月21日,美团外卖正...

智察大数据
2017/12/22
0
0
2017年中国用户光点美团外卖花了1710亿

  智察网讯 作为美团点评的核心业务板块,美团外卖的业绩确实不负众望。1月19日消息,美团点评高级副总裁王莆中在昨日美团外卖产业大会上透露,2017年美团外卖交易额达到1710亿元,是2016年...

智察大数据
01/19
0
0
美团外卖被曝系统故障 用户重复提交订单多次扣款

  智察网讯 12月7日消息,今日午间,众多用户反映,美团外卖出现订餐故障,无法下单或无法支付。美团外卖之后回应称,因技术原因导致系统故障,现已陆续恢复。   据网友表示,用美团外卖...

智察大数据
2017/12/07
0
0

没有更多内容

加载失败,请刷新页面

加载更多

linux脚本中父shell与子shell 执行的几种方式

本文主要介绍以下几个命令的区别: shell subshell source $ (commond) `commond` Linux执行Scripts有两种方式,主要区别在于是否建立subshell 1. source filename or . filename 不创建sub...

问题终结者
16分钟前
1
0
安装jdk和Tomcat

12月12日任务 16.1 Tomcat介绍 16.2 安装jdk 16.3 安装Tomcat Tomcat介绍 Tomcat是apache软件基金会(Apache Software Foundation)的Jakarta项目中的一个核心项目,由apache、Sun和其他一些...

robertt15
17分钟前
3
0
Beetl 免费视频

来自 https://my.oschina.net/gking?q=Beetl ,Beetl终于有人录制视频了 项目git地址:https://gitee.com/gavink/beetl-blog 视频地址:下载下来会更清晰,视频比较长,可使用倍速看 百度网盘...

闲大赋
30分钟前
0
0
isEmpty和null的区别

isEmpty和null的区别: 1.一个是对象为空(IsNull),一个是值为空(IsEmpty) 2.IsNull指任务类型变量是否为空包括对象类型的变量。 IsNull函数: 功能:返回Boolean的值,指明表达是否不包...

DemonsI
56分钟前
3
0
Centos7 安装mysql与php

https://blog.csdn.net/qq_36431213/article/details/79576025 官网下载安装mysql-server 依次使用下面三个命令安装 wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.r......

Yao--靠自己
今天
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部