Fossil SCM

Obfuscation of the robot-test code.

drh 2025-08-17 19:02 robotck-instant
Commit 2fdd7ace52d20df2fee835711563aa1223ff7618e12eb8c6406466d96250f207
1 file changed +24 -23
+24 -23
--- src/robot.c
+++ src/robot.c
@@ -94,38 +94,39 @@
9494
/* Ask the client to present proof-of-work */
9595
cgi_reset_content();
9696
cgi_set_content_type("text/html");
9797
style_header("Browser Verification");
9898
@ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
99
- @ <form method="GET" id="x6">
100
- @ <p id="x3" style="visibility:hidden;">\
101
- @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
102
- @ <p id="x7" style="visibility:hidden;">You appear to be a robot.</p>
99
+ @ <form method="GET" id="x6"><p>
100
+ @ <span id="x3" style="visibility:hidden;">\
101
+ @ Press <input type="submit" id="x5" value="Ok" focus> to continue</span>
102
+ @ <span id="x7" style="visibility:hidden;">You appear to be a robot.</span></p>
103103
cgi_query_parameters_to_hidden();
104104
@ <input id="x4" type="hidden" name="proof" value="0">
105105
@ </form>
106106
@ <script nonce='%s(style_nonce())'>
107107
@ function aaa(x){return document.getElementById(x);}
108
- @ function bbb(h,a){
109
- @ aaa("x4").value=h
110
- @ if((a%%75)==0){
111
- @ aaa("x2").textContent=aaa("x2").textContent+".";
112
- @ }
113
- @ if(a>0){
114
- @ setTimeout(bbb,1,h+a,a-1);
115
- @ }else if( window.getComputedStyle(document.body).zIndex==='0' ){
116
- @ aaa("x3").style.visibility="visible";
117
- @ aaa("x2").textContent="";
118
- @ aaa("x1").textContent="All clear";
119
- @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
120
- @ aaa("x5").focus();
121
- @ }else{
122
- @ aaa("x7").style.visibility="visible";
123
- @ aaa("x2").textContent="";
124
- @ aaa("x1").textContent="Access Denied";
125
- @ }
126
- @ }
108
+ @ function bbb(h,a){\
109
+ @ aaa("x4").value=h;\
110
+ @ if((a%%75)==0){\
111
+ @ aaa("x2").textContent=aaa("x2").textContent+".";\
112
+ @ }
113
+ @ if(a>0){\
114
+ @ setTimeout(bbb,1,h+a,a-1);\
115
+ @ }else if(window.getComputedStyle(document.body).zIndex==='0'){\
116
+ @ aaa("x3").style.visibility="visible";\
117
+ @ aaa("x2").textContent="";\
118
+ @ aaa("x1").textContent="All clear";\
119
+ @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};\
120
+ @ aaa("x5").focus();\
121
+ @ }else{\
122
+ @ aaa("x7").style.visibility="visible";\
123
+ @ aaa("x2").textContent="";\
124
+ @ aaa("x3").style.display="none";\
125
+ @ aaa("x1").textContent="Access Denied";\
126
+ @ }\
127
+ @ }
127128
k = 400 + h2%299;
128129
h2 = (k*k + k)/2;
129130
@ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
130131
@ </script>
131132
style_finish_page();
132133
--- src/robot.c
+++ src/robot.c
@@ -94,38 +94,39 @@
94 /* Ask the client to present proof-of-work */
95 cgi_reset_content();
96 cgi_set_content_type("text/html");
97 style_header("Browser Verification");
98 @ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
99 @ <form method="GET" id="x6">
100 @ <p id="x3" style="visibility:hidden;">\
101 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
102 @ <p id="x7" style="visibility:hidden;">You appear to be a robot.</p>
103 cgi_query_parameters_to_hidden();
104 @ <input id="x4" type="hidden" name="proof" value="0">
105 @ </form>
106 @ <script nonce='%s(style_nonce())'>
107 @ function aaa(x){return document.getElementById(x);}
108 @ function bbb(h,a){
109 @ aaa("x4").value=h
110 @ if((a%%75)==0){
111 @ aaa("x2").textContent=aaa("x2").textContent+".";
112 @ }
113 @ if(a>0){
114 @ setTimeout(bbb,1,h+a,a-1);
115 @ }else if( window.getComputedStyle(document.body).zIndex==='0' ){
116 @ aaa("x3").style.visibility="visible";
117 @ aaa("x2").textContent="";
118 @ aaa("x1").textContent="All clear";
119 @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
120 @ aaa("x5").focus();
121 @ }else{
122 @ aaa("x7").style.visibility="visible";
123 @ aaa("x2").textContent="";
124 @ aaa("x1").textContent="Access Denied";
125 @ }
126 @ }
 
127 k = 400 + h2%299;
128 h2 = (k*k + k)/2;
129 @ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
130 @ </script>
131 style_finish_page();
132
--- src/robot.c
+++ src/robot.c
@@ -94,38 +94,39 @@
94 /* Ask the client to present proof-of-work */
95 cgi_reset_content();
96 cgi_set_content_type("text/html");
97 style_header("Browser Verification");
98 @ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
99 @ <form method="GET" id="x6"><p>
100 @ <span id="x3" style="visibility:hidden;">\
101 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</span>
102 @ <span id="x7" style="visibility:hidden;">You appear to be a robot.</span></p>
103 cgi_query_parameters_to_hidden();
104 @ <input id="x4" type="hidden" name="proof" value="0">
105 @ </form>
106 @ <script nonce='%s(style_nonce())'>
107 @ function aaa(x){return document.getElementById(x);}
108 @ function bbb(h,a){\
109 @ aaa("x4").value=h;\
110 @ if((a%%75)==0){\
111 @ aaa("x2").textContent=aaa("x2").textContent+".";\
112 @ }
113 @ if(a>0){\
114 @ setTimeout(bbb,1,h+a,a-1);\
115 @ }else if(window.getComputedStyle(document.body).zIndex==='0'){\
116 @ aaa("x3").style.visibility="visible";\
117 @ aaa("x2").textContent="";\
118 @ aaa("x1").textContent="All clear";\
119 @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};\
120 @ aaa("x5").focus();\
121 @ }else{\
122 @ aaa("x7").style.visibility="visible";\
123 @ aaa("x2").textContent="";\
124 @ aaa("x3").style.display="none";\
125 @ aaa("x1").textContent="Access Denied";\
126 @ }\
127 @ }
128 k = 400 + h2%299;
129 h2 = (k*k + k)/2;
130 @ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
131 @ </script>
132 style_finish_page();
133

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button