Nmap Development mailing list archives
[Exp NmapFE PATCH] Add --packet-trace and let -r be used when non-root
From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 08 Feb 2007 20:33:07 -0600
The attached patch (/nmap-exp/kris SVN r4494) adds the --packet-trace option to NmapFE and changes the sensitivity setting for -r (Ordered Ports) because it can be used when we're not running as root. Lemme know what you think Thanks, Kris Katterjohn
Index: nmapfe/nmapfe.c =================================================================== --- nmapfe/nmapfe.c (revision 4493) +++ nmapfe/nmapfe.c (revision 4494) @@ -1370,8 +1370,6 @@ opt.useOrderedPorts = gtk_check_button_new_with_label("Ordered Ports"); g_signal_connect(GTK_OBJECT(opt.useOrderedPorts), "released", GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useOrderedPorts), FALSE); gtk_box_pack_start(GTK_BOX(vbox), opt.useOrderedPorts, FALSE, TRUE, 0); gtk_widget_show(opt.useOrderedPorts); @@ -1381,6 +1379,12 @@ gtk_box_pack_start(GTK_BOX(vbox), opt.randomizeHosts, FALSE, TRUE, 0); gtk_widget_show(opt.randomizeHosts); + opt.packetTrace = gtk_check_button_new_with_label("Packet Trace"); + g_signal_connect(GTK_OBJECT(opt.packetTrace), "released", + GTK_SIGNAL_FUNC(validate_option_change), NULL); + gtk_box_pack_start(GTK_BOX(vbox), opt.packetTrace, FALSE, TRUE, 0); + gtk_widget_show(opt.packetTrace); + gtk_widget_show(vbox); gtk_widget_show(frame); Index: nmapfe/nmapfe_sig.c =================================================================== --- nmapfe/nmapfe_sig.c (revision 4493) +++ nmapfe/nmapfe_sig.c (revision 4494) @@ -498,6 +498,10 @@ GTK_TOGGLE_BUTTON(opt.randomizeHosts)->active) strcat(command, "--randomize-hosts "); + if (GTK_WIDGET_SENSITIVE(opt.packetTrace) && + GTK_TOGGLE_BUTTON(opt.packetTrace)->active) + strcat(command, "--packet-trace "); + if (GTK_WIDGET_SENSITIVE(opt.useInputFile) && GTK_TOGGLE_BUTTON(opt.useInputFile)->active) { const char *val = gtk_entry_get_text(GTK_ENTRY(opt.inputFilename)); Index: nmapfe/nmapfe.h =================================================================== --- nmapfe/nmapfe.h (revision 4493) +++ nmapfe/nmapfe.h (revision 4494) @@ -300,6 +300,7 @@ GtkWidget *useIPv6; GtkWidget *useOrderedPorts; GtkWidget *randomizeHosts; + GtkWidget *packetTrace; }; GtkWidget* create_main_win (void);
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [Exp NmapFE PATCH] Add --packet-trace and let -r be used when non-root Kris Katterjohn (Feb 08)