first commit - dnsrecon - DNS reconnaissance tool written in golang, kinda scuffed.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit a90375f8faab3f276fe4548aecf359898487dd74
(HTM) Author: Jay Scott <me@jay.scot>
Date: Wed, 21 Sep 2016 16:56:13 +0100
first commit
Diffstat:
A main.go | 64 +++++++++++++++++++++++++++++++
A static/css/app.css | 6 ++++++
A static/favicon.ico | 0
A templates/layout.html | 27 +++++++++++++++++++++++++++
A templates/main.html | 9 +++++++++
A templates/scan.html | 7 +++++++
6 files changed, 113 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/main.go b/main.go
@@ -0,0 +1,64 @@
+package main
+
+import (
+ "fmt"
+
+ "github.com/kataras/go-template/html"
+ "github.com/kataras/iris"
+)
+
+type data struct {
+ Title string
+ Domain string
+}
+
+// Target - the target domain to scan.
+type Target struct {
+ Domain string
+}
+
+func main() {
+
+ // default template
+ iris.UseTemplate(html.New(html.Config{
+ Layout: "layout.html",
+ }))
+
+ // assets
+ iris.StaticWeb("/static", "./static", 1)
+ iris.Favicon("./static/favicon.ico")
+
+ // main page
+ iris.Get("/", func(ctx *iris.Context) {
+ ctx.Render("main.html", nil)
+ })
+
+ iris.OnError(iris.StatusInternalServerError, func(ctx *iris.Context) {
+ iris.Logger.Printf("http status: 500 happened!")
+ ctx.RedirectTo("/")
+ })
+
+ iris.OnError(iris.StatusNotFound, func(ctx *iris.Context) {
+ iris.Logger.Printf("http status: 404 happened!")
+ ctx.RedirectTo("/")
+ })
+
+ // display results of scan
+ iris.Get("/results/:id", func(ctx *iris.Context) {
+ id := ctx.Param("id")
+ ctx.Render("scan.html", data{"Results", id})
+ })
+
+ // get the form data & start scan
+ iris.Post("/start_scan", func(ctx *iris.Context) {
+ target := Target{}
+ err := ctx.ReadForm(&target)
+ if err != nil {
+ fmt.Println("Form Error : " + err.Error())
+ ctx.RedirectTo("/")
+ }
+ ctx.Redirect("/results/" + string(ctx.FormValue("Domain")))
+ })
+
+ iris.Listen(":3001")
+}
(DIR) diff --git a/static/css/app.css b/static/css/app.css
@@ -0,0 +1,6 @@
+.centered {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
(DIR) diff --git a/static/favicon.ico b/static/favicon.ico
Binary files differ.
(DIR) diff --git a/templates/layout.html b/templates/layout.html
@@ -0,0 +1,27 @@
+<!-- ./templates/layout.html -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="">
+ <meta name="author" content="Beardyjay">
+
+ <link rel="stylesheet" href="static/css/app.css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
+
+ <title>{{ .Title }}</title>
+ </head>
+
+ <body>
+
+ <div class="container">
+
+ {{ yield }}
+
+ </div> <!-- /container -->
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
+ </body>
+</html>
(DIR) diff --git a/templates/main.html b/templates/main.html
@@ -0,0 +1,9 @@
+ <div class="centered">
+ <form role="form" action="/start_scan" method="post" >
+ <div class="form-group">
+ <label for="domain">Enter domain name</label>
+ <input name="Domain" type="text" placeholder="Domain" class="form-control">
+ </div>
+ <button type="submit" class="btn btn-default">Start Recon</button>
+ </form>
+</div>
(DIR) diff --git a/templates/scan.html b/templates/scan.html
@@ -0,0 +1,7 @@
+<div class="jumbotron">
+ <h3>Results for {{ .Domain }}</h3>
+</div>
+
+<p class="alert alert-info" role="alert"></p>
+
+<input id="status-input" class="form-control" />