当前位置:   article > 正文

jd商品搜索数据接口 unidbg打包jar 调用cipher , sign算法

jd商品搜索数据接口 unidbg打包jar 调用cipher , sign算法

 

 

通过cipher算法将请求体参数加密,unidbg打包jar给python调用

  1. if (type.equals("search")){
  2. String data="{\"addrFilter\":\"1\",\"articleEssay\":\"1\",\"deviceidTail\":\"\",\"exposedCount\":\"0\",\"first_search\":\"1\",\"imagesize\":{\"gridImg\":\"531x531\",\"listImg\":\"390x390\",\"longImg\":\"531x708\"},\"insertArticle\":\"1\",\"insertScene\":\"1\",\"insertedCount\":\"0\",\"isCorrect\":\"1\",\"jdv\":\"0|kong|t_2018512525_store_nopay_else|tuiguang|17093045161922140570002|1709304516\",\"keyword\":\""+keyword+"\",\"localNum\":\"0\",\"newMiddleTag\":\"1\",\"newVersion\":\"3\",\"oneBoxMod\":\"1\",\"orignalSearch\":\"1\",\"orignalSelect\":\"1\",\"page\":\"1\",\"pageEntrance\":\"1\",\"pagesize\":\"10\",\"pvid\":\"\",\"searchVersionCode\":\"9760\",\"secondInsedCount\":\"0\",\"showShopTab\":\"yes\",\"showStoreTab\":\"1\",\"sourceRef\":[{\"eventId\":\"Home_Refresh\",\"pageId\":\"Home_Main\",\"pvId\":\"\"},{\"eventId\":\"Search_Searchthi\",\"isDirectSearch\":\"0\",\"pageId\":\"Search_Activity\",\"pvId\":\"c46631d8a9a14bd99fec2b3c2e8c1ddd\"}],\"stock\":\"1\"}";
  3. String cipher_string=cipher.b(data.getBytes(StandardCharsets.UTF_8));
  4. System.out.println(cipher_string);
  5. }
  1. def get_cipher(type,keyword):
  2. cmd = f"java -jar unidbg-master.jar {type} {keyword} "
  3. signs = subprocess.check_output(cmd, shell=True, cwd="unidbg_master_cipher")
  4. cipher = signs.strip().decode('utf-8').split("\n")[-1]
  5. # print(cipher)
  6. return cipher

 获取sign签名  unidbg 调用libjdbitmapkit.so中算法

 {

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/355629
推荐阅读
  

闽ICP备14008679号