-
Notifications
You must be signed in to change notification settings - Fork 0
/
HACKING
116 lines (87 loc) · 4.04 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
$Id: HACKING 17641 2010-05-23 17:42:44Z luis $
Nmap HACKING
------------
Information for potential Nmap hackers!
Source is provided to Nmap because we believe users have a
right to know exactly what a program is going to do before they run
it. This also allows you to audit the software for security holes
(none have been found so far).
Source code also allows you to port Nmap to new platforms, fix bugs,
and add new features. You are highly encouraged to send your changes
to [email protected] for possible incorporation into the main
distribution. By sending these changes to Fyodor or one of the
Insecure.Org development mailing lists, it is assumed that you are
offering the Nmap Project (Insecure.Com LLC) unlimited, non-exclusive
right to reuse, modify, and relicense the code. This is important
because the inability to relicense code has caused devastating
problems for other Free Software projects (such as KDE and NASM).
Nmap will always be available Open Source. If you wish to specify
special license conditions of your contributions, just say so when you
send them.
Nmap is a community project and has already benefited greatly from
outside contributors (for examples, see the CHANGELOG at
http://nmap.org/changelog.html). Bugfixes, and portability changes
will almost always be accepted. Even if you do not have time to track
down and patch a problem, bug reports are always welcome.
Hackers interested in something more major, such as a new feature, are
encouraged to send a mail describing their plans to
[email protected] . This is a good way to solicit feedback on
your proposals. List members are often very willing to help. You
might want to subscribe to that mailing list as well -- send a blank
email to [email protected] . While you are at it, you
might also want to subscribe to nmap-hackers via the same mechanism.
Web archives of those lists are at http://lists.insecure.org .
Some ideas of useful contributions/projects
-------------------------------------------
Of course, you are welcome to work on whatever suits your fancy. But
here are some ideas of contributions that might be particularly
useful:
o Nmap GUI improvements -- Zenmap is the Nmap GUI. If you have
enhancement ideas, give it a shot! Alternatively, consider
contributing to the NmapGUI and Umit projects available at
http://sourceforge.net/projects/nmapgui/ and
http://umit.sourceforge.net/ , respectively.
One of the best ways to help is to join the nmap-dev list
( http://cgi.insecure.org/mailman/listinfo/nmap-dev ). Requests for
assistance and new Nmap-related projects are often posted there.
How to make code contributions
------------------------------
The preferred mechanism for submitted changes is unified diffs against
the latest development release version of Nmap. Please send them to
To make a unified diff, please follow these instructions:
1. Remove temporary files:
make clean
2. Rename your source tree:
cd ..
mv nmap-5.21 nmap-5.21-snazzy-feature
3. Unpack the original Nmap source alongside it:
tar xzf nmap-5.21.tgz
4. Generate the diffs:
diff -urNb nmap-5.21 nmap-5.21-snazzy-feature > nmap.patch
5. Check the patch and remove any unnecessary patches from the file.
6. If you've added several features, it's best to send them as
several independent patches if you can.
If you have just patched one or two files, then making patches is even
easier. For each file, just do:
cp file.c file.c.orig
[Make changes to file.c ...]
diff -u file.c.orig file.c > file.c.patch
and just send us the patch: file.c.patch.
Style
-----
When contributing new code, we suggest using two-space indents with no
tabs. This is generally the default in emacs, and Vim users can
achieve it by adding rules such as the following to .vimrc:
if getcwd() =~ '/nmap'
set nocindent
set expandtab
set softtabstop=2
set shiftwidth=2
set copyindent
endif
Credits
-------
I got the idea for this HACKING file from GNet
(http://www.gnetlibrary.org/) and followed the
general structure of their HACKING file.