Skip to content

Instantly share code, notes, and snippets.

@zakird
Created September 13, 2015 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zakird/ab70985d7b5b8ed59bd9 to your computer and use it in GitHub Desktop.
Save zakird/ab70985d7b5b8ed59bd9 to your computer and use it in GitHub Desktop.
import ztag.test
class AgranatEmWeb(Annotation):
protocol = protocols.HTTP
subprotocol = protocols.HTTP.GET
port = None
def _process(self, d):
s = d["headers"]["server"]
if "agranat-emweb" in s.lower():
version = d["headers"]["server"].split("/")[-1] if "/" in s else None
d["server"] = {"manufacturer":"Agranat", "product":"EmWeb", "version":version}
return ([], {})
tests = {
"agrant_emweb":{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment