├── README.md ├── package.json ├── .gitignore └── sdk-glue.js /README.md: -------------------------------------------------------------------------------- 1 | # 字节系 a_bogus 参数获取 2 | 3 | 相关视频:[最新字节系a_bogus参数加密逆向与补环境](https://www.youtube.com/watch?v=xvBiODOYliA) 4 | 5 | get_a_bogus_dy.js 文件为视频作者源码,其中配置的为抖音参数; 6 | get_a_bogus_tt.js 文件为个人修改后的,用于获取头条不同频道请求的a_bogus参数; 7 | 通过 node 运行文件; 8 | 9 | bdms.js 与 sdk-glue.js 为字节网站源码; 10 | 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "a_bogus", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "bdms.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "jsdom": "^24.0.0", 13 | "xmlhttprequest": "^1.8.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /sdk-glue.js: -------------------------------------------------------------------------------- 1 | /* V 1.0.0.55 */ 2 | var U6I7dQDnPIbkh=!0;if(window._SdkGlueInit)try{U6I7dQDnPIbkh=function(t){for(var e="1.0.0.55".split(".").map((function(t){return~~t})),r=t.split(".").map((function(t){return~~t})),n=0;n<4;){if(e[n]!==r[n])return e[n]-r[n]>0;n++}return!1}(window._sdkGlueVersionMap&&window._sdkGlueVersionMap.sdkGlueVersion||"0")}catch(t){}U6I7dQDnPIbkh&&function(){var t={3607:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLoadErrorBlockType=function(){if((255&o.globalVar.loadErrorReason0b)>0)return o.globalVar.loadErrorReason0b;return n.NoBlock},e.getLoadingBlockType=function(t,e){try{var r=new URL(e,window.location.href),a=r.hostname,s=r.pathname,u=n.NoBlock;return"Loading"===o.loadMap.csrf.loadedStatus&&function(t,e,r){var n,i=c(o.loadMap.csrf.optionsList);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(b(a)){if(m(a.allow||{},t,e,r))return!1;if(g(a.protect||{},t,e,r))return!0}else if(g(a,t,e,r))return!0}}catch(t){i.e(t)}finally{i.f()}return!1}(t,a,s)&&(u|=n.CSRFBlock),"Loading"===o.loadMap.bdms.loadedStatus&&function(t){return w(t,o.loadMap.bdms.optionsList.map((function(t){return t.paths})))}(s)&&(u|=n.BdmsBlock),"Loading"===o.loadMap.verifyCenter.loadedStatus&&function(t){return w(t,o.loadMap.verifyCenter.optionsList.map((function(t){return t.interceptPathList})))}(s)&&(u|=n.VerifyCenterBlock),u}catch(t){return(0,i.jsErrorReport)(t),n.NoBlock}},e.isBdmsOrVerifyCenterMatchPath=function(t){var e=[].concat(s(o.loadMap.verifyCenter.optionsList.map((function(t){return t.interceptPathList}))),s(o.loadMap.bdms.optionsList.map((function(t){return t.paths}))));return w(t,e)};var n=r(360),o=r(619),i=r(1658);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function u(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?e-1:0),n=1;n0){var n=r.indexOf(e);n>-1&&r.splice(n,1)}}}],r&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4231:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExportsMap=void 0;var n=r(360);e.defaultExportsMap={csrf:{srcList:["https://lf1-cdn-tos.bytegoofy.com/obj/goofy/secsdk/secsdk-lastest.umd.js","https://lf3-cdn-tos.bytegoofy.com/obj/goofy/secsdk/secsdk-lastest.umd.js","https://lf6-cdn-tos.bytegoofy.com/obj/goofy/secsdk/secsdk-lastest.umd.js"],init:function(t){window.secsdk.csrf.setOptions(t)},isLoaded:function(){return!!window.secsdk},sync:!1,cross:!1},bdms:{srcList:["https://lf-headquarters-speed.yhgfb-cn-static.com/obj/rc-client-security/web/stable/".concat(n.bdmsVersion,"/bdms.js"),"https://lf-c-flwb.bytetos.com/obj/rc-client-security/web/stable/".concat(n.bdmsVersion,"/bdms.js")],init:function(t){return window.bdms.init(t)},isLoaded:function(){return!!window.bdms},sync:!1,cross:!1},verifyCenter:{init:function(t){window.TTGCaptcha.init(t)},isLoaded:function(){return!!window.TTGCaptcha},srcList:["https://lf-rc1.yhgfb-cn-static.com/obj/rc-verifycenter/sec_sdk_build/".concat(n.captchaVersion,"/captcha/index.js"),"https://lf-rc2.yhgfb-cn-static.com/obj/rc-verifycenter/sec_sdk_build/".concat(n.captchaVersion,"/captcha/index.js")],sync:!1,cross:!1}}},619:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadMap=e.globalVar=void 0;e.globalVar={loadErrorReason0b:0},e.loadMap={bdms:{loadedStatus:"Uninitialized",optionsList:[]},csrf:{loadedStatus:"Uninitialized",optionsList:[]},verifyCenter:{loadedStatus:"Uninitialized",optionsList:[]}}},970:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.blockFetch=function(){var t=[];if("function"==typeof window.fetch){var e=window.fetch;window.fetch=function(){for(var r=arguments.length,i=new Array(r),a=0;at.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<\/script>")):document.write("