Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:




nmap-dev logo Nmap Development mailing list archives

Re: [Lua snippit] print_hex
From: Ron <ron () skullsecurity net>
Date: Sun, 07 Sep 2008 22:51:32 -0500

Kris Katterjohn wrote:
Patrick Donnelly wrote:
I'm pretty sure Brandon, I and others have brought this up in the past, but it
would be awesome to have a "Best Practices" section (short is fine) in the
Nmap docs/book somewhere on Lua coding, and any gotchas that could get us who
come from many other languages (I think most people here learned Lua solely
for NSE... I know I did).  I know Brandon recently posted a link on learning
Lua from a Perl background, but I've never been much of a Perl guy.

I agree that a best practices or style guide of some kind would be
handy. While writing a script, there were a few times when I wasn't sure
what the proper style was. Here are some thoughts I had while I was writing:
- Tab indenting or spaces? If spaces, how many?
- Should there be a maximum line length?
- Is it better to use, for example, str:len() or string.length(str)?
When is one preferred?

Among other things.

Thankfully, Lua doesn't have braces so I don't have to be upset at
people who put their braces in the clearly wrong place (you know where
they ought to be)! :)

Ron

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]