找到
7
篇与
python
相关的结果
-
fastapi空白文档解决方法 重写文档渲染 @app.get(settings.DOCS_URL, include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html( openapi_url=app.openapi_url, title=app.title + " - Swagger UI", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url, swagger_js_url="https://cdn.bootcdn.net/ajax/libs/swagger-ui/4.10.3/swagger-ui-bundle.js", swagger_css_url="https://cdn.bootcdn.net/ajax/libs/swagger-ui/4.10.3/swagger-ui.css", )
-
pip国内常用源 一. 国内常用源 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 豆瓣:http://pypi.douban.com/simple/ 官方源 https://pypi.org/simple二. pip配置 pip config set global.index-url 源镜像 pip config set global.index-url https://pypi.douban.com/simple/三. pip更新包 pip install --upgrade 包名四. pdm全局配置 pdm config -g pypi.url https://pypi.tuna.tsinghua.edu.cn/simple ## 配置__package__结构 pdm config python.use_venv false
-
js常用hook 无限debugger Function.prototype.__constructor_back = Function.prototype.constructor; Function.prototype.constructor = function() { if(arguments && typeof arguments[0]==='string'){ if("debugger" === arguments[0]){ return } } return Function.prototype.__constructor_back.apply(this,arguments); }方法一 (()=>{ Function.prototype.__constructor = Function.prototype.constructor; Function.prototype.constructor = function(){ if(arguments && typeof arguments[0]==='string'){ if("debugger"===arguments[0]){ return } return Function.prototype.__constructor.apply(this,arguments); } } })()方法二 Function.prototype.constructor_ = Function.prototype.constructor; Function.prototype.constructor = function (a) { if(a == "debugger") { return function (){}; } return Function.prototype.constructor_(a); };方法三 setInterval_new=setInterval setInterval=function(a,b){ if(a.indexOf("debugger")==-1){ return setInterval_new(a,b) } }方法四 Function.prototype.constructor = function(){} eval_bc = eval eval =function(a){ if (a===='debugger;a=asdasdasdas') return eval_bc(a) }eval (function() { if (window.__cr_eval) return window.__cr_eval = window.eval var myeval = function (src) { console.log("================ eval begin: length=" + src.length + ",caller=" + (myeval.caller && myeval.caller.name) + " ===============") console.log(src); console.log("================ eval end ================") return {} return window.__cr_eval(src) } var _myeval = myeval.bind(null) // 注意:这句和下一句就是小花招本招了! _myeval.toString = window.__cr_eval.toString Object.defineProperty(window, 'eval', { value: _myeval }) console.log(">>>>>>>>>>>>>> eval injected: " + document.location + " <<<<<<<<<<<<<<<<<<<") })(); Cookie (function(){ var cookie_cache = document.cookie; Object.defineProperty(document,'cookie',{ get:function(){ console.log('Get cookie'); debugger return cookie_cache; }, set:function(val){ console.log('Set cookie',val); debugger var cookie=val.split(";")[0]; var ncookie=cookie.split("="); var flag = false; var cache=cookie_cache.split("; "); cache = cache.map(function(a){ if (a.split("=")[0]===ncookie[0]){ flag=true; return cookie; } return a; }) cookie_cache=cache.join("; "); if (!flag){ cookie_cache+=cookie+"; "; } this._value=val; return cookie_cache; }, }); })();(function(){ 'use strict' Object.defineProperty(document, 'cookie', { get: function() { //debugger; return ""; }, set: function(value) { debugger; return value; }, }); })()(function() { // 严谨模式 检查所有错误 'use strict'; // document 为要hook的对象 这里是hook的cookie var cookieTemp = ""; Object.defineProperty(document, 'cookie', { // hook set方法也就是赋值的方法 set: function(val) { // 这样就可以快速给下面这个代码行下断点 // 从而快速定位设置cookie的代码 console.log('Hook捕获到cookie设置->', val); debugger; cookieTemp = val; return val; }, // hook get 方法也就是取值的方法 get: function() { return cookieTemp; } }); })();