Commit 017a1ba8 authored by dmknght's avatar dmknght

Add help and connection

parent b95730e3
Pipeline #1134 failed
# This is just an example to get you started. A typical binary package
# uses this file as the main entry point of the application.
# TODO handle `/` at end of branch
when isMainModule:
echo("Hello, World!")
......@@ -2,8 +2,15 @@
import utils
proc fastHelp*() =
echo "DirbNim - A modern URL bruteforcing tool"
echo "Author: Nong Hoang \"dmknght\" Tu <dmknght@parrotsec.org>"
echo "URL: https://nest.parrotsec.org/dmknght/dirbnim"
echo "Usage: dirbnim <URL> [Options]"
proc helpBanner*() =
# let appName = getAppFileName()
showHelpCmd(keyword = "-w", value = "<path_to_wordlist>", descr = "Define custom wordlist")
showHelpCmd(keyword = "-a", value = "<browser agent>", descr = "Custom user-agent")
showHelpCmd(keyword = "-c", value = "<cookie>", descr = "Custom HTTP cookie")
\ No newline at end of file
showHelpCmd(keyword = "-c", value = "<cookie>", descr = "Custom HTTP cookie")
......@@ -42,3 +42,10 @@ proc prntWarn*(reason: string, descr = "") =
msg &= "[\e[36m" & descr & "\e[0m] " # cyan
msg &= reason
echo msg
proc prntFound*(status, url: string) =
# TODO color here
stdout.eraseLine()
stdout.flushFile()
echo "[" & status & "] [" & url & "]"
import httpclient
import strutils
import .. / cli / utils
proc checkBranch*(client: HttpClient, subPath, fullURL: string) =
if not isEmptyOrWhitespace(subPath):
progressBar(subPath)
# TODO use a callback function instead of cli
let resp = client.get(fullURL)
if resp.status != "404 Not Found":
# TODO use a callback function instead of cli
prntFound(resp.status, fullURL)
# TODO do a sub branch append for later scan
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment