-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathcloudflare.py
More file actions
338 lines (322 loc) · 33.4 KB
/
cloudflare.py
File metadata and controls
338 lines (322 loc) · 33.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
import tls_client
import re
import json
import subprocess
from datetime import datetime
class Cloudflare:
def __init__(self, client: tls_client.Session, useragent: str):
self.client = client
self.useragent = useragent
self.s, self.key = self._get_values()
self.base_data = {
'0': ['length', 'innerWidth', 'innerHeight', 'scrollX', 'pageXOffset', 'scrollY', 'pageYOffset', 'screenX', 'screenY', 'screenLeft', 'screenTop', 'TEMPORARY', 'n.maxTouchPoints'],
'1': ['PERSISTENT', 'd.childElementCount', 'd.ELEMENT_NODE', 'd.DOCUMENT_POSITION_DISCONNECTED'],
'2': ['d.ATTRIBUTE_NODE', 'd.DOCUMENT_POSITION_PRECEDING'],
'3': ['d.TEXT_NODE'],
'4': ['d.CDATA_SECTION_NODE', 'd.DOCUMENT_POSITION_FOLLOWING'],
'5': ['d.ENTITY_REFERENCE_NODE'],
'6': ['d.ENTITY_NODE'],
'7': ['d.PROCESSING_INSTRUCTION_NODE'],
'8': ['n.deviceMemory', 'd.COMMENT_NODE', 'd.DOCUMENT_POSITION_CONTAINS'],
'9': ['d.nodeType', 'd.DOCUMENT_NODE'],
'10': ['d.DOCUMENT_TYPE_NODE'],
'11': ['d.DOCUMENT_FRAGMENT_NODE'],
'12': ['n.hardwareConcurrency', 'd.NOTATION_NODE'],
'16': ['d.DOCUMENT_POSITION_CONTAINED_BY'],
'32': ['d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC'],
'1032': ['outerHeight'],
'1920': ['outerWidth'],
'o': ['window', 'self', 'document', 'location', 'customElements', 'history', 'navigation', 'locationbar', 'menubar',
'personalbar', 'scrollbars', 'statusbar', 'toolbar', 'frames', 'top', 'parent', 'frameElement', 'navigator',
'external', 'screen', 'visualViewport', 'clientInformation', 'styleMedia', 'trustedTypes', 'performance',
'crypto', 'indexedDB', 'sessionStorage', 'localStorage', 'scheduler', 'chrome', 'caches', 'cookieStore',
'launchQueue', 'speechSynthesis', 'globalThis', 'JSON', 'Math', 'Intl', 'Atomics', 'Reflect', 'console',
'CSS', 'WebAssembly', 'GPUBufferUsage', 'GPUColorWrite', 'GPUMapMode', 'GPUShaderStage', 'GPUTextureUsage',
'n.scheduling', 'n.userActivation', 'n.geolocation', 'n.connection', 'n.plugins', 'n.mimeTypes',
'n.webkitTemporaryStorage', 'n.webkitPersistentStorage', 'n.bluetooth', 'n.clipboard', 'n.credentials',
'n.keyboard', 'n.managed', 'n.mediaDevices', 'n.storage', 'n.serviceWorker', 'n.virtualKeyboard',
'n.wakeLock', 'n.ink', 'n.hid', 'n.locks', 'n.mediaCapabilities', 'n.mediaSession', 'n.permissions',
'n.presentation', 'n.serial', 'n.gpu', 'n.usb', 'n.windowControlsOverlay', 'n.xr', 'n.userAgentData',
'd.location', 'd.implementation', 'd.documentElement', 'd.body', 'd.head', 'd.images', 'd.embeds',
'd.plugins', 'd.links', 'd.forms', 'd.scripts', 'd.defaultView', 'd.anchors', 'd.applets',
'd.scrollingElement', 'd.featurePolicy', 'd.children', 'd.firstElementChild', 'd.lastElementChild',
'd.activeElement', 'd.styleSheets', 'd.fonts', 'd.fragmentDirective', 'd.timeline', 'd.childNodes',
'd.firstChild', 'd.lastChild'],
'false': ['closed', 'crossOriginIsolated', 'credentialless', 'originAgentCluster', 'n.webdriver', 'd.xmlStandalone', 'd.hidden', 'd.wasDiscarded', 'd.prerendering', 'd.webkitHidden', 'd.fullscreen', 'd.webkitIsFullScreen'],
'x': ['opener', 'onsearch', 'onappinstalled', 'onbeforeinstallprompt', 'onbeforexrselect', 'onabort',
'onbeforeinput', 'onblur', 'oncancel', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'onclose',
'oncontextlost', 'oncontextmenu', 'oncontextrestored', 'oncuechange', 'ondblclick', 'ondrag', 'ondragend',
'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'ondurationchange', 'onemptied',
'onended', 'onerror', 'onfocus', 'onformdata', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup',
'onload', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onmousedown', 'onmouseenter', 'onmouseleave',
'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onpause', 'onplay', 'onplaying',
'onprogress', 'onratechange', 'onreset', 'onresize', 'onscroll', 'onsecuritypolicyviolation', 'onseeked',
'onseeking', 'onselect', 'onslotchange', 'onstalled', 'onsubmit', 'onsuspend', 'ontimeupdate', 'ontoggle',
'onvolumechange', 'onwaiting', 'onwebkitanimationend', 'onwebkitanimationiteration','onwebkitanimationstart',
'onwebkittransitionend', 'onwheel', 'onauxclick', 'ongotpointercapture', 'onlostpointercapture',
'onpointerdown', 'onpointermove', 'onpointerrawupdate', 'onpointerup', 'onpointercancel', 'onpointerover',
'onpointerout', 'onpointerenter', 'onpointerleave', 'onselectstart', 'onselectionchange', 'onanimationend',
'onanimationiteration', 'onanimationstart', 'ontransitionrun', 'ontransitionstart', 'ontransitionend',
'ontransitioncancel', 'onafterprint', 'onbeforeprint', 'onbeforeunload', 'onhashchange', 'onlanguagechange',
'onmessage', 'onmessageerror', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate',
'onrejectionhandled', 'onstorage', 'onunhandledrejection', 'onunload', 'ondevicemotion',
'ondeviceorientation', 'ondeviceorientationabsolute', 'onbeforematch', 'onbeforetoggle',
'oncontentvisibilityautostatechange', 'onscrollend', 'n.doNotTrack', 'd.doctype', 'd.xmlEncoding',
'd.xmlVersion', 'd.currentScript', 'd.onreadystatechange', 'd.all', 'd.onpointerlockchange',
'd.onpointerlockerror', 'd.onbeforecopy', 'd.onbeforecut', 'd.onbeforepaste', 'd.onfreeze',
'd.onprerenderingchange', 'd.onresume', 'd.onsearch', 'd.onvisibilitychange', 'd.onfullscreenchange',
'd.onfullscreenerror', 'd.webkitCurrentFullScreenElement', 'd.webkitFullscreenElement',
'd.onwebkitfullscreenchange', 'd.onwebkitfullscreenerror', 'd.rootElement', 'd.pictureInPictureElement',
'd.onbeforexrselect', 'd.onabort', 'd.onbeforeinput', 'd.onblur', 'd.oncancel', 'd.oncanplay',
'd.oncanplaythrough', 'd.onchange', 'd.onclick', 'd.onclose', 'd.oncontextlost', 'd.oncontextmenu',
'd.oncontextrestored', 'd.oncuechange', 'd.ondblclick', 'd.ondrag', 'd.ondragend', 'd.ondragenter',
'd.ondragleave', 'd.ondragover', 'd.ondragstart', 'd.ondrop', 'd.ondurationchange', 'd.onemptied',
'd.onended', 'd.onerror', 'd.onfocus', 'd.onformdata', 'd.oninput', 'd.oninvalid', 'd.onkeydown',
'd.onkeypress', 'd.onkeyup', 'd.onload', 'd.onloadeddata', 'd.onloadedmetadata', 'd.onloadstart',
'd.onmousedown', 'd.onmouseenter', 'd.onmouseleave', 'd.onmousemove', 'd.onmouseout', 'd.onmouseover',
'd.onmouseup', 'd.onmousewheel', 'd.onpause', 'd.onplay', 'd.onplaying', 'd.onprogress','d.onratechange',
'd.onreset', 'd.onresize', 'd.onscroll', 'd.onsecuritypolicyviolation', 'd.onseeked', 'd.onseeking',
'd.onselect', 'd.onslotchange', 'd.onstalled', 'd.onsubmit', 'd.onsuspend', 'd.ontimeupdate', 'd.ontoggle',
'd.onvolumechange', 'd.onwaiting', 'd.onwebkitanimationend', 'd.onwebkitanimationiteration',
'd.onwebkitanimationstart', 'd.onwebkittransitionend', 'd.onwheel', 'd.onauxclick', 'd.ongotpointercapture',
'd.onlostpointercapture', 'd.onpointerdown', 'd.onpointermove', 'd.onpointerrawupdate', 'd.onpointerup',
'd.onpointercancel', 'd.onpointerover', 'd.onpointerout', 'd.onpointerenter', 'd.onpointerleave',
'd.onselectstart', 'd.onselectionchange', 'd.onanimationend', 'd.onanimationiteration', 'd.onanimationstart',
'd.ontransitionrun', 'd.ontransitionstart', 'd.ontransitionend', 'd.ontransitioncancel', 'd.oncopy',
'd.oncut', 'd.onpaste', 'd.pointerLockElement', 'd.fullscreenElement', 'd.onbeforematch', 'd.onbeforetoggle',
'd.oncontentvisibilityautostatechange', 'd.onscrollend', 'd.ownerDocument', 'd.parentNode', 'd.parentElement',
'd.previousSibling', 'd.nextSibling', 'd.nodeValue', 'd.textContent'], 'https://discord.com': ['origin'],
'0.8999999761581421': ['devicePixelRatio'],
'true': ['isSecureContext', 'offscreenBuffering', 'n.pdfViewerEnabled', 'n.cookieEnabled', 'n.onLine', 'd.fullscreenEnabled', 'd.webkitFullscreenEnabled', 'd.pictureInPictureEnabled', 'd.isConnected'],
'N': ['alert', 'atob', 'blur', 'btoa', 'cancelAnimationFrame', 'cancelIdleCallback', 'captureEvents',
'clearInterval', 'clearTimeout', 'close', 'confirm', 'createImageBitmap', 'fetch', 'find', 'focus',
'getComputedStyle', 'getSelection', 'matchMedia', 'moveBy', 'moveTo', 'open', 'postMessage', 'print',
'prompt', 'queueMicrotask', 'releaseEvents', 'reportError', 'requestAnimationFrame', 'requestIdleCallback',
'resizeBy', 'resizeTo', 'scroll', 'scrollBy', 'scrollTo', 'setInterval', 'setTimeout', 'stop',
'structuredClone', 'webkitCancelAnimationFrame', 'webkitRequestAnimationFrame', 'getScreenDetails',
'queryLocalFonts', 'showDirectoryPicker', 'showOpenFilePicker', 'showSaveFilePicker', 'openDatabase',
'webkitRequestFileSystem', 'webkitResolveLocalFileSystemURL', 'addEventListener', 'dispatchEvent',
'removeEventListener', 'Object', 'Function', 'Number', 'parseFloat', 'parseInt', 'Boolean', 'String',
'Symbol', 'Date', 'Promise', 'RegExp', 'Error', 'AggregateError', 'EvalError', 'RangeError', 'ReferenceError',
'SyntaxError', 'TypeError', 'URIError', 'ArrayBuffer', 'Uint8Array', 'Int8Array', 'Uint16Array', 'Int16Array',
'Uint32Array', 'Int32Array', 'Float32Array', 'Float64Array', 'Uint8ClampedArray', 'BigUint64Array',
'BigInt64Array', 'DataView', 'Map', 'BigInt', 'Set', 'WeakMap', 'WeakSet', 'Proxy', 'FinalizationRegistry',
'WeakRef', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', 'unescape', 'eval',
'isFinite', 'isNaN', 'Option', 'Image', 'Audio', 'webkitURL', 'webkitRTCPeerConnection', 'webkitMediaStream',
'WebKitMutationObserver', 'WebKitCSSMatrix', 'XSLTProcessor', 'XPathResult', 'XPathExpression',
'XPathEvaluator', 'XMLSerializer', 'XMLHttpRequestUpload', 'XMLHttpRequestEventTarget', 'XMLHttpRequest',
'XMLDocument', 'WritableStreamDefaultWriter', 'WritableStreamDefaultController', 'WritableStream', 'Worker',
'Window', 'WheelEvent', 'WebSocket', 'WebGLVertexArrayObject', 'WebGLUniformLocation',
'WebGLTransformFeedback', 'WebGLTexture', 'WebGLSync', 'WebGLShaderPrecisionFormat', 'WebGLShader',
'WebGLSampler', 'WebGLRenderingContext', 'WebGLRenderbuffer', 'WebGLQuery', 'WebGLProgram',
'WebGLFramebuffer', 'WebGLContextEvent', 'WebGLBuffer', 'WebGLActiveInfo', 'WebGL2RenderingContext',
'WaveShaperNode', 'VisualViewport', 'VirtualKeyboardGeometryChangeEvent', 'ValidityState', 'VTTCue',
'UserActivation', 'URLSearchParams', 'URLPattern', 'URL', 'UIEvent', 'TrustedTypePolicyFactory',
'TrustedTypePolicy', 'TrustedScriptURL', 'TrustedScript', 'TrustedHTML', 'TreeWalker', 'TransitionEvent',
'TransformStreamDefaultController', 'TransformStream', 'TrackEvent', 'TouchList', 'TouchEvent', 'Touch',
'TimeRanges', 'TextTrackList', 'TextTrackCueList', 'TextTrackCue', 'TextTrack', 'TextMetrics', 'TextEvent',
'TextEncoderStream', 'TextEncoder', 'TextDecoderStream', 'TextDecoder', 'Text', 'TaskSignal',
'TaskPriorityChangeEvent', 'TaskController', 'TaskAttributionTiming', 'SyncManager', 'SubmitEvent',
'StyleSheetList', 'StyleSheet', 'StylePropertyMapReadOnly', 'StylePropertyMap', 'StorageEvent', 'Storage',
'StereoPannerNode', 'StaticRange', 'SourceBufferList', 'SourceBuffer', 'ShadowRoot', 'Selection',
'SecurityPolicyViolationEvent', 'ScriptProcessorNode', 'ScreenOrientation', 'Screen', 'Scheduling',
'Scheduler', 'SVGViewElement', 'SVGUseElement', 'SVGUnitTypes', 'SVGTransformList', 'SVGTransform',
'SVGTitleElement', 'SVGTextPositioningElement', 'SVGTextPathElement', 'SVGTextElement',
'SVGTextContentElement', 'SVGTSpanElement', 'SVGSymbolElement', 'SVGSwitchElement', 'SVGStyleElement',
'SVGStringList', 'SVGStopElement', 'SVGSetElement', 'SVGScriptElement', 'SVGSVGElement', 'SVGRectElement',
'SVGRect', 'SVGRadialGradientElement', 'SVGPreserveAspectRatio', 'SVGPolylineElement', 'SVGPolygonElement',
'SVGPointList', 'SVGPoint', 'SVGPatternElement', 'SVGPathElement', 'SVGNumberList', 'SVGNumber',
'SVGMetadataElement', 'SVGMatrix', 'SVGMaskElement', 'SVGMarkerElement', 'SVGMPathElement',
'SVGLinearGradientElement', 'SVGLineElement', 'SVGLengthList', 'SVGLength', 'SVGImageElement',
'SVGGraphicsElement', 'SVGGradientElement', 'SVGGeometryElement', 'SVGGElement', 'SVGForeignObjectElement',
'SVGFilterElement', 'SVGFETurbulenceElement', 'SVGFETileElement', 'SVGFESpotLightElement',
'SVGFESpecularLightingElement', 'SVGFEPointLightElement', 'SVGFEOffsetElement', 'SVGFEMorphologyElement',
'SVGFEMergeNodeElement', 'SVGFEMergeElement', 'SVGFEImageElement', 'SVGFEGaussianBlurElement',
'SVGFEFuncRElement', 'SVGFEFuncGElement', 'SVGFEFuncBElement', 'SVGFEFuncAElement', 'SVGFEFloodElement',
'SVGFEDropShadowElement', 'SVGFEDistantLightElement', 'SVGFEDisplacementMapElement',
'SVGFEDiffuseLightingElement', 'SVGFEConvolveMatrixElement', 'SVGFECompositeElement',
'SVGFEComponentTransferElement', 'SVGFEColorMatrixElement', 'SVGFEBlendElement', 'SVGEllipseElement',
'SVGElement', 'SVGDescElement', 'SVGDefsElement', 'SVGComponentTransferFunctionElement', 'SVGClipPathElement',
'SVGCircleElement', 'SVGAnimationElement', 'SVGAnimatedTransformList', 'SVGAnimatedString', 'SVGAnimatedRect',
'SVGAnimatedPreserveAspectRatio', 'SVGAnimatedNumberList', 'SVGAnimatedNumber', 'SVGAnimatedLengthList',
'SVGAnimatedLength', 'SVGAnimatedInteger', 'SVGAnimatedEnumeration', 'SVGAnimatedBoolean', 'SVGAnimatedAngle',
'SVGAnimateTransformElement', 'SVGAnimateMotionElement', 'SVGAnimateElement', 'SVGAngle', 'SVGAElement',
'Response', 'ResizeObserverSize', 'ResizeObserverEntry', 'ResizeObserver', 'Request', 'ReportingObserver',
'ReadableStreamDefaultReader', 'ReadableStreamDefaultController', 'ReadableStreamBYOBRequest',
'ReadableStreamBYOBReader', 'ReadableStream', 'ReadableByteStreamController', 'Range', 'RadioNodeList',
'RTCTrackEvent', 'RTCStatsReport', 'RTCSessionDescription', 'RTCSctpTransport', 'RTCRtpTransceiver',
'RTCRtpSender', 'RTCRtpReceiver', 'RTCPeerConnectionIceEvent', 'RTCPeerConnectionIceErrorEvent',
'RTCPeerConnection', 'RTCIceTransport', 'RTCIceCandidate', 'RTCErrorEvent', 'RTCError',
'RTCEncodedVideoFrame', 'RTCEncodedAudioFrame', 'RTCDtlsTransport', 'RTCDataChannelEvent', 'RTCDataChannel',
'RTCDTMFToneChangeEvent', 'RTCDTMFSender', 'RTCCertificate', 'PromiseRejectionEvent', 'ProgressEvent',
'Profiler', 'ProcessingInstruction', 'PopStateEvent', 'PointerEvent', 'PluginArray', 'Plugin',
'PictureInPictureWindow', 'PictureInPictureEvent', 'PeriodicWave', 'PerformanceTiming',
'PerformanceServerTiming', 'PerformanceResourceTiming', 'PerformancePaintTiming',
'PerformanceObserverEntryList', 'PerformanceObserver', 'PerformanceNavigationTiming','PerformanceNavigation',
'PerformanceMeasure', 'PerformanceMark', 'PerformanceLongTaskTiming', 'PerformanceEventTiming',
'PerformanceEntry', 'PerformanceElementTiming', 'Performance', 'Path2D', 'PannerNode', 'PageTransitionEvent',
'OverconstrainedError', 'OscillatorNode', 'OffscreenCanvasRenderingContext2D', 'OffscreenCanvas',
'OfflineAudioContext', 'OfflineAudioCompletionEvent', 'NodeList', 'NodeIterator', 'NodeFilter', 'Node',
'NetworkInformation', 'Navigator', 'NavigationTransition', 'NavigationHistoryEntry', 'NavigationDestination',
'NavigationCurrentEntryChangeEvent', 'Navigation', 'NavigateEvent', 'NamedNodeMap', 'MutationRecord',
'MutationObserver', 'MutationEvent', 'MouseEvent', 'MimeTypeArray', 'MimeType', 'MessagePort', 'MessageEvent',
'MessageChannel', 'MediaStreamTrackProcessor', 'MediaStreamTrackGenerator', 'MediaStreamTrackEvent',
'MediaStreamTrack', 'MediaStreamEvent', 'MediaStreamAudioSourceNode', 'MediaStreamAudioDestinationNode',
'MediaStream', 'MediaSourceHandle', 'MediaSource', 'MediaRecorder', 'MediaQueryListEvent', 'MediaQueryList',
'MediaList', 'MediaError', 'MediaEncryptedEvent', 'MediaElementAudioSourceNode', 'MediaCapabilities',
'Location', 'LayoutShiftAttribution', 'LayoutShift', 'LargestContentfulPaint', 'KeyframeEffect',
'KeyboardEvent', 'IntersectionObserverEntry', 'IntersectionObserver', 'InputEvent', 'InputDeviceInfo',
'InputDeviceCapabilities', 'ImageData', 'ImageCapture', 'ImageBitmapRenderingContext', 'ImageBitmap',
'IdleDeadline', 'IIRFilterNode', 'IDBVersionChangeEvent', 'IDBTransaction', 'IDBRequest', 'IDBOpenDBRequest',
'IDBObjectStore', 'IDBKeyRange', 'IDBIndex', 'IDBFactory', 'IDBDatabase', 'IDBCursorWithValue', 'IDBCursor',
'History', 'Headers', 'HashChangeEvent', 'HTMLVideoElement', 'HTMLUnknownElement', 'HTMLUListElement',
'HTMLTrackElement', 'HTMLTitleElement', 'HTMLTimeElement', 'HTMLTextAreaElement', 'HTMLTemplateElement',
'HTMLTableSectionElement', 'HTMLTableRowElement', 'HTMLTableElement', 'HTMLTableColElement',
'HTMLTableCellElement', 'HTMLTableCaptionElement', 'HTMLStyleElement', 'HTMLSpanElement', 'HTMLSourceElement',
'HTMLSlotElement', 'HTMLSelectElement', 'HTMLScriptElement', 'HTMLQuoteElement', 'HTMLProgressElement',
'HTMLPreElement', 'HTMLPictureElement', 'HTMLParamElement', 'HTMLParagraphElement', 'HTMLOutputElement',
'HTMLOptionsCollection', 'HTMLOptionElement', 'HTMLOptGroupElement', 'HTMLObjectElement', 'HTMLOListElement',
'HTMLModElement', 'HTMLMeterElement', 'HTMLMetaElement', 'HTMLMenuElement', 'HTMLMediaElement',
'HTMLMarqueeElement', 'HTMLMapElement', 'HTMLLinkElement', 'HTMLLegendElement', 'HTMLLabelElement',
'HTMLLIElement', 'HTMLInputElement', 'HTMLImageElement', 'HTMLIFrameElement', 'HTMLHtmlElement',
'HTMLHeadingElement', 'HTMLHeadElement', 'HTMLHRElement', 'HTMLFrameSetElement', 'HTMLFrameElement',
'HTMLFormElement', 'HTMLFormControlsCollection', 'HTMLFontElement', 'HTMLFieldSetElement', 'HTMLEmbedElement',
'HTMLElement', 'HTMLDocument', 'HTMLDivElement', 'HTMLDirectoryElement', 'HTMLDialogElement',
'HTMLDetailsElement', 'HTMLDataListElement', 'HTMLDataElement', 'HTMLDListElement', 'HTMLCollection',
'HTMLCanvasElement', 'HTMLButtonElement', 'HTMLBodyElement', 'HTMLBaseElement', 'HTMLBRElement',
'HTMLAudioElement', 'HTMLAreaElement', 'HTMLAnchorElement', 'HTMLAllCollection', 'GeolocationPositionError',
'GeolocationPosition', 'GeolocationCoordinates', 'Geolocation', 'GamepadHapticActuator', 'GamepadEvent',
'GamepadButton', 'Gamepad', 'GainNode', 'FormDataEvent', 'FormData', 'FontFaceSetLoadEvent', 'FontFace',
'FocusEvent', 'FileReader', 'FileList', 'File', 'FeaturePolicy', 'External', 'EventTarget', 'EventSource',
'EventCounts', 'Event', 'ErrorEvent', 'ElementInternals', 'Element', 'DynamicsCompressorNode', 'DragEvent',
'DocumentType', 'DocumentFragment', 'Document', 'DelayNode', 'DecompressionStream', 'DataTransferItemList',
'DataTransferItem', 'DataTransfer', 'DOMTokenList', 'DOMStringMap', 'DOMStringList', 'DOMRectReadOnly',
'DOMRectList', 'DOMRect', 'DOMQuad', 'DOMPointReadOnly', 'DOMPoint', 'DOMParser', 'DOMMatrixReadOnly',
'DOMMatrix', 'DOMImplementation', 'DOMException', 'DOMError', 'CustomStateSet', 'CustomEvent',
'CustomElementRegistry', 'Crypto', 'CountQueuingStrategy', 'ConvolverNode', 'ConstantSourceNode',
'CompressionStream', 'CompositionEvent', 'Comment', 'CloseEvent', 'ClipboardEvent', 'CharacterData',
'ChannelSplitterNode', 'ChannelMergerNode', 'CanvasRenderingContext2D', 'CanvasPattern', 'CanvasGradient',
'CanvasCaptureMediaStreamTrack', 'CSSVariableReferenceValue', 'CSSUnparsedValue', 'CSSUnitValue',
'CSSTranslate', 'CSSTransformValue', 'CSSTransformComponent', 'CSSSupportsRule', 'CSSStyleValue',
'CSSStyleSheet', 'CSSStyleRule', 'CSSStyleDeclaration', 'CSSSkewY', 'CSSSkewX', 'CSSSkew', 'CSSScale',
'CSSRuleList', 'CSSRule', 'CSSRotate', 'CSSPropertyRule', 'CSSPositionValue', 'CSSPerspective', 'CSSPageRule',
'CSSNumericValue', 'CSSNumericArray', 'CSSNamespaceRule', 'CSSMediaRule', 'CSSMatrixComponent',
'CSSMathValue', 'CSSMathSum', 'CSSMathProduct', 'CSSMathNegate', 'CSSMathMin', 'CSSMathMax', 'CSSMathInvert',
'CSSMathClamp', 'CSSLayerStatementRule', 'CSSLayerBlockRule', 'CSSKeywordValue', 'CSSKeyframesRule',
'CSSKeyframeRule', 'CSSImportRule', 'CSSImageValue', 'CSSGroupingRule', 'CSSFontPaletteValuesRule',
'CSSFontFaceRule', 'CSSCounterStyleRule', 'CSSContainerRule', 'CSSConditionRule', 'CDATASection',
'ByteLengthQueuingStrategy', 'BroadcastChannel', 'BlobEvent', 'Blob', 'BiquadFilterNode', 'BeforeUnloadEvent',
'BeforeInstallPromptEvent', 'BaseAudioContext', 'BarProp', 'AudioWorkletNode', 'AudioSinkInfo',
'AudioScheduledSourceNode', 'AudioProcessingEvent', 'AudioParamMap', 'AudioParam', 'AudioNode',
'AudioListener', 'AudioDestinationNode', 'AudioContext', 'AudioBufferSourceNode', 'AudioBuffer', 'Attr',
'AnimationEvent', 'AnimationEffect', 'Animation', 'AnalyserNode', 'AbstractRange', 'AbortSignal',
'AbortController', 'AbsoluteOrientationSensor', 'Accelerometer', 'AudioWorklet', 'BatteryManager', 'Cache',
'CacheStorage', 'Clipboard', 'ClipboardItem', 'CookieChangeEvent', 'CookieStore', 'CookieStoreManager',
'Credential', 'CredentialsContainer', 'CryptoKey', 'DeviceMotionEvent', 'DeviceMotionEventAcceleration',
'DeviceMotionEventRotationRate', 'DeviceOrientationEvent', 'FederatedCredential', 'GravitySensor',
'Gyroscope', 'Keyboard', 'KeyboardLayoutMap', 'LinearAccelerationSensor', 'Lock', 'LockManager', 'MIDIAccess',
'MIDIConnectionEvent', 'MIDIInput', 'MIDIInputMap', 'MIDIMessageEvent', 'MIDIOutput', 'MIDIOutputMap',
'MIDIPort', 'MediaDeviceInfo', 'MediaDevices', 'MediaKeyMessageEvent', 'MediaKeySession', 'MediaKeyStatusMap',
'MediaKeySystemAccess', 'MediaKeys', 'NavigationPreloadManager', 'NavigatorManagedData', 'OrientationSensor',
'PasswordCredential', 'RelativeOrientationSensor', 'Sanitizer', 'ScreenDetailed', 'ScreenDetails', 'Sensor',
'SensorErrorEvent', 'ServiceWorker', 'ServiceWorkerContainer', 'ServiceWorkerRegistration', 'StorageManager',
'SubtleCrypto', 'VirtualKeyboard', 'WebTransport', 'WebTransportBidirectionalStream',
'WebTransportDatagramDuplexStream', 'WebTransportError', 'Worklet', 'XRDOMOverlayState', 'XRLayer',
'XRWebGLBinding', 'AudioData', 'EncodedAudioChunk', 'EncodedVideoChunk', 'ImageTrack', 'ImageTrackList',
'VideoColorSpace', 'VideoFrame', 'AudioDecoder', 'AudioEncoder', 'ImageDecoder', 'VideoDecoder',
'VideoEncoder', 'AuthenticatorAssertionResponse', 'AuthenticatorAttestationResponse', 'AuthenticatorResponse',
'PublicKeyCredential', 'Bluetooth', 'BluetoothCharacteristicProperties', 'BluetoothDevice',
'BluetoothRemoteGATTCharacteristic', 'BluetoothRemoteGATTDescriptor', 'BluetoothRemoteGATTServer',
'BluetoothRemoteGATTService', 'CaptureController', 'EyeDropper', 'FileSystemDirectoryHandle',
'FileSystemFileHandle', 'FileSystemHandle', 'FileSystemWritableFileStream', 'FontData', 'FragmentDirective',
'GPU', 'GPUAdapter', 'GPUAdapterInfo', 'GPUBindGroup', 'GPUBindGroupLayout', 'GPUBuffer', 'GPUCanvasContext',
'GPUCommandBuffer', 'GPUCommandEncoder', 'GPUCompilationInfo', 'GPUCompilationMessage',
'GPUComputePassEncoder', 'GPUComputePipeline', 'GPUDevice', 'GPUDeviceLostInfo', 'GPUError',
'GPUExternalTexture', 'GPUInternalError', 'GPUOutOfMemoryError', 'GPUPipelineError', 'GPUPipelineLayout',
'GPUQuerySet', 'GPUQueue', 'GPURenderBundle', 'GPURenderBundleEncoder', 'GPURenderPassEncoder',
'GPURenderPipeline', 'GPUSampler', 'GPUShaderModule', 'GPUSupportedFeatures', 'GPUSupportedLimits',
'GPUTexture', 'GPUTextureView', 'GPUUncapturedErrorEvent', 'GPUValidationError', 'HID', 'HIDConnectionEvent',
'HIDDevice', 'HIDInputReportEvent', 'IdentityCredential', 'IdleDetector', 'LaunchParams', 'LaunchQueue',
'OTPCredential', 'PaymentAddress', 'PaymentRequest', 'PaymentResponse', 'PaymentMethodChangeEvent',
'Presentation', 'PresentationAvailability', 'PresentationConnection', 'PresentationConnectionAvailableEvent',
'PresentationConnectionCloseEvent', 'PresentationConnectionList', 'PresentationReceiver',
'PresentationRequest', 'Serial', 'SerialPort', 'ToggleEvent', 'USB', 'USBAlternateInterface',
'USBConfiguration', 'USBConnectionEvent', 'USBDevice', 'USBEndpoint', 'USBInTransferResult', 'USBInterface',
'USBIsochronousInTransferPacket', 'USBIsochronousInTransferResult', 'USBIsochronousOutTransferPacket',
'USBIsochronousOutTransferResult', 'USBOutTransferResult', 'WakeLock', 'WakeLockSentinel',
'WindowControlsOverlay', 'WindowControlsOverlayGeometryChangeEvent', 'XRAnchor', 'XRAnchorSet',
'XRBoundedReferenceSpace', 'XRCPUDepthInformation', 'XRCamera', 'XRDepthInformation', 'XRFrame',
'XRHitTestResult', 'XRHitTestSource', 'XRInputSource', 'XRInputSourceArray', 'XRInputSourceEvent',
'XRInputSourcesChangeEvent', 'XRLightEstimate', 'XRLightProbe', 'XRPose', 'XRRay', 'XRReferenceSpace',
'XRReferenceSpaceEvent', 'XRRenderState', 'XRRigidTransform', 'XRSession', 'XRSessionEvent', 'XRSpace',
'XRSystem', 'XRTransientInputHitTestResult', 'XRTransientInputHitTestSource', 'XRView', 'XRViewerPose',
'XRViewport', 'XRWebGLDepthInformation', 'XRWebGLLayer', 'AnimationPlaybackEvent', 'AnimationTimeline',
'CSSAnimation', 'CSSTransition', 'DocumentTimeline', 'BackgroundFetchManager', 'BackgroundFetchRecord',
'BackgroundFetchRegistration', 'BluetoothUUID', 'BrowserCaptureMediaStreamTrack', 'CropTarget',
'ContentVisibilityAutoStateChangeEvent', 'DelegatedInkTrailPresenter', 'Ink', 'Highlight',
'HighlightRegistry', 'MathMLElement', 'MediaMetadata', 'MediaSession', 'NavigatorUAData', 'Notification',
'PaymentManager', 'PaymentRequestUpdateEvent', 'PeriodicSyncManager', 'PermissionStatus', 'Permissions',
'PushManager', 'PushSubscription', 'PushSubscriptionOptions', 'RemotePlayback', 'SharedWorker',
'SpeechSynthesisErrorEvent', 'SpeechSynthesisEvent', 'SpeechSynthesisUtterance', 'VideoPlaybackQuality',
'ViewTransition', 'webkitSpeechGrammar', 'webkitSpeechGrammarList', 'webkitSpeechRecognition',
'webkitSpeechRecognitionError', 'webkitSpeechRecognitionEvent', 'n.getGamepads', 'n.javaEnabled',
'n.sendBeacon', 'n.vibrate', 'n.canShare', 'n.share', 'n.clearAppBadge', 'n.getBattery', 'n.getUserMedia',
'n.requestMIDIAccess', 'n.requestMediaKeySystemAccess', 'n.setAppBadge', 'n.webkitGetUserMedia',
'n.getInstalledRelatedApps', 'n.registerProtocolHandler', 'n.unregisterProtocolHandler', 'd.adoptNode',
'd.append', 'd.captureEvents', 'd.caretRangeFromPoint', 'd.clear', 'd.close', 'd.createAttribute',
'd.createAttributeNS', 'd.createCDATASection', 'd.createComment', 'd.createDocumentFragment',
'd.createElement', 'd.createElementNS', 'd.createEvent', 'd.createExpression', 'd.createNSResolver',
'd.createNodeIterator', 'd.createProcessingInstruction', 'd.createRange', 'd.createTextNode',
'd.createTreeWalker', 'd.elementFromPoint', 'd.elementsFromPoint', 'd.evaluate', 'd.execCommand',
'd.exitFullscreen', 'd.exitPictureInPicture', 'd.exitPointerLock', 'd.getElementById',
'd.getElementsByClassName', 'd.getElementsByName', 'd.getElementsByTagName', 'd.getElementsByTagNameNS',
'd.getSelection', 'd.hasFocus', 'd.importNode', 'd.open', 'd.prepend', 'd.queryCommandEnabled',
'd.queryCommandIndeterm', 'd.queryCommandState', 'd.queryCommandSupported', 'd.queryCommandValue',
'd.querySelector', 'd.querySelectorAll', 'd.releaseEvents', 'd.replaceChildren', 'd.webkitCancelFullScreen',
'd.webkitExitFullscreen', 'd.write', 'd.writeln', 'd.getAnimations', 'd.startViewTransition', 'd.appendChild',
'd.cloneNode', 'd.compareDocumentPosition', 'd.contains', 'd.getRootNode', 'd.hasChildNodes',
'd.insertBefore', 'd.isDefaultNamespace', 'd.isEqualNode', 'd.isSameNode', 'd.lookupNamespaceURI',
'd.lookupPrefix', 'd.normalize', 'd.removeChild', 'd.replaceChild', 'd.addEventListener', 'd.dispatchEvent', 'd.removeEventListener'],
'E': ['Array'],
'Infinity': ['Infinity'], 'NaN': ['NaN'], 'u': ['undefined', 'event'], 'Google Inc.': ['n.vendor'],
'Mozilla': ['n.appCodeName'], 'Netscape': ['n.appName'], self.useragent.lstrip('Mozilla/'): ['n.appVersion'],
'Win32': ['n.platform'], 'Gecko': ['n.product'], self.useragent: ['n.userAgent'], 'en': ['n.language'], 'en,en-US': ['n.languages'],
'about:blank': ['d.URL', 'd.documentURI', 'd.referrer'], 'BackCompat': ['d.compatMode'],
'UTF-8': ['d.characterSet', 'd.charset', 'd.inputEncoding'], 'text/html': ['d.contentType'], 'discord.com': ['d.domain'],
's': ['d.cookie'], datetime.now().strftime("%m/%d/%Y %H:%M:%S"): ['d.lastModified'], 'complete': ['d.readyState'], 'off': ['d.designMode'],
'visible': ['d.visibilityState', 'd.webkitVisibilityState'], '': ['d.adoptedStyleSheets'], '#document': ['d.nodeName'],
'https://discord.com/': ['d.baseURI']
}
def _get_values(self):
r = self.client.get('https://discord.com/cdn-cgi/challenge-platform/scripts/invisible.js', allow_redirects=True)
key = 'x3MU-7nK0tLQlyRoIXNDZOiPF+c26s$gdJAVzEv9qmapSuh5bwfjHYTk18eWBG4rC'
for x in r.text.split(';'):
if len(x) == 65 and '=' not in x:
key = x
regex_pattern = r'.*0\.(\d{12,20}):(\d{10}):([a-zA-Z0-9_+*\\-]{43}).*'
x = re.findall(regex_pattern, r.text)
s = '0.' + ':'.join(x[0])
return s, key
def _get_encrpyted_wb(self, data: dict):
str_data = json.dumps(data, separators=(',', ':'))
result = subprocess.run(['node', 'wb_encrypter.js', str_data, self.key], capture_output=True, text=True)
wb = result.stdout.strip()
return wb
def get_cloudflare_cookie(self):
payload = {
'wp': self._get_encrpyted_wb(self.base_data),
's': self.s
}
r = self.client.post('https://discord.com/cdn-cgi/challenge-platform/h/b/cv/result/7e7d91040f6b0368', json=payload)
if r.status_code == 200:
return True
else:
return False
if __name__ == '__main__':
client = tls_client.Session(client_identifier='chrome114', random_tls_extension_order=True)
cloudflare = Cloudflare(
client=client,
useragent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36'
)
cloudflare.get_cloudflare_cookie()
print(client.cookies)