-
Notifications
You must be signed in to change notification settings - Fork 10
Getting Started
Over the years I've used numerous tools to navigate around code including IDEs, text editors and source navigators such as Source Insight and Slick Edit. None of them really met my way of working when it came to doing code audits.
In my experience search plays a bigger role than in most IDEs, text editors. At times you want to have the same file open at multiple spots (yes Notepad++ can do this via its 'Other view' functionality). You also take a bazillion notes. So basically it was an itch to scratch to make a tool which satisfied the way I worked when doing code audits.
Code Navi was designed to sit between a formal IDE such as Visual Studio and Eclipse where you have a fully functional project and the generic text editor such as Notepad++/Ultraedit.
When you first run NCC Code Navi you will be presented with a screen similar to:
We'll now walk through each of the toolbar icons.
The code path allows you to type in paths with auto-completion to limit the session to this directory and its sub directories. NCN will remember the last 20 supplies paths which are accessible from the drop down menu. If the path is red it does not exist, if it's green your good to go.
The two buttons perform the following actions:
- Folder: allows you to select the folder by browsing
- Target: open a file browser window starting in this the specified path
Search is (obviously) what you want to search for. As with the code path the last 20 search terms are remembered and available via the drop down dialogue box. To perform a search you can start via one two ways:
- Press enter is the search text dialogue box
- Click the magnifying glass icon
IMPORTANT If you searching for things such as ( and * which have meanings in the context of a regular expression it must be escaped (see the example later).
The extensions to limit the search to. The buttons next to the search perform the following actions
- Tick: Add this extension definition to the remembers list
- No entry: Delete this extension definition from the members list
- List: Reset the remembered extensions definitions to the default inbuilt set
The options menu icon.
This is pretty self explanatory:
Grepify the name of a previously released tool which uses define regexes for interesting security impacting code or comments. These profiles are stored relative to the NCN binary in:
- .\Grepify.Profiles
The two icons have the following functions:
- Matrix: Start scan
- List: List available Grepify profiles and select which to use
Used to rearrange the child windows currently displayed.
We're going use the file browser to open a file we're interested in.
First we will specify a file path with the . extension and select the Target icon:
Now we've found a file we will choose to open it in a dedicated code viewer window:
We're now going to search for a term we're interested in.
First we specify the extensions we're interested in:
Next we specify the term we want to search for and click the magnifying glass.
IMPORTANT as previously discussed we need to escape the ( in the function name as we have 'Regex Search' enabled in the options.
We see we are presented with a Search Results window. We can now either:
- Press 'enter' to open the selected files in Code View windows.
- Double-click to open the selected files in Code View windows.
- Right-click to gain access to the content menu
We do this and select 'Open file'
We next see the Code View Window in here we can navigate through the code. We can multiple copies of the same file open if we wish to navigate different parts simultaneously.
In the code view we can select a word and press 'Enter' to search for that selection across the code or we can righ-click to gain access to the context meny.
If we select part of the code we now see a new context menu: