Development :  K-Meleon Forum
K-Meleon development related discussions. 
Network tools menu
Posted by: Brian Bruns
Date: January 06, 2003 11:13AM

I did these a while ago, someone else might find them useful. Basically, a new menu called Tools with a bunch of different sites that you can use to do traceroutes, whois, etc.

Any improvements, let me know.

in menus.cfg
-------------------------

Tools {
macros(search_rbcheckcgi)
macros(search_openrbl)
-
macros(do_traceroute_sjc)
macros(do_traceroute_telstra)
macros(do_traceroute_abovenet)
-
macros(do_dns_trace)
macros(dnsreport)
-
macros(search_freshmeat)
-
macros(whois_geektools)
-
macros(netcalc)
}

in macros.cfg
-------------------------
search_rbcheckcgi {
menu=Search DNSbl (Osirusoft)
$ipaddr = prompt("Enter IP to check in DNSbl at Osirusoft:", "Search DNSbl");
$ipaddrurl = "http://relays.osirusoft.com/cgi-bin/rbcheck.cgi?addr="; . $ipaddr
open($ipaddrurl);
}

search_openrbl {
menu=Search DNSbl (OpenRBL)
$ipaddr = prompt("Enter IP to check in DNSbl at OpenRBL:", "Search DNSbl");
$ipaddrurl = "http://openrbl.org/lookup.php?i="; . $ipaddr
open($ipaddrurl);
}

do_dns_trace {
menu=Do DNS Trace
$dns = prompt("Enter domain/hostname to trace:", "DNS Trace");
$dnsurl = "http://n3dst4.com/network/dnstrace?domain="; . $dns
open($dnsurl);
}

do_traceroute_sjc {
menu=Do Traceroute (Genuity SJC)
$trace = prompt("Enter hostname/ip to trace to:", "Traceroute (SJC)");
$traceurl = "http://netperformance.genuity.com/traceroute.jsp?source=5&target="; . $trace
open($traceurl);
}

do_traceroute_telstra {
menu=Do Traceroute (Telstra)
$trace = prompt("Enter hostname/ip to trace to:", "Traceroute (Telstra)");
$traceurl = "http://www.telstra.net.au/cgi-bin/trace?"; . $trace
open($traceurl);
}

do_traceroute_abovenet {
menu=Do Traceroute (AboveNet)
$trace = prompt("Enter hostname/ip to trace to:", "Traceroute (AboveNet)");
$traceurl = "http://www.above.net/cgi-bin/trace?"; . $trace
open($traceurl);
}

search_freshmeat {
menu=Search Freshmeat
$frshmeat = prompt("Enter program name/project name to find at Freshmeat:", "Search Freshmeat");
$frshmeaturl = "http://freshmeat.net/search/?q="; . $frshmeat
open($frshmeaturl);
}

whois_geektools {
menu=Whois (Geektools)
$whois = prompt("Enter the domain to do a whois on:", "Whois (Geektools)");
$whoisurl = "http://www.geektools.com/cgi-bin/proxy.cgi?query="; . $whois . "&targetnic=auto"
open($whoisurl);
}

netcalc {
menu=NetCalc
$netcalc = prompt("Enter the ip/netmask to check (ie: 10.0.0.1, 10.0.0.0/8, 10.0.0.0/255.0.0.0, or 10.0.0.1-10.1.1.1)");
$netcalcurl = "http://logi.cc/nw/NetCalc.php3?ACTION=doCalc&IPADDR="; . $netcalc
open($netcalcurl)
}

dnsreport {
menu=DNS Report
$dnsrep = prompt("Enter the domain name you wish to test:");
$dnsrepurl = "http://www.dnsreport.com/tools/dnsreport.ch?domain="; . $dnsrep
open($dnsrepurl)
}


Brian Bruns
http://www.2mbit.com
bruns@2mbit.com

Options: ReplyQuote
Re: Network tools menu
Posted by: ndebord
Date: January 06, 2003 12:50PM

Brian,

I tried to implement your Tools addition to the main menu, but nothing showed up.

I just cut and pasted from your message into menus.cfg and macros.cfg.

Does this require rebar to be enabled?

Tks.

N

Options: ReplyQuote
Re: Network tools menu
Posted by: Brian Bruns
Date: January 06, 2003 03:00PM

*hrms* Good question...

*tests quickly*

Nope, works fine without it.

Ahh, I know what I forgot.

Go into menus.cfg, go down to the section:

Main {
:&File
:&Edit
:&View
:&Go
%ifplugin bookmarks
:&Bookmarks
%endif
%ifplugin favorites
:F&avorites
%endif
%ifplugin hotlist
:Ho&tlist
%endif
%ifplugin layers
:&Layers
%endif
%ifplugin winamp
:Winamp
%endif
%ifplugin weasel
:EMail
%endif
:&Help
bmpmenu()
}

:Tools <---------- Add this line wherever you might the tools menu to show. I put mine between :&Help and bmpmenu()

:&Help
:Tools
bmpmenu()
}


Oh, I always keep the latest version of my additions up at:

http://www.2mbit.com/kmeleon

Going to add a few more tool options in min or two.

Options: ReplyQuote
Re: Network tools menu
Posted by: Brian Bruns
Date: January 06, 2003 03:32PM

Ok, the change I was meaning to do before I posted this, but didn't because I only just now fixed my whois cgi...


Change the following line:

macros(whois_geektools)

to:

macros(whois_2mbit)

And add the following to macros.cfg:

whois_2mbit {
menu=Whois (2mbit)
$whois = prompt("Enter the domain/ip to do a whois on:", "Whois (2mbit)");
$whoisurl = "http://wwwapps.2mbit.com/whois/whois.cgi?domain="; . $whois
open($whoisurl);
}



This basically used the whois cgi script on my personal site - isn't blocked like geektools on some whois servers. You can do a max of 200 queries per day from a specific IP, one query every 30 seconds. This is just to keep people from flooding my server, as this takes a tiny bit of CPU each time its run.


Brian Bruns

Options: ReplyQuote
Re: Network tools menu
Posted by: ndebord
Date: January 09, 2003 01:15PM

Brian,

Thanks that last little : did the trick. Works fine now.

One further question (I'm already very happy with this!).

Accel.cfg. Did you figure out a key to assign to this Tools section?

N

Options: ReplyQuote
Re: Network tools menu
Posted by: Brian Bruns
Date: January 10, 2003 09:27AM

> Accel.cfg. Did you figure out a key to assign to this Tools section?

Theres alot of separate macros, so I didn't assign keystrokes. It should be easy enough to do, the macro listing is below, so just pick out the ones you want to assign keystrokes to.

macros(search_rbcheckcgi)
macros(search_openrbl)
macros(do_traceroute_sjc)
macros(do_traceroute_telstra)
macros(do_traceroute_abovenet)
macros(do_dns_trace)
macros(dnsreport)
macros(search_freshmeat)
macros(whois_2mbit)
macros(netcalc)


So say...

CTRL - I = macros(dnsreport)


I could come up with some key bindings, but since most of them are already in use, they won't make much sense.


bruns@2mbit.com

Options: ReplyQuote
Re: Network tools menu
Posted by: ndebord
Date: January 10, 2003 12:27PM

Brian,

Thanks. Ctrl I will do for now and I do agree there is a shortage of key bindings.

Much appreciated,

N

Options: ReplyQuote
Re: Network tools menu
Posted by: Hugo
Date: January 10, 2003 04:57PM

...I do agree there is a shortage of key bindings....
I have the same problem.
Will the K-Meleon team release a really really big K-Meleon keyboard soon?

Options: ReplyQuote
Re: Network tools menu
Posted by: Brian Bruns
Date: January 11, 2003 06:45AM

I was thinking at one point of something like the numeric keypad you can get for laptops... Replace the keytops with custom ones. Each button do something different - redefine in drivers their scancodes.

Of course, it wouldn't be cheap. smiling smiley

Options: ReplyQuote


K-Meleon forum is powered by Phorum.