【python 逆向分析惠农网】分析惠农网的【headers】载荷签名,并实现获取公开数据,全程异步跟栈,仅供学习参考

文章日期:2025.1.24

使用工具:Python、Node.js

本章知识:分析惠农网的【headers】载荷签名,有点多,就不展示了

文章难度:中等(比较麻烦,异步较多)

文章全程已做去敏处理!!!  【需要做的可联系我】 

AES解密处理(直接解密即可)(crypto-js.js 标准算法):​​​​​​在线AES加解密工具

仅供学习!仅供学习!仅供学习!

声明:本文逆向的所有内容文件仅供学习,从网站扣的代码不会公开,但博主自己写的代码内容将会公开在文章最底部,望谅解!!!

真男人不废话,先看效果图

1、打开某某网站(使用文章开头的AES在线工具解密):

afmN7ge3cm8Jebf+PNTG0KBXzhXl04jj6mY9v5Tzrh8DAg+qQAO0MvgEi+Plv6VQ

2、打开页面后,顺便打开控制台,然后我们随便翻一页,点开图中的【list】接口,仔细看一下 headers 载荷的内容,我们今天就把这几个参数分析一遍

3、我们全局搜索一下,然后进去看看

4、进来后直接把这些需要的代码转移到本地,我们先把这些生成规则模拟出现,最后再去找sign的生成规则

5、我把这几个参数的生成都直接做好了,也没什么特别的,我就不展示过程了,直接展示代码原理。这几个小参数过于简单,主要讲解sign的生成,这几个小参数大家看看就能懂,也可以自己尝试去扣下代码

6、接下来看一下找一下SIGN参数,直接在启动器里打断点,这里我就不展示了。断住后我们在堆栈里找一下,看哪里会是加密位置,根据分析,是在这个地方进行了异步加密,我们直接打上断点,跟栈看看

7、跟进来后,经过多次跟栈研究,发现他的SIGN是在这里生成的,我们继续跟进去

8、跟进了后,直接把代码全部扣走,然后模拟测试一下 

9、我把参数都一并复制过来了,运行后发现缺少L函数,我们直接去网站看看

10、我在网站上看了一下,发现他用来三元表达式,都是写死的固定参数。一眼看出是标准的SHA256算法

 11、下面的几个也一样,我们直接模拟即可,一眼懂,这三元表达式也不算太乱

12、 都补上后,再次运行发现缺少d参数,我测试后发现是缺少fromString函数方法,这个Node是没有这个方法的,直接去扣,我已经扣过了,也没难度,缺少这个方法的,直接去扣即可

13、补上后,再次运行发现下面有一个方法,这个其实也是标准的算法,SHA384算法

14、代码写好后,直接运行,看看还差什么,废话不多说,看动图,整个代码都进行展示

15、我们将JS代码进行整理,提供接口支持,然后用python进行读取接口加密信息,并请求公开数据,实现自动化。

【附上代码】请用Base64解密,即可得到源代码,如果使用不了,可能已经过时,网站进行了更新

注意~~仅供学习参考

【sign生成.js】请用Base64解密

Y29uc3QgQ3J5cHRvSlMgPSByZXF1aXJlKCdjcnlwdG8tanMnKQpjb25zdCBleHByZXNzID0gcmVxdWlyZSgnZXhwcmVzcycpOwoKY29uc3QgYXBwID0gZXhwcmVzcygpOwphcHAudXNlKGV4cHJlc3MuanNvbigpKTsKZnVuY3Rpb24gU0hBMjU2KHRleHQpewogICAgcmV0dXJuIENyeXB0b0pTLlNIQTI1Nih0ZXh0KS50b1N0cmluZygpCn0KZnVuY3Rpb24gU0hBMzg0KHRleHQpewogICAgcmV0dXJuIENyeXB0b0pTLlNIQTM4NCh0ZXh0KS50b1N0cmluZygpCn0KZnVuY3Rpb24gTUQ1KHRleHQpewogICAgcmV0dXJuIENyeXB0b0pTLk1ENSh0ZXh0KS50b1N0cmluZygpCn0KZnVuY3Rpb24gU0hBMSh0ZXh0KXsKICAgIHJldHVybiBDcnlwdG9KUy5TSEExKHRleHQpLnRvU3RyaW5nKCkKfQpYX0NMSUVOVF9JRCA9IGZ1bmN0aW9uKGUpIHsKICAgIHZhciB0ID0gKG5ldyBEYXRlKS5nZXRUaW1lKCk7CiAgICByZXR1cm4gKGUgPyAieHh4eHh4eHh4eHh4eHl4eHh4eXh4eHh4eHh4eHh4eHgiIDogInh4eHh4eHgteHh4eC00eHh4LXl4eHgteHh4eHh4eHh4IikucmVwbGFjZSgvW3h5XS9nLCAoZnVuY3Rpb24oZSkgewogICAgICAgIHZhciBuID0gKHQgKyAxNiAqIE1hdGgucmFuZG9tKCkpICUgMTYgfCAwOwogICAgICAgIHJldHVybiB0ID0gTWF0aC5mbG9vcih0IC8gMTYpLAogICAgICA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CAxMzIsIDEzMCwgMzQsIDQsIDY2LCAzMiwgMTM1LCAxNjcsIDM2LCAwLCAzMiwgNCwgMTY3LCAxMV0pKSx7fSkuZXhwb3J0cwogICAgfSBjYXRjaCAodCkge30KICAgIGZ1bmN0aW9uIHIodCwgZSwgbikgewogICAgICAgIHRoaXMubG93ID0gMCB8IHQsCiAgICAgICAgdGhpcy5oaWdoID0gMCB8IGUsCiAgICAgICAgdGhpcy51bnNpZ25lZCA9ICEhbgogICAgfQogICAgZnVuY3Rpb24gbyh0KSB7CiAgICAgICAgcmV0dXJuICEwID09PSAodCAmJiB0Ll9faXNMb25nX18pCiAgICB9CiAgICByLnByb3RvdHlwZS5fX2lzTG9uZ19fLAogICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHIucHJvdG90eXBlLCAiX19pc0xvbmdfXyIsIHsKICAgICAgICB2YWx1ZTogITAKICAgIH0pLAogICAgci5pc0xvbmcgPSBvOwogICAgdmFyIGwgPSB7fQogICAgICAsIGMgPSB7fTsKICAgIGZ1bmN0aW9uIGgodCwgZSkgewogICAgICAgIHZhciBuLCByLCBvOwogICAgICAgIHJldHVybiBlID8gKG8gPSAwIDw9ICh0ID4+Pj0gMCkgJiYgdCA8IDI1NikgJiYgKHIgPSBjW3RdKSA/IHIgOiAobiA9IGYodCwgKDAgfCB0KSA8IDAgPyAtMSA6IDAsICEwKSwKICAgICAgICBvICYmIChjW3RdID0gbiksCiAgICAgICAgbikgOiAobyA9IC0xMjggPD0gKHQgfD0gMCkgJiYgdCA8IDEyOCkgJiYgKHIgPSBsW3RdKSA/IHIgOiAobiA9IGYodCwgdCA8IDAgPyAtMSA6IDAsICExKSwKICAgICAgICBvICYmIChsW3RdID0gbiksCiAgICAgICAgbikKICAgIH0KICAgIGZ1bmN0aW9uIGQodCwgZSkgewogICAgICAgIGlmIChpc05hTih0KSkKICAgICAgICAgICAgcmV0dXJuIGUgPyBrIDogQzsKICAgICAgICBpZiAoZSkgewogICAgICAgICAgICBpZiAodCA8IDApCiAgICAgICAgICAgICAgICByZXR1cm4gazsKICAgICAgICAgICAgaWYgKHQgPj0gdykKICAgICAgICAgICAgICAgIHJldHVybiBBCiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKHQgPD0gLXgpCiAgICAgICAgICAgICAgICByZXR1cm4gSTsKICAgICAgICAgICAgaWYgKHQgKyAxID49IHgpCiAgICAgICAgICAgICAgICByZXR1cm4gTwogICAgICAgIH0KICAgICAgICByZXR1cm4gdCA8IDAgPyBkKC10LCBlKS5uZWcoKSA6IGYodCAlIF8gfCAwLCB0IC8gXyB8IDAsIGUpCiAgICB9CiAgICBmdW5jdGlvbiBmKHQsIGUsIG4pIHsKICAgICAgICByZXR1cm4gbmV3IHIodCxlLG4pCiAgICB9CiAgICByLmZyb21JbnQgPSBoLAogICAgci5mcm9tTnVtYmVyID0gZCwKICAgIHIuZnJvbUJpdHMgPSBmOwogICAgdmFyIG0gPSBNYXRoLnBvdzsKICAgIGZ1bmN0aW9uIHYodCwgZSwgbikgewogICAgICAgIGlmICgwID09PSB0Lmxlbmd0aCkKICAgICAgICAgICAgdGhyb3cgRXJyb3IoImVtcHR5IHN0cmluZyIpOwogICAgICAgIGlmICgiTmFOIiA9PT0gdCB8fCAiSW5maW5pdHkiID09PSB0IHx8ICIrSW5maW5pdHkiID09PSB0IHx8ICItSW5maW5pdHkiID09PSB0KQogICAgICAgICAgICByZXR1cm4gQzsKICAgICAgICBpZiAoIm51bWJlciIgPT0gdHlwZW9mIGUgPyAobiA9IGUsCiAgICAgICAgZSA9ICExKSA6IGUgPSAhIWUsCiAgICAgICAgKG4gPSBuIHx8IDEwKSA8IDIgfHwgMzYgPCBuKQogICAgICAgICAgICB0aHJvdyBSYW5nZUVycm9yKCJyYWRpeCIpOwogICAgICAgIHZhciBwOwogICAgICAgIGlmICgocCA9IHQuaW5kZXhPZigiLSIpKSA+IDApCiAgICAgICAgICAgIHRocm93IEVycm9yKCJpbnRlcmlvciBoeXBoZW4iKTsKICAgICAgICBpZiAoMCA9PT0gcCkKICAgICAgICAgICAgcmV0dXJuIHYodC5zdWJzdHJpbmcoMSksIGUsIG4pLm5lZygpOwogICAgICAgIGZvciAodmFyIHIgPSBkKG0obiwgOCkpLCBvID0gQywgaSA9IDA7IGkgPCB0Lmxlbmd0aDsgaSArPSA4KSB7CiAgICAgICAgICAgIHZhciBsID0gTWF0aC5taW4oOCwgdC5sZW5ndGggLSBpKQogICAgICAgICAgICAgICwgYyA9IHBhcnNlSW50KHQuc3Vic3RyaW5nKGksIGkgKyBsKSwgbik7CiAgICAgICAgICAgIGlmIChsIDwgOCkgewogICAgICAgICAgICAgICAgdmFyIGggPSBkKG0obiwgbCkpOwogICAgICAgICAgICAgICAgbyA9IG8ubXVsKGgpLmFkZChkKGMpKQogICAgICAgICAgICB9IGVsc2UKICAgICAgICAgICAgICAgIG8gPSAobyA9IG8ubXVsKHIpKS5hZGQoZChjKSkKICAgICAgICB9CiAgICAgICAgcmV0dXJuIG8udW5zaWduZWQgPSBlLAogICAgICAgIG8KICAgIH0KICAgIGZ1bmN0aW9uIHkodCwgZSkgewogICAgICAgIHJldHVybiAibnVtYmVyIiA9PSB0eXBlb2YgdCA/IGQodCwgZSkgOiAic3RyaW5nIiA9PSB0eXBlb2YgdCA/IHYodCwgZSkgOiBmKHQubG93LCB0LmhpZ2gsICJib29sZWFuIiA9PSB0eXBlb2YgZSA/IGUgOiB0LnVuc2lnbmVkKQogICAgfQogICAgci5mcm9tU3RyaW5nID0gdiwKICAgIHIuZnJvbVZhbHVlID0geTsKICAgIHZhciBfID0gNDI5NDk2NzI5NgogICAgICAsIHcgPSBfICogXwogICAgICAsIHggPSB3IC8gMgogICAgICAsIFMgPSBoKDEgPDwgMjQpCiAgICAgICwgQyA9IGgoMCk7CiAgICByLlpFUk8gPSBDOwogICAgdmFyIGsgPSBoKDAsICEwKTsKICAgIHIuVVpFUk8gPSBrOwogICAgdmFyIE0gPSBoKDEpOwogICAgci5PTkUgPSBNOwogICAgdmFyIEUgPSBoKDEsICEwKTsKICAgIHIuVU9ORSA9IEU7CiAgICB2YXIgVCA9IGgoLTEpOwogICAgci5ORUdfT05FID0gVDsKICAgIHZhciBPID0gZigtMSwgMjE0NzQ4MzY0NywgITEpOwogICAgci5NQVhfVkFMVUUgPSBPOwogICAgdmFyIEEgPSBmKC0xLCAtMSwgITApOwogICAgci5NQVhfVU5TSUdORURfVkFMVUUgPSBBOwogICAgdmFyIEkgPSBmKDAsIC0yMTQ3NDgzNjQ4LCAhMSk7CiAgICByLk1JTl9WQUxVRSA9IEk7CiAgICB2YXIgTCA9IHIucHJvdG90eXBlOwogICAgTC50b0ludCA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLnVuc2lnbmVkID8gdGhpcy5sb3cgPj4+IDAgOiB0aGlzLmxvdwogICAgfQogICAgLAogICAgTC50b051bWJlciA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLnVuc2lnbmVkID8gKHRoaXMuaGlnaCA+Pj4gMCkgKiBfICsgKHRoaXMubG93ID4+PiAwKSA6IHRoaXMuaGlnaCAqIF8gKyAodGhpcy5sb3cgPj4+IDApCiAgICB9CiAgICAsCiAgICBMLnRvU3RyaW5nID0gZnVuY3Rpb24odCkgewogICAgICAgIGlmICgodCA9IHQgfHwgMTApIDwgMiB8fCAzNiA8IHQpCiAgICAgICAgICAgIHRocm93IFJhbmdlRXJyb3IoInJhZGl4Iik7CiAgICAgICAgaWYgKHRoaXMuaXNaZXJvKCkpCiAgICAgICAgICAgIHJldHVybiAiMCI7CiAgICAgICAgaWYgKHRoaXMuaXNOZWdhdGl2ZSgpKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmVxKEkpKSB7CiAgICAgICAgICAgICAgICB2YXIgZSA9IGQodCkKICAgICAgICAgICAgICAgICAgLCBkaXYgPSB0aGlzLmRpdihlKQogICAgICAgICAgICAgICAgICAsIG4gPSBkaXYubXVsKGUpLnN1Yih0aGlzKTsKICAgICAgICAgICAgICAgIHJldHVybiBkaXYudG9TdHJpbmcodCkgKyBuLnRvSW50KCkudG9TdHJpbmcodCkKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gIi0iICsgdGhpcy5uZWcoKS50b1N0cmluZyh0KQogICAgICAgIH0KICAgICAgICBmb3IgKHZhciByID0gZChtKHQsIDYpLCB0aGlzLnVuc2lnbmVkKSwgbyA9IHRoaXMsIGwgPSAiIjsgOyApIHsKICAgICAgICAgICAgdmFyIGMgPSBvLmRpdihyKQogICAgICAgICAgICAgICwgaCA9IChvLnN1YihjLm11bChyKSkudG9JbnQoKSA+Pj4gMCkudG9TdHJpbmcodCk7CiAgICAgICAgICAgIGlmICgobyA9IGMpLmlzWmVybygpKQogICAgICAgICAgICAgICAgcmV0dXJuIGggKyBsOwogICAgICAgICAgICBmb3IgKDsgaC5sZW5ndGggPCA2OyApCiAgICAgICAgICAgICAgICBoID0gIjAiICsgaDsKICAgICAgICAgICAgbCA9ICIiICsgaCArIGwKICAgICAgICB9CiAgICB9CiAgICAsCiAgICBMLmdldEhpZ2hCaXRzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuaGlnaAogICAgfQogICAgLAogICAgTC5nZXRIaWdoQml0c1Vuc2lnbmVkID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuaGlnaCA+Pj4gMAogICAgfQogICAgLAogICAgTC5nZXRMb3dCaXRzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHRoaXMubG93CiAgICB9CiAgICAsCiAgICBMLmdldExvd0JpdHNVbnNpZ25lZCA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLmxvdyA+Pj4gMAogICAgfQogICAgLAogICAgTC5nZXROdW1CaXRzQWJzID0gZnVuY3Rpb24oKSB7CiAgICAgICAgaWYgKHRoaXMuaXNOZWdhdGl2ZSgpKQogICAgICAgICAgICByZXR1cm4gdGhpcy5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b3cgPT09IHQubG93KQogICAgfQogICAgLAogICAgTC5lcSA9IEwuZXF1YWxzLAogICAgTC5ub3RFcXVhbHMgPSBmdW5jdGlvbih0KSB7CiAgICAgICAgcmV0dXJuICF0aGlzLmVxKHQpCiAgICB9CiAgICAsCiAgICBMLm5lcSA9IEwubm90RXF1YWxzLAogICAgTC5uZSA9IEwubm90RXF1YWxzLAogICAgTC5sZXNzVGhhbiA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gdGhpcy5jb21wKHQpIDwgMAogICAgfQogICAgLAogICAgTC5sdCA9IEwubGVzc1RoYW4sCiAgICBMLmxlc3NUaGFuT3JFcXVhbCA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gdGhpcy5jb21wKHQpIDw9IDAKICAgIH0KICAgICwKICAgIEwubHRlID0gTC5sZXNzVGhhbk9yRXF1YWwsCiAgICBMLmxlID0gTC5sZXNzVGhhbk9yRXF1YWwsCiAgICBMLmdyZWF0ZXJUaGFuID0gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiB0aGlzLmNvbXAodCkgPiAwCiAgICB9CiAgICAsCiAgICBMLmd0ID0gTC5ncmVhdGVyVGhhbiwKICAgIEwuZ3JlYXRlclRoYW5PckVxdWFsID0gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiB0aGlzLmNvbXAodCkgPj0gMAogICAgfQogICAgLAogICAgTC5ndGUgPSBMLmdyZWF0ZXJUaGFuT3JFcXVhbCwKICAgIEwuZ2UgPSBMLmdyZWF0ZXJUaGFuT3JFcXVhbCwKICAgIEwuY29tcGFyZSA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICBpZiAobyh0KSB8fCAodCA9IHkodCkpLAogICAgICAgIHRoaXMuZXEodCkpCiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIHZhciBlID0gdGhpcy5pc05lZ2F0aXZlKCkKICAgICAgICAgICwgbiA9IHQuaXNOZWdhdGl2ZSgpOwogICAgICAgIHJld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AgICAgICBmKChfICY9IDY1NTM1KSA8PCAxNiB8ICh3ICY9IDY1NTM1KSwgKG0gJj0gNjU1MzUpIDw8IDE2IHwgKHYgJj0gNjU1MzUpLCB0aGlzLnVuc2lnbmVkKQogICAgfQogICAgLAogICAgTC5zdWJ0cmFjdCA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gbyh0KSB8fCAodCA9IHkodCkpLAogICAgICAgIHRoaXMuYWRkKHQubmVnKCkpCiAgICB9CiAgICAsCiAgICBMLnN1YiA9IEwuc3VidHJhY3QsCiAgICBMLm11bHRpcGx5ID0gZnVuY3Rpb24odCkgewogICAgICAgIGlmICh0aGlzLmlzWmVybygpKQogICAgICAgICAgICByZXR1cm4gQzsKICAgICAgICBpZiAobyh0KSB8fCAodCA9IHkodCkpLAogICAgICAgIG4pCiAgICAgICAgICAgIHJldHVybiBmKG4ubXVsKHRoaXMubG93LCB0aGlzLmhpZ2gsIHQubG93LCB0LmhpZ2gpLCBuLmdldF9oaWdoKCksIHRoaXMudW5zaWduZWQpOwogICAgICAgIGlmICh0LmlzWmVybygpKQogICAgICAgICAgICByZXR1cm4gQzsKICAgICAgICBpZiAodGhpcy5lcShJKSkKICAgICAgICAgICAgcmV0dXJuIHQuaXNPZGQoKSA/IEkgOiBDOwogICAgICAgIGlmICh0LmVxKEkpKQogICAgICAgICAgICByZXR1cm4gdGhpcy5pc09kZCgpID8gSSA6IEM7CiAgICAgICAgaWYgKHRoaXMuaXNOZWdhdGl2ZSgpKQogICAgICAgICAgICByZXR1cm4gdC5pc05lZ2F0aXZlKCkgPyB0aGlzLm5lZygpLm11bCh0Lm5lZygpKSA6IHRoaXMubmVnKCkubXVsKHQpLm5lZygpOwogICAgICAgIGlmICh0LmlzTmVnYXRpdmUoKSkKICAgICAgICAgICAgcmV0dXJuIHRoaXMubXVsKHQubmVnKCkpLm5lZygpOwogICAgICAgIGlmICh0aGlzLmx0KFMpICYmIHQubHQoUykpCiAgICAgICAgICAgIHJldHVybiBkKHRoaXMudG9OdW1iZXIoKSAqIHQudG9OdW1iZXIoKSwgdGhpcy51bnNpZ25lZCk7CiAgICAgICAgdmFyIGUgPSB0aGlzLmhpZ2ggPj4+IDE2CiAgICAgICAgICAsIHIgPSA2NTUzNSAmIHRoaXMuaGlnaAogICAgICAgICAgLCBsID0gdGhpcy5sb3cgPj4+IDE2CiAgICAgICAgICAsIGMgPSA2NTUzNSAmIHRoaXMubG93CiAgICAgICAgICAsIGggPSB0LmhpZ2ggPj4+IDE2CiAgICAgICAgICAsIG0gPSA2NTUzNSAmIHQuaGlnaAogICAgICAgICAgLCB2ID0gdC5sb3cgPj4+IDE2CiAgICAgICAgICAsIF8gPSA2NTUzNSAmIHQubG93CiAgICAgICAgICAsIHcgPSAwCiAgICAgICAgICAsIHggPSAwCiAgICAgICAgICAsIGsgPSAwCiAgICAgICAgICAsIE0gPSAwOwogICAgICAgIHJldHVybiBrICs9IChNICs9IGMgKiBfKSA+Pj4gMTYsCiAgICAgICAgeCArPSAoayArPSBsICogXykgPj4+IDE2LAogICAgICAgIGsgJj0gNjU1MzUsCiAgICAgICAgeCArPSAoayArPSBjICogdikgPj4+IDE2LAogICAgICAgIHcgKz0gKHggKz0gciAqIF8pID4+PiAxNiwKICAgICAgICB4ICY9IDY1NTM1LAogICAgICAgIHcgKz0gKHggKz0gbCAqIHYpID4+PiAxNiwKICAgICAgICB4ICY9IDY1NTM1LAogICAgICAgIHcgKz0gKHggKz0gYyAqIG0pID4+PiAxNiwKICAgICAgICB3ICs9IGUgKiBfICsgciAqIHYgKyBsICogbSArIGMgKiBoLAogICAgICAgIGYoKGsgJj0gNjU1MzUpIDw8IDE2IHwgKE0gJj0gNjU1MzUpLCAodyAmPSA2NTUzNSkgPDwgMTYgfCAoeCAmPSA2NTUzNSksIHRoaXMudW5zaWduZWQpCiAgICB9CiAgICAsCiAgICBMLm11bCA9IEwubXVsdGlwbHksCiAgICBMLmRpdmlkZSA9IGZ1bmN0aW9uKHQpIHsKICAgICAgICBpZiAobyh0KSB8fCAodCA9IHkodCkpLAogICAgICAgIHQuaXNaZXJvKCkpCiAgICAgICAgICAgIHRocm93IEVycm9yKCJkaXZpc2lvbiBieSB6ZXJvIik7CiAgICAgICAgdmFyIGUsIHIsIGw7CiAgICAgICAgaWYgKG4pCiAgICAgICAgICAgIHJldHVybiB0aGlzLnVuc2lnbmVkIHx8IC0yMTQ3NDgzNjQ4ICE9PSB0aGlzLmhpZ2ggfHwgLTEgIT09IHQubG93IHx8IC0xICE9PSB0LmhpZ2ggPyBmKCh0aGlzLnVuc2lnbmVkID8gbi5kaXZfdSA6IG4uZGl2X3MpKHRoaXMubG93LCB0aGlzLmhpZ2gsIHQubG93LCB0LmhpZ2gpLCBuLmdldF9oaWdoKCksIHRoaXMudW5zaWduZWQpIDogdGhpczsKICAgICAgICBpZiAodGhpcy5pc1plcm8oKSkKICAgICAgICAgICAgcmV0dXJuIHRoaXMudW5zaWduZWQgPyBrIDogQzsKICAgICAgICBpZiAodGhpcy51bnNpZ25lZCkgewogICAgICAgICAgICBpZiAodC51bnNpZ25lZCB8fCAodCA9IHQudG9VbnNpZ25lZCgpKSwKICAgICAgICAgICAgdC5ndCh0aGlzKSkKICAgICAgICAgICAgICAgIHJldHVybiBrOwogICAgICAgICAgICBpZiAodC5ndCh0aGlzLnNocnUoMSkpKQogICAgICAgICAgICAgICAgcmV0dXJuIEU7CiAgICAgICAgICAgIGwgPSBrCiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKHRoaXMuZXEoSSkpCiAgICAgICAgICAgICAgICByZXR1cm4gdC5lcShNKSB8fCB0LmVxKFQpID8gSSA6IHQuZXEoSSkgPyBNIDogKGUgPSB0aGlzLnNocigxKS5kaXYodCkuc2hsKDEpKS5lcShDKSA/IHQuaXNOZWdhdGl2ZSgpID8gTSA6IFQgOiAociA9IHRoaXMuc3ViKHQubXVsKGUpKSwKICAgICAgICAgICAgICAgIGwgPSBlLmFkZChyLmRpdih0KSkpOwogICAgICAgICAgICBpZiAodC5lcShJKSkKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnVuc2lnbmVkID8gayA6IEM7CiAgICAgICAgICAgIGlmICh0aGlzLmlzTmVnYXRpdmUoKSkKICAgICAgICAgICAgICAgIHJldHVybiB0LmlzTmVnYXRpdmUoKSA/IHRoaXMubmVnKCkuZGl2KHQubmVnKCkpIDogdGhpcy5uZWcoKS5kaXYodCkubmVnKCk7CiAgICAgICAgICAgIGlmICh0LmlzTmVnYXRpdmUoKSkKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRpdih0Lm5lZygpKS5uZWcoKTsKICAgICAgICAgICAgbCA9IEMKICAgICAgICB9CiAgICAgICAgZm9yIChyID0gdGhpczsgci5ndGUodCk7ICkgewogICAgICAgICAgICBlID0gTWF0aC5tYXgoMSwgTWF0aC5mbG9vcihyLnRvTnVtYmVyKCkgLyB0LnRvTnVtYmVyKCkpKTsKICAgICAgICAgICAgZm9yICh2YXIgYyA9IE1hdGguY2VpbChNYXRoLmxvZyhlKSAvIE1hdGguTE4yKSwgaCA9IGMgPD0gNDggPyAxIDogbSgyLCBjIC0gNDgpLCB2ID0gZChlKSwgXyA9IHYubXVsKHQpOyBfLmlzTmVnYXRpdmUoKSB8fCBfLmd0KHIpOyApCiAgICAgICAgICAgICAgICBfID0gKHYgPSBkKGUgLT0gaCwgdGhpcy51bnNpZ25lZCkpLm11bCh0KTsKICAgICAgICAgICAgdi5pc1plcm8oKSAmJiAodiA9IE0pLAogICAgICAgICAgICBsID0gbC5hZGQodiksCiAgICAgICAgICAgIHIgPSByLnN1YihfKQogICAgICAgIH0KICAgICAgICByZXR1cm4gbAogICAgfQogICAgLAogICAgTC5kaXYgPSBMLmRpdmlkZSwKICAgIEwubW9kdWxvID0gZnVuY3Rpb24odCkgewogICAgICAgIHJldHVybiBvKHQpIHx8ICh0ID0geSh0KSksCiAgICAgICAgbiA/IGYoKHRoaXMudW5zaWduZWQgPyBuLnJlbV91IDogbi5y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KSkKICAgIH0oKytuKTsKICAgIHZhciBoLCB2LCB5LCBtLCB4LCBfLCB3LCBDLCBTLCBNLCBPLCBXLCBrLCBQLCBWLCBSLCBFLCBqLCBELCBGLCBBLCAkLCBULCBJLCBIID0gZnVuY3Rpb24gZSh0LCBuKSB7CiAgICAgICAgdmFyIHIsIG8gPSBmW3QgLT0gMF07CiAgICAgICAgaWYgKHZvaWQgMCA9PT0gZS5MWExCd08pIHsKICAgICAgICAgICAgKHIgPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHZhciBlID0gdm9pZCAwOwogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBlID0gRnVuY3Rpb24oJ3JldHVybiAoZnVuY3Rpb24oKSB7fS5jb25zdHJ1Y3RvcigicmV0dXJuIHRoaXMiKSggKSk7JykoKQogICAgICAgICAgICAgICAgfSBjYXRjaCAodCkgewogICAgICAgICAgICAgICAgICAgIGUgPSB3aW5kb3cKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBlCiAgICAgICAgICAgIH0oKSkuYXRvYiB8fCAoci5hdG9iID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICAgICAgZm9yICh2YXIgdCwgbiwgciA9IFN0cmluZyhlKS5yZXBsYWNlKC89KyQvLCAiIiksIG8gPSAiIiwgbCA9IDAsIGMgPSAwOyBuID0gci5jaGFyQXQoYysrKTsgfm4gJiYgKHQgPSBsICUgNCA/IDY0ICogdCArIG4gOiBuLAogICAgICAgICAgICAgICAgbCsrICUgNCkgPyBvICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoMjU1ICYgdCA+PiAoLTIgKiBsICYgNikpIDogMCkKICAgICAgICAgICAgICAgICAgICBuID0gIkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky89Ii5pbmRleE9mKG4pOwogICAgICAgICAgICAgICAgcmV0dXJuIG8KICAgICAgICAgICAgfQogICAgICAgICAgICApOwogICAgICAgICAgICBlLndnU3dTZSA9IGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICAgICAgICAgIGZvciAodmFyIG4gPSBbXSwgciA9IDAsIG8gPSB2b2lkIDAsIGwgPSAiIiwgYyA9ICIiLCBmID0gMCwgZCA9IChlID0gYXRvYihlKSkubGVuZ3RoOyBmIDwgZDsgZisrKQogICAgICAgICAgICAgICAgICAgIGMgKz0gIiUiICsgKCIwMCIgKyBlLmNoYXJDb2RlQXQoZikudG9TdHJpbmcoMTYpKS5zbGljZSgtMik7CiAgICAgICAgICAgICAgICBlID0gZGVjb2RlVVJJQ29tcG9uZW50KGMpOwogICAgICAgICAgICAgICAgdmFyIGggPSB2b2lkIDA7CiAgICAgICAgICAgICAgICBmb3IgKGggPSAwOyBoIDwgMjU2OyBoKyspCiAgICAgICAgICAgICAgICAgICAgbltoXSA9IGg7CiAgICAgICAgICAgICAgICBmb3IgKGggPSAwOyBoIDwgMjU2OyBoKyspCiAgICAgICAgICAgICAgICAgICAgciA9IChyICsgbltoXSArIHQuY2hhckNvZGVBdChoICUgdC5sZW5ndGgpKSAlIDI1NiwKICAgICAgICAgICAgICAgICAgICBvID0gbltoXSwKICAgICAgICAgICAgICAgICAgICBuW2hdID0gbltyXSwKICAgICAgICAgICAgICAgICAgICBuW3JdID0gbzsKICAgICAgICAgICAgICAgIGggPSAwLAogICAgICAgICAgICAgICAgciA9IDA7CiAgICAgICAgICAgICAgICBmb3IgKHZhciB2ID0gMDsgdiA8IGUubGVuZ3RoOyB2KyspCiAgICAgICAgICAgICAgICAgICAgciA9IChyICsgbltoID0gKGggKyAxKSAlIDI1Nl0pICUgMjU2LAogICAgICAgICAgICAgICAgICAgIG8gPSBuW2hdLAogICAgICAgICAgICAgICAgICAgIG5baF0gPSBuW3JdLAogICAgICAgICAgICAgICAgICAgIG5bcl0gPSBvLAogICAgICAgICAgICAgICAgICAgIGwgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShlLmNoYXJDb2RlQXQodikgXiBuWyhuW2hdICsgbltyXSkgJSAyNTZdKTsKICAgICAgICAgICAgICAgIHJldHVybiBsCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLAogICAgICAgICAgICBlLm9pWkRSWCA9IHt9LAogICAgICAgICAgICBlLkxYTEJ3TyA9ICEwCiAgICAgICAgfQogICAgICAgIHZhciBsID0gZS5vaVpEUlhbdF07CiAgICAgICAgcmV0dXJuIHZvaWQgMCA9PT0gbCA/ICh2b2lkIDAgPT09IGUucEdmS0dxICYmIChlLnBHZktHcSA9ICEwKSwKICAgICAgICBvID0gZS53Z1N3U2UobywgbiksCiAgICAgICAgZS5vaVpEUlhbdF0gPSBvKSA6IG8gPSBsLAogICAgICAgIG8KICAgIH0sIEsgPSBlW0goIjB4MjkiLCAiM01NeCIpICsgSCgiMHg2NyIsICJdaFZBIildW0goIjB4NWEiLCAiUGgxWSIpXSA9PT0gSCgiMHgzOSIsICJ3WGE5IiksIEwgPSBLID8gIldZYnEwTiIgKyBIKCIweDIwIiwgInVwQCEiKSArIEgoIjB4NTAiLCAiR0VocCIpICsgSCgiMHg2NiIsICJ2b2V0IikgKyBIKCIweDVlIiwgInVwQCEiKSArIEgoIjB4NmEiLCAiJkpAWCIpICsgSCgiMHg1MSIsICIyd1sxIikgKyBIKCIweDVkIiwgImgyIXQiKSArICJOSnRRQyIgOiBIKCIweDkiLCAieGFUbyIpICsgSCgiMHhiIiwgIndYYTkiKSArIEgoIjB4M2QiLCAieGFUbyIpICsgSCgiMHg1YyIsICJ1cEAhIikgKyBIKCIweDQiLCAiIyNSdSIpICsgSCgiMHg0NyIsICJ3WGE5IikgKyAiaDUmIiArIEgoIjB4MzMiLCAiVWdoNSIpICsgSCgiMHgyMyIsICIzSEs0IikgKyBIKCIweDU4IiwgImdJIXUiKSArICIjViIsIEcgPSBLID8gInhYMXNnSiIgKyBIKCIweDY0IiwgIikzYkQiKSArICJ2OWJRT2UiICsg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Jwcm8iLAogICAgImltZ1VybCI6ICJodHRwczovL2ltYWdlLmNuaG5iLmNvbS8iLAogICAgInBpZ3N5IjogImh0dHBzOi8vcGNhcGkuY25obmIuY29tIiwKICAgICJwbGF0Zm9ybSI6ICJwYyIsCiAgICAiQXBwSUQiOiA0LAogICAgInpzdCI6ICJodHRwczovL3pzdC5jbmhuYi5jb20iLAogICAgIiRkZWZhdWx0Q29uZmlnIjogewogICAgICAgICJodHRwQ29uZmlnIjogewogICAgICAgICAgICAibWV0aG9kIjogIlBPU1QiLAogICAgICAgICAgICAiaXNUb2FzdEVycm9yIjogdHJ1ZSwKICAgICAgICAgICAgImhlYWRlcnMiOiB7CiAgICAgICAgICAgICAgICAib3NUeXBlIjogIndhcCIsCiAgICAgICAgICAgICAgICAiY29udGVudC10eXBlIjogImFwcGxpY2F0aW9uL2pzb24iCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9Cn0KCi8vIOajgOa1i+acjeWKoeaYr+WQpuW3suaJk+W8gAphcHAuZ2V0KCcvJywgKHJlcSwgcmVzKSA9PiB7CiAgICAvLyAxM+S9jeaXtumXtOaIswogICAgVElNRSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpCiAgICAvLyDnlJ/miJDor7fmsYLlpLTkv6Hmga8KICAgIGhlYWQgPSB7CiAgICAgICAgIlgtQ0xJRU5ULUFQUElEIjogJzQnLAogICAgICAgICJYLUIzLVRSQUNFSUQiOiBYX0IzX1RSQUNFSUQoVElNRSksCiAgICAgICAgIlgtQ0xJRU5ULVRJTUUiOiBUSU1FLAogICAgICAgICJYLUNMSUVOVC1QQUdFIjogIiIsCiAgICAgICAgIlgtSE4tSk9CIjogIklmIHlvdSBzZWUgdGhlc2UgbWVzc2FnZSwgSSBob3BlIHlvdSBkb250IGhhY2sgdXMsIEkgaG9wZSB5b3UgY2FuIGpvaW4gdXMhIFBsZWFzZSB2aXNpdCBodHRwczovL3d3dy5jbmhua2ouY29tL2pvYi5odG1sIiwKICAgICAgICAiWC1DTElFTlQtTk9OQ0UiOiBYX0NMSUVOVF9OT05DRSgpLAogICAgICAgICJYLUNMSUVOVC1FTlZJUk9OTUVOVCI6ICJwcm8iLAogICAgICAgICJYLUNMSUVOVC1JRCI6IFhfQ0xJRU5UX0lEKCksCiAgICAgICAgIlgtQ0xJRU5ULVNJRCI6IFhfQ0xJRU5UX1NJRCgpCiAgICB9CiAgICBkYXRhanNvbiA9IHsKICAgICAgICAuLi5oZWFkLAogICAgICAgICdYLUNMSUVOVC1TSUdOJzpTSUdOKGUsaGVhZCkgICAgLy8g55Sf5oiQ562+5ZCNIHNpZ24KICAgIH0KICAgIGNvbnNvbGUubG9nKCfnlJ/miJDnu5PmnpwgLT4nLGRhdGFqc29uKQogICAgcmVzLnN0YXR1cygyMDApLmpzb24oZGF0YWpzb24pOwp9KTsKCgoKYXBwLmxpc3Rlbig0MDAwLCAoKSA9PiB7CiAgICBjb25zb2xlLmxvZygnTm9kZS5qcyDmnI3liqHnm5HlkKznq6/lj6MgMTI3LjAuMC4xOjQwMDAnKTsKfSk7

【关键字提取.py】请用Base64解密

aW1wb3J0IGpzb24KaW1wb3J0IHJlcXVlc3RzCgpjbGFzcyBjbmhuYjoKICAgIGRlZiBfX2luaXRfXyhzZWxmKToKICAgICAgICAjIOiOt+WPliBoZWFkZXJzIHRva2Vu5Luk54mMCiAgICAgICAgc2VsZi5oZWFkZXJzX3Rva2VuX2RhdGEgPSBzZWxmLmhlYWRlcnNfdG9rZW4oKQogICAgICAgIHNlbGYucmVzcG9uc2VfZGF0YSgpCgogICAgIyDojrflj5YgaGVhZGVycyB0b2tlbuS7pOeJjAogICAgZGVmIGhlYWRlcnNfdG9rZW4oc2VsZikgLT4gZGljdDoKICAgICAgICAjIOivt+axguacrOWcsOeahGpz5o6l5Y+jCiAgICAgICAgaGVhZGVyc190b2tlbl9kYXRhID0gcmVxdWVzdHMuZ2V0KCJodHRwOi8vMTI3LjAuMC4xOjQwMDAvIikuanNvbigpCiAgICAgICAgcHJpbnQoJ2hlYWRlcnMgdG9rZW7ku6TniYznlJ/miJDnu5PmnpzvvJonLCBoZWFkZXJzX3Rva2VuX2RhdGEpCiAgICAgICAgcmV0dXJuIGhlYWRlcnNfdG9rZW5fZGF0YQoKICAgICMg6K+35rGC5pWw5o2uCiAgICBkZWYgcmVzcG9uc2VfZGF0YShzZWxmKToKICAgICAgICAjIOazqOaEj++8muS4gOWumuimgeazqOaEjyBoZWFkZXJzIOmHjOeahOmUrueahOWkp+Wwj+WGme+8jOWmguaenOWkp+Wwj+WGmeaciemXrumimO+8jOS5n+S8muWvvOiHtOivt+axguWHuueOsOmUmeivr++8jOW7uuiuruS9v+eUqOaKk+WMhei9r+S7tui/m+ihjOaPkOWPlu+8jOaIluebtOaOpeS9v+eUqOaIkeWGmeWlveeahCBoZWFkZXJzCiAgICAgICAgaGVhZGVycyA9IHsKICAgICAgICAgICAgIkNvbm5lY3Rpb24iOiAia2VlcC1hbGl2ZSIsCiAgICAgICAgICAgICJDb250ZW50LUxlbmd0aCI6ICIxNSIsCiAgICAgICAgICAgICJQcmFnbWEiOiAibm8tY2FjaGUiLAogICAgICAgICAgICAiQ2FjaGUtQ29udHJvbCI6ICJuby1jYWNoZSIsCiAgICAgICAgICAgICJzZWMtY2gtdWEtcGxhdGZvcm0iOiAiXCJXaW5kb3dzXCIiLAogICAgICAgICAgICAic2VjLWNoLXVhIjogJyJDaHJvbWl1bSI7dj0iMTMwIiwgIkJyYXZlIjt2PSIxMzAiLCAiTm90P0FfQnJhbmQiO3Y9Ijk5IicsCiAgICAgICAgICAgICJzZWMtY2gtdWEtbW9iaWxlIjogIj8wIiwKICAgICAgICAgICAgIkFjY2VwdCI6ICJhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLyoiLAogICAgICAgICAgICAiWC1DTElFTlQtQVBQSUQiOiAiNCIsCiAgICAgICAgICAgICJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24vanNvbiIsCiAgICAgICAgICAgIC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hue9keermSBjdXJsIHRvIFB5dGhvbiDlgZrlh7rpmLLmiqTvvIjlpJrms6jmhI/kuIDkuIvljbPlj6/vvInjgIIKICAgICAgICB9CgogICAgICAgIHVybCA9ICJodHRwczovL3BjYXBpLmNuaG5iLmNvbS9lc2VhcmNoLXBjL2FwaS90cmFuc2Zvcm0vc3VwcGx5L2xpc3QiCiAgICAgICAgZGF0YSA9IHsKICAgICAgICAgICAgInNvcnRPcmRlciI6ICJkZXNjIiwKICAgICAgICAgICAgInBhZ2VOdW1iZXIiOiAyLCAgIyDnrKzlh6DpobUKICAgICAgICAgICAgInBhZ2VTaXplIjogMTAwLCAgIyDmr4/pobXojrflj5blpJrlsJHmnaHmlbDmja4g5a6Y572R6buY6K6kMjAKICAgICAgICAgICAgImtleXdvcmQiOiAi6Iu55p6cIiAgIyDlhbPplK7lrZcKICAgICAgICB9CgogICAgICAgIGRhdGEgPSBqc29uLmR1bXBzKGRhdGEsIHNlcGFyYXRvcnM9KCcsJywgJzonKSkKICAgICAgICByZXNwb25zZSA9IHJlcXVlc3RzLnBvc3QodXJsLCBoZWFkZXJzPWhlYWRlcnMsIGRhdGE9ZGF0YSkKCiAgICAgICAgcHJpbnQocmVzcG9uc2UudGV4dCkKICAgICAgICBwcmludChyZXNwb25zZSkKCmNuaG5iKCkKCg==

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/961310.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

[论文阅读] (37)CCS21 DeepAID:基于深度学习的异常检测(解释)

祝大家新春快乐,蛇年吉祥! 《娜璋带你读论文》系列主要是督促自己阅读优秀论文及听取学术讲座,并分享给大家,希望您喜欢。由于作者的英文水平和学术能力不高,需要不断提升,所以还请大家批评指正&#xff0…

使用Avalonia UI实现DataGrid

1.Avalonia中的DataGrid的使用 DataGrid 是客户端 UI 中一个非常重要的控件。在 Avalonia 中,DataGrid 是一个独立的包 Avalonia.Controls.DataGrid,因此需要单独通过 NuGet 安装。接下来,将介绍如何安装和使用 DataGrid 控件。 2.安装 Dat…

DeepSeek-R1:开源Top推理模型的实现细节、使用与复现

核心观点 ● 直接用强化学习就可以让模型获得显著的推理能力,说明并不一定需要SFT才行。 ● 强化学习并不一定需要复杂的奖励模型,使用简单的规则反而取得意想不到的效果。 ● 通过知识蒸馏让小模型一定程度上也有推理能力,甚至在某些场景下…

Linux 阻塞IO

Linux 阻塞IO 阻塞IO是最常见的IO,我们使用的 scanf()、cin 等都是阻塞IO。

Ubuntu 安装 QGIS LTR 3.34

QGIS官方提供了安装指南:https://qgis.org/resources/installation-guide/#linux。大多数linux发行版将QGIS拆分为几个包:qgis、qgis-python、qgis-grass、qgis-plugin-grass、qgis-server,有的包最初安装时被跳过,可以在需要使用…

Spring Boot - 数据库集成05 - 集成MongoDB

Spring Boot集成MongoDB 文章目录 Spring Boot集成MongoDB一:使用前的准备1:依赖导入 & 配置2:实体类创建 二:核心 - MongoRepository三:核心 - MongoTemplate1:集合操作2:文档操作(重点)3&…

SpringCloud系列教程:微服务的未来(十八)雪崩问题、服务保护方案、Sentinel快速入门

前言 在分布式系统中,雪崩效应(Avalanche Effect)是一种常见的故障现象,通常发生在系统中某个组件出现故障时,导致其他组件级联失败,最终引发整个系统的崩溃。为了有效应对雪崩效应,服务保护方…

Golang Gin系列-7:认证和授权

在本章中,我们将探讨Gin框架中身份验证和授权的基本方面。这包括实现基本的和基于令牌的身份验证,使用基于角色的访问控制,应用中间件进行授权,以及使用HTTPS和漏洞防护保护应用程序。 实现身份认证 Basic 认证 Basic 认证是内置…

C++ 中用于控制输出格式的操纵符——setw 、setfill、setprecision、fixed

目录 四种操纵符简要介绍 setprecision基本用法 setfill的基本用法 fixed的基本用法 setw基本用法 以下是一些常见的用法和示例: 1. 设置字段宽度和填充字符 2. 设置字段宽度和对齐方式 3. 设置字段宽度和精度 4. 设置字段宽度和填充字符,结合…

06_改善播放效果--优先级与阻塞

一、声明 本文章的程序是基于05篇的程序改善的,所以CubeMx的配置看05篇的就好 且此篇文章由于红外遥控暂时未使用,还不知其是否能成功显示现象 二、keil5代码 这个优先级要1,但是如果只是这个优先级1的话,那么我的LED灯闪烁的任务…

【Rust自学】16.3. 共享状态的并发

喜欢的话别忘了点赞、收藏加关注哦(加关注即可阅读全文),对接下来的教程有兴趣的可以关注专栏。谢谢喵!(・ω・) 16.3.1. 使用共享来实现并发 还记得Go语言有一句名言是这么说的:Do not commun…

项目集成Nacos

文章目录 1.环境搭建1.创建模块 sunrays-common-cloud-nacos-starter2.目录结构3.pom.xml4.自动配置1.NacosAutoConfiguration.java2.spring.factories 5.引入cloud模块通用依赖 2.测试1.创建模块 sunrays-common-cloud-nacos-starter-demo2.目录结构3.pom.xml4.application.ym…

计算机网络 (59)无线个人区域网WPAN

前言 无线个人区域网(WPAN,Wireless Personal Area Network)是一种以个人为中心,采用无线连接方式的个人局域网。 一、定义与特点 定义:WPAN是以个人为中心,实现活动半径小、业务类型丰富、面向特定群体的无…

Python 之 Excel 表格常用操作

示例文件 test.xlsx 将各个表单拆分成单独的 Excel 文件 import os.pathimport openpyxl import pandasdef handle_excel(file_path):dirname os.path.dirname(file_path)basename os.path.basename(file_path).split(".")[0]wb openpyxl.load_workbook(file_pat…

01学习预热篇(D6_正式踏入JVM深入学习前的铺垫)

目录 学习前言 一、虚拟机的结构 1. Java虚拟机参数设置 2. java 堆 3. 出入栈 4. 局部变量表 1> 局部变量的剖析 2> 局部变量的回收 5. 操作数栈 1> 常量入栈指令 2> 局部变量值转载到栈中指令 3> 将栈顶值保存到局部变量中指令 6. 帧数据区 7. 栈…

知识库建设对提升团队协作与创新能力的影响分析

内容概要 在当今快速变革的商业环境中,知识库建设的重要性愈发凸显。它不仅是信息存储的载体,更是推动组织内部沟通与协作的基石。通过系统整理与管理企业知识,团队成员能够便捷地访问相关信息,使得协作过程更为流畅,…

C语言字符串详解

1. C语言中的字符串基础 C语言中的字符串是程序设计中不可忽视的部分。与现代高级编程语言不同,C语言对字符串的处理方式直接、灵活,并且强大。在C语言中,字符串并不是一种特殊的数据类型,而是字符数组的一种表现形式。字符串通常…

神经网络的通俗介绍

人工神经网络,是一种模仿人类大脑工作原理的数学模型。人类的大脑是由无数的小“工作站”组成的,每个工作站叫做“神经元”。这些神经元通过“电线”互相连接,负责接收、处理和传递信息。 一、人类大脑神经网络 人类大脑的神经网络大概长这…

SpringBoot中Excel表的导入、导出功能的实现

文章目录 一、easyExcel简介二、Excel表的导出2.1 添加 Maven 依赖2.2 创建导出数据的实体类4. 编写导出接口5. 前端代码6. 实现效果 三、excel表的导出1. Excel表导入的整体流程1.1 配置文件存储路径 2. 前端实现2.1 文件上传组件 2.2 文件上传逻辑3. 后端实现3.1 文件上传接口…

vim交换文件的工作原理

在vim中,交换文件是一个临时文件,当我们使用vim打开一个文件进行编辑(一定得是做出了修改才会产生交换文件)时候,vim就会自动创建一个交换文件,而之后我们对于文件的一系列修改都是在交换文件中进行的&…