diff --git a/resources/messages.properties b/resources/messages.properties index 124f022c..e88ade58 100755 --- a/resources/messages.properties +++ b/resources/messages.properties @@ -128,7 +128,7 @@ text.fetchers.info=Fetcher information: text.fetchers.info.notAvailable=Unfortunately, no additional information about this fetcher is available. text.fetchers.preferences=Preferences of the selected fetcher text.fetcher.portText.send=Text to send (\\n, \\r, \\t and \\xXX are permitted) -text.fetcher.portText.match=Regexp to match in the response +text.fetcher.portText.match=Regexp to match in the response, line by line text.fetcher.portText.replace=Regexp replacement string ($0 .. $9 are substituted for matched groups) text.about=%NAME\n\nVersion: %VERSION\nBuild date: %DATE\n\n%COPYLEFT text.about.system=Java: %JAVA\nOS: %OS @@ -213,7 +213,7 @@ fetcher.comment.info=Shows the comments entered for the address using the IP Det fetcher.webDetect=Web detect fetcher.webDetect.info=Detects the web server software name and version, if possible.\n\nWorks by sending a HEAD request and reading the Server HTTP header from the response. fetcher.httpSender=HTTP Sender -fetcher.httpSender.info=Sends the specified textual requests to the specified TCP port, retrieves the response and uses the specified regular expression to extract the needed information out.\n\nVery customizable, can be used for any textual protocol, like HTTP, SMTP, POP3, IMAP, etc. For advanced users. +fetcher.httpSender.info=Sends the specified textual requests to the specified TCP port (eg 3128, http proxy), retrieves the response and uses the specified regular expression to extract the needed information out.\n\nVery customizable, can be used for any textual protocol, like HTTP, SMTP, POP3, IMAP, etc. For advanced users. fetcher.portText.custom=Custom fetcher.netbios=NetBIOS Info fetcher.netbios.info=Retrieves the NetBIOS information about Windows machines.\n\nThe response has the following format:\nDOMAIN\\USER@COMPUTER [MAC]\n\nWhere:\nDOMAIN - Windows domain or workgroup\nUSER - currently logged in user\nCOMPUTER - Windows computer name (may be different from DNS name)\nSome parts may be absent, depending on the response.\n\nNote that this won't work with machines that have firewall enabled (which are most modern installations).\nThis fetcher is provided mostly for feature-compatibility with version 2.x. diff --git a/src/net/azib/ipscan/fetchers/AbstractFetcher.java b/src/net/azib/ipscan/fetchers/AbstractFetcher.java index 0de58209..9a251478 100644 --- a/src/net/azib/ipscan/fetchers/AbstractFetcher.java +++ b/src/net/azib/ipscan/fetchers/AbstractFetcher.java @@ -5,10 +5,12 @@ */ package net.azib.ipscan.fetchers; -import java.util.MissingResourceException; - +import net.azib.ipscan.config.Config; import net.azib.ipscan.config.Labels; +import java.util.MissingResourceException; +import java.util.prefs.Preferences; + /** * Convenience base class for built-in fetchers * @@ -33,6 +35,10 @@ public abstract class AbstractFetcher implements Fetcher { } } + public Preferences getPreferences() { + return Config.getConfig().getPreferences().node(getId().replace("fetcher.", "")); + } + public Class getPreferencesClass() { // no preferences by default return null; diff --git a/src/net/azib/ipscan/fetchers/HTTPSenderFetcher.java b/src/net/azib/ipscan/fetchers/HTTPSenderFetcher.java index 9ef50d59..e915f346 100644 --- a/src/net/azib/ipscan/fetchers/HTTPSenderFetcher.java +++ b/src/net/azib/ipscan/fetchers/HTTPSenderFetcher.java @@ -16,8 +16,7 @@ import net.azib.ipscan.config.ScannerConfig; public class HTTPSenderFetcher extends PortTextFetcher { public HTTPSenderFetcher(ScannerConfig scannerConfig) { - super(scannerConfig, 3128, "GET http://www.urbandplayground.com/?f=vote&band_id=150 HTTP/1.0\r\n\r\n", - "\">([^>]+?VOT[^<]+?)