Permalink
Browse files

Don't load default config file if command line arguments are present.

  • Loading branch information...
1 parent 8aa5f51 commit 1ec908f850a39dfdc1d67e5407d3ee733be2f702 @mhils committed Aug 20, 2012
Showing with 15 additions and 17 deletions.
  1. +3 −2 default.conf
  2. +4 −4 gui/index.html
  3. +8 −11 honeyproxy.py
View
5 default.conf
@@ -2,7 +2,7 @@
#
# A HoneyProxy configuration file is simply a list of
# arguments you could also pass manually to HoneyProxy.
-# If no configuration file is specified, default.conf
+# If no command line options are specified, default.conf
# will be loaded.
#
# To invoke HoneyProxy with another configuration, just type:
@@ -12,4 +12,5 @@
# honeyproxy.py @default.conf @networkA.conf -s SCRIPT
#
-w ./dump/traffic-dump
---dump-dir ./dump/sites/
+--dump-dir ./dump/sites/
+#-p port
View
8 gui/index.html
@@ -87,13 +87,13 @@
<div id="rightCol">
<div id="searchbox">
<h2>Filter</h2>
- <input id=filter class=search data-negate=true data-filterclass="hide" placeholder="search: !not, ~regex"><br>
+ <input id=filter class=search data-negate=true data-filterclass="hide" placeholder="Search"><br>
<h2>Highlight</h2>
- <input data-filterclass="highlight highlight-1" class="search highlight highlight-1" placeholder="highlight-red: !not, ~regex"><br>
- <input data-filterclass="highlight highlight-2" class="search highlight highlight-2" placeholder="highlight-yellow: !not, ~regex"><br>
- <input data-filterclass="highlight highlight-3" class="search highlight highlight-3" placeholder="highlight-green: !not, ~regex"><br><br>
+ <input data-filterclass="highlight highlight-1" class="search highlight highlight-1" placeholder="Modifiers:"><br>
+ <input data-filterclass="highlight highlight-2" class="search highlight highlight-2" placeholder="!not, ~regex"><br>
+ <input data-filterclass="highlight highlight-3" class="search highlight highlight-3" placeholder="=caseSensitive"><br><br>
<input type=checkbox id=includeContent checked><label for="includeContent">include content</label>
</div>
View
19 honeyproxy.py
@@ -42,11 +42,7 @@ def main():
#config stuff
- defaultConfig = True
- for arg in sys.argv:
- if arg.lstrip().startswith("@"):
- defaultConfig = False
- break
+ defaultConfig = (len(sys.argv) == 1)
if defaultConfig and os.path.exists('default.conf'):
sys.argv.insert(1,'@default.conf')
parser = ArgumentParser(
@@ -118,12 +114,13 @@ def main():
#start gui
import webbrowser
webbrowser.open(guiURL)
- else:
- print "Configuration Details:"
- print "HTTP Root: "+httpGui
- print "WebSocket API: "+wsURL
- print "Auth user: " + "honey"
- print "Auth key: "+ HoneyProxy.getAuthKey()
+
+ print "HoneyProxy has been started!"
+ print "Configuration Details (normal users: ignore):"
+ print "HTTP Root: "+httpGui
+ print "WebSocket API: "+wsURL
+ print "Auth user: " + "honey"
+ print "Auth key: "+ HoneyProxy.getAuthKey()
#run!
l = task.LoopingCall(p.tick)

0 comments on commit 1ec908f

Please sign in to comment.