diff -ur PortBunny/UI/share/portbunny/PBunnyOptionParser.py PortBunny.mod/UI/share/portbunny/PBunnyOptionParser.py
--- PortBunny/UI/share/portbunny/PBunnyOptionParser.py	2008-10-25 23:45:32.000000000 +0200
+++ PortBunny.mod/UI/share/portbunny/PBunnyOptionParser.py	2008-10-25 23:17:42.000000000 +0200
@@ -101,6 +101,9 @@
                           dest = 'log', default = False,
                           help = "Creates a scan-log which can help debug problems.")
 
+	parser.add_option('-u', '--noui', action="store_true",
+			  dest = 'disable_ui', default = False,
+			  help = "Disable UI.")
         
         parser.add_option('-w', '--wait-longer', action="store_true",
                           dest = 'wait_longer', default = False,
diff -ur PortBunny/UI/share/portbunny/UILogic.py PortBunny.mod/UI/share/portbunny/UILogic.py
--- PortBunny/UI/share/portbunny/UILogic.py	2008-10-25 23:45:32.000000000 +0200
+++ PortBunny.mod/UI/share/portbunny/UILogic.py	2008-10-25 23:40:08.000000000 +0200
@@ -81,7 +81,7 @@
                 
                 # Shut down the scanner
                 stopParserThread(self.scanner.parser)
-                stopUserEventHandler(self.event_handler)
+                stopUserEventHandler(self.event_handler,self.options_parser)
                 return
             
             
@@ -162,7 +162,7 @@
             if self.nactive_trigger_jobs + self.nactive_flood_jobs == 0:
                 print "All done"
                 # Shut down the scanner
-                stopUserEventHandler(self.event_handler)
+                stopUserEventHandler(self.event_handler,self.options_parser)
                 stopParserThread(self.scanner.parser)                
                 return
             else:
diff -ur PortBunny/UI/share/portbunny/UserEventHandler.py PortBunny.mod/UI/share/portbunny/UserEventHandler.py
--- PortBunny/UI/share/portbunny/UserEventHandler.py	2008-10-25 23:45:32.000000000 +0200
+++ PortBunny.mod/UI/share/portbunny/UserEventHandler.py	2008-10-25 23:35:26.000000000 +0200
@@ -12,11 +12,13 @@
 from interface import stopParserThread
 
 
-def stopUserEventHandler(event_handler): 
+def stopUserEventHandler(event_handler,options_parser): 
     event_handler.running = False    
-    os.write(event_handler.transmit, 'x')
+
+    if not options_parser.options.disable_ui:
+	os.write(event_handler.transmit, 'x')
     
-    event_handler.fini_mutex.acquire()
+    	event_handler.fini_mutex.acquire()
 
 class UserEventHandler:
 
@@ -28,50 +30,52 @@
         self.fini_mutex = threading.Semaphore(0)
       
         # Create exit-pipe
-        (self.receive, self.transmit) = os.pipe()
+	if not self.options_parser.options.disable_ui:
+		(self.receive, self.transmit) = os.pipe()
         
-        # Set terminal to cbreak-mode
-        fd = sys.stdin.fileno()
-        self.old_settings = termios.tcgetattr(fd)
-        tty.setcbreak(fd)
+		# Set terminal to cbreak-mode
+		fd = sys.stdin.fileno()
+		self.old_settings = termios.tcgetattr(fd)
+		tty.setcbreak(fd)
     
 
     def run(self):
         
 
-        print "press h for help."
-        try:
-            while self.running: 
-                (read_fds, write_fds, err_fds) = select([sys.stdin, self.receive], [], [])
-            
-                for rfd in read_fds:
-                    if rfd == sys.stdin:
-                        command = sys.stdin.read(1)                        
-    
-                        if command == 'h':
-                            self.print_help()
-                        elif command == 'l':
-                            self.print_active_scan_jobs()
-                        elif command == 'a':
-                           self.abort_group()
-                        elif command == '+':
-                            self.increase_number_of_jobs()
-                        elif command == '-':
-                            self.decrease_number_of_jobs()
-                        else:
-                            self.print_progress_report()
-                    else:
-                        self.running = False
-                        break          
-        
-            termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, self.old_settings)
-            self.fini_mutex.release()
-
-        except KeyboardInterrupt:
-            print "keyboard-interrupt received, quitting"
-            termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, self.old_settings)
-            stopParserThread(self.scanner.parser)
-            sys.exit(1)
+	if not self.options_parser.options.disable_ui:
+		print "press h for help."
+		try:
+		    while self.running: 
+			(read_fds, write_fds, err_fds) = select([sys.stdin, self.receive], [], [])
+		    
+			for rfd in read_fds:
+			    if rfd == sys.stdin:
+				command = sys.stdin.read(1)                        
+	    
+				if command == 'h':
+				    self.print_help()
+				elif command == 'l':
+				    self.print_active_scan_jobs()
+				elif command == 'a':
+				   self.abort_group()
+				elif command == '+':
+				    self.increase_number_of_jobs()
+				elif command == '-':
+				    self.decrease_number_of_jobs()
+				else:
+				    self.print_progress_report()
+			    else:
+				self.running = False
+				break          
+		
+		    termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, self.old_settings)
+		    self.fini_mutex.release()
+
+		except KeyboardInterrupt:
+		    print "keyboard-interrupt received, quitting"
+		    termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, self.old_settings)
+		    stopParserThread(self.scanner.parser)
+		    sys.exit(1)
 
 
     def print_progress_report(self):

