|
@@ -24,6 +24,7 @@ import de.tudarmstadt.informatik.hostage.net.MyServerSocketFactory;
|
|
import de.tudarmstadt.informatik.hostage.protocol.SMB;
|
|
import de.tudarmstadt.informatik.hostage.protocol.SMB;
|
|
import de.tudarmstadt.informatik.hostage.protocol.Protocol;
|
|
import de.tudarmstadt.informatik.hostage.protocol.Protocol;
|
|
import de.tudarmstadt.informatik.hostage.protocol.SSLProtocol;
|
|
import de.tudarmstadt.informatik.hostage.protocol.SSLProtocol;
|
|
|
|
+import de.tudarmstadt.informatik.hostage.system.Device;
|
|
|
|
|
|
|
|
|
|
* Protocol listener class:<br>
|
|
* Protocol listener class:<br>
|
|
@@ -147,6 +148,21 @@ public class Listener implements Runnable {
|
|
*/
|
|
*/
|
|
public boolean start() {
|
|
public boolean start() {
|
|
if(protocol.toString().equals("SMB")){
|
|
if(protocol.toString().equals("SMB")){
|
|
|
|
+ if (!Device.isPortRedirectionAvailable()) {
|
|
|
|
+
|
|
|
|
+ We can only use SMB with iptables since we can't transfer UDP sockets using domain sockets (port binder).
|
|
|
|
+ TODO: somehow communicate this limitation to the user. Right now SMB will simply just fail.
|
|
|
|
+ */
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (Device.isPorthackInstalled()) {
|
|
|
|
+
|
|
|
|
+ Currently the port binder is the preferred method for creating sockets.
|
|
|
|
+ If it installed, we can't use iptables to create UDP sockets.
|
|
|
|
+ @see MyServerSocketFactory
|
|
|
|
+ */
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
((SMB) protocol).initialize(this);
|
|
((SMB) protocol).initialize(this);
|
|
}
|
|
}
|
|
|
|
|