mirror of https://gitlab.com/bashrc2/epicyon
Log before setting headers
parent
2f41ccc0ce
commit
515b9243cc
|
@ -263,13 +263,13 @@ def daemon_http_get(self) -> None:
|
||||||
# oai-host-hash requests come from Microsoft Corporation,
|
# oai-host-hash requests come from Microsoft Corporation,
|
||||||
# which has a long term partnership with OpenAI
|
# which has a long term partnership with OpenAI
|
||||||
if 'oai-host-hash' in self.headers:
|
if 'oai-host-hash' in self.headers:
|
||||||
|
print('GET HTTP LLM scraper poisoned: ' + str(self.headers))
|
||||||
msg = html_poisoned(self.server.dictionary)
|
msg = html_poisoned(self.server.dictionary)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
'', calling_domain, False)
|
'', calling_domain, False)
|
||||||
write2(self, msg)
|
write2(self, msg)
|
||||||
print('GET HTTP LLM scraper poisoned: ' + str(self.headers))
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# replace invalid .well-known path, prior to checking for suspicious paths
|
# replace invalid .well-known path, prior to checking for suspicious paths
|
||||||
|
@ -336,13 +336,13 @@ def daemon_http_get(self) -> None:
|
||||||
if block:
|
if block:
|
||||||
if llm:
|
if llm:
|
||||||
# if this is an LLM crawler then feed it some trash
|
# if this is an LLM crawler then feed it some trash
|
||||||
|
print('GET HTTP LLM scraper poisoned: ' + str(self.headers))
|
||||||
msg = html_poisoned(self.server.dictionary)
|
msg = html_poisoned(self.server.dictionary)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
'', calling_domain, False)
|
'', calling_domain, False)
|
||||||
write2(self, msg)
|
write2(self, msg)
|
||||||
print('GET HTTP LLM scraper poisoned: ' + str(self.headers))
|
|
||||||
return
|
return
|
||||||
http_400(self)
|
http_400(self)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue