Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added debian directory #94

Merged
merged 4 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ go.work.sum

builds
build
releases
tst

# Personal files
Expand All @@ -46,8 +47,6 @@ old/
.csv
.json
.html


/main


Expand All @@ -70,3 +69,5 @@ debhelper-build-stamp
/tutorial-1/packageroot/usr
*.mmdb
/domains
/obj-x86_64-linux-gnu
**/src
28 changes: 15 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GODOC=$(GOCMD)doc
GODOC=$(GOCMD) doc
BDIR=build
$(shell mkdir -p $(BDIR))
BINARY_NAME=urlinsane
VERSION=$(shell grep -e 'VERSION = ".*"' internal/version.go | cut -d= -f2 | sed s/[[:space:]]*\"//g)

.PHONY: help version build install deps test clean doc
.PHONY: help version build install dpkg deps test clean doc



Expand All @@ -20,31 +21,28 @@ version: ## Returns the version number
@echo $(VERSION)


build: deps ## Build the binaries for Windows, OSX, and Linux
mkdir -p $(BDIR)
$(GOBUILD) -C cmd -o ../$(BDIR)/$(BINARY_NAME) -v
env GOOS=darwin GOARCH=amd64 $(GOBUILD) -C cmd -o ../$(BDIR)/$(BINARY_NAME)-$(VERSION)-darwin-amd64 -v
release: deps ## Build the binaries for Windows, OSX, and Linux
env GOOS=darwin GOARCH=amd64 $(GOBUILD) -C cmd/$(BINARY_NAME) -o ../../$(BDIR)/$(BINARY_NAME)-$(VERSION)-darwin-amd64 -v
sha512sum $(BDIR)/$(BINARY_NAME)-$(VERSION)-darwin-amd64 > $(BDIR)/$(BINARY_NAME)-$(VERSION)-darwin-amd64.sha512

env GOOS=linux GOARCH=amd64 $(GOBUILD) -C cmd -o ../$(BDIR)/$(BINARY_NAME)-$(VERSION)-linux-amd64 -v
env GOOS=linux GOARCH=amd64 $(GOBUILD) -C cmd/$(BINARY_NAME) -o ../../$(BDIR)/$(BINARY_NAME)-$(VERSION)-linux-amd64 -v
sha512sum $(BDIR)/$(BINARY_NAME)-$(VERSION)-linux-amd64 > $(BDIR)/$(BINARY_NAME)-$(VERSION)-linux-amd64.sha512

env GOOS=windows GOARCH=amd64 $(GOBUILD) -C cmd -o ../$(BDIR)/$(BINARY_NAME)-$(VERSION)-windows-amd64.exe -v
env GOOS=windows GOARCH=amd64 $(GOBUILD) -C cmd/$(BINARY_NAME) -o ../../$(BDIR)/$(BINARY_NAME)-$(VERSION)-windows-amd64.exe -v
sha512sum $(BDIR)/$(BINARY_NAME)-$(VERSION)-windows-amd64.exe > $(BDIR)/$(BINARY_NAME)-$(VERSION)-windows-amd64.exe.sha512

build: deps ## Build the binary
$(GOBUILD) -C cmd/$(BINARY_NAME) -o ../../$(BDIR)/$(BINARY_NAME)

install: deps ## Install the binaries in Linux
@mkdir -p $(BDIR)
$(GOBUILD) -C cmd -o ../$(BDIR)/$(BINARY_NAME)
install: build ## Install the binaries in Linux
@chmod +x $(BDIR)/$(BINARY_NAME)
@sudo mv $(BDIR)/$(BINARY_NAME) /usr/local/bin/


deps: ## Install dependencies
$(GOGET) ./...

test: deps ## Run unit test
$(GOTEST) -v ./...
go test -v ./internal/... ./cmd/... ./pkg/...

clean: ## Remove files build files
$(GOCLEAN)
Expand All @@ -55,3 +53,7 @@ doc: ## Go documentation

update: ## Update data files
bash scripts/update.sh

dpkg: ## Build debian package
# dpkg-buildpackage -b -rfakeroot -us -uc
debuild -us -uc
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
urlinsane (0.8.2) UNRELEASED; urgency=medium

* Fixed some issues with getting the total record count and setting the live flag

-- Rangertaha <[email protected]> Wed, 09 Dec 2024 11:08:06 +0200
17 changes: 17 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: urlinsane
Section: utils
Priority: optional
Maintainer: Rangertaha <[email protected]>
Build-Depends: debhelper-compat (= 12), golang-go, dh-golang
Standards-Version: 4.6.2
Homepage: https://rangertaha.github.io/urlinsane
Vcs-Browser: https://github.com/rangertaha/urlinsane
Vcs-Git: https://github.com/rangertaha/urlinsane.git
XS-Go-Import-Path: github.com/rangertaha/urlinsane

Package: urlinsane
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
# Built-Using: ${misc:Built-Using}
Description: Typosquatting OSINT investigations
Generates domain typos and variations used to detect and perform typo squatting, URL hijacking, phishing, and corporate espionage. Inspired by URLCrazy I wanted to create a better version that supported multiple languages and linguistic typos. I also wanted it to be a binary with fast execution time.
27 changes: 27 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: urlinsane
Source: https://github.com/rangertaha/urlinsane

Files: *
Copyright: 2018-2024 Rangertaha
License: GPL-3+

Files: debian/*
Copyright: 2018-2024 Rangertaha <[email protected]>
License: GPL-3+

License: GPL-3+
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 License
can be found in "/usr/share/common-licenses/Apache-2.0".
10 changes: 10 additions & 0 deletions debian/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# [DEFAULT]
# debian-branch = kali/master
# debian-tag = kali/%(version)s
# pristine-tar = True

# [pq]
# patch-numbers = False

# [dch]
# multimaint-merge = True
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/bin/urlinsane
2 changes: 2 additions & 0 deletions debian/kali-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- https://gitlab.com/kalilinux/tools/kali-ci-pipeline/raw/master/recipes/kali.yml
10 changes: 10 additions & 0 deletions debian/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# spelling errors can't be fixed
spelling-error-in-binary YuR Your [usr/bin/urlinsane]
spelling-error-in-binary allready already [usr/bin/urlinsane]
spelling-error-in-binary lon long [usr/bin/urlinsane]
spelling-error-in-binary nEAd need [usr/bin/urlinsane]
spelling-error-in-binary octects octets [usr/bin/urlinsane]
spelling-error-in-binary securtiy security [usr/bin/urlinsane]
spelling-error-in-binary singed signed [usr/bin/urlinsane]
spelling-error-in-binary wTH with [usr/bin/urlinsane]
spelling-error-in-binary whE when [usr/bin/urlinsane]
44 changes: 44 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/make -f

# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


# export GOCACHE=$(CURDIR)/build
# export GOPATH=$(CURDIR)/build

%:
dh $@ --buildsystem=golang

# override_dh_auto_build:
# go install -C ./cmd/urlinsane -buildvcs=false
# go build -o debian/usr/bin/urlinsane ./cmd/urlinsane

override_dh_golang:
go install -C ./cmd/urlinsane -buildvcs=false
go build -o debian/usr/bin/urlinsane ./cmd/urlinsane

# override_dh_dwz:
# echo
# # https://lists.debian.org/debian-devel/2019/07/msg00162.html
# # don't run dh_dwz, it fails with
# # dwz: debian/urlinsane/usr/bin/urlinsane: Found compressed .debug_abbrev section, not attempting dwz compression
# # dh_dwz: error: dwz -- debian/urlinsane/usr/bin/urlinsane returned exit code 1
# # dh_dwz: error: Aborting due to earlier error


# override_dh_auto_test:
# don't run test, it fails with
# "build/pkg/mod/github.com/go-kit/[email protected]/metrics/influx/influx.go:10:2:
# unknown import path "github.com/influxdata/influxdb1-client/v2":
# cannot find module providing package
# github.com/influxdata/influxdb1-client/v2"
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
Binary file added debian/urlinsane
Binary file not shown.
4 changes: 4 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%urlinsane-$1.tar.gz%" \
https://github.com/rangertaha/urlinsane/archive/refs/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require github.com/gocolly/colly/v2 v2.1.0
require (
github.com/bobesa/go-domain-util v0.0.0-20190911083921-4033b5f7dd89
github.com/chromedp/chromedp v0.11.1
github.com/dgraph-io/badger/v4 v4.3.1
github.com/dgraph-io/badger/v4 v4.2.0
github.com/glaslos/ssdeep v0.4.0
github.com/jedib0t/go-pretty/v6 v6.6.1
github.com/rainycape/geoip v0.0.0-20170217195415-79e9946b7c4c
Expand All @@ -31,7 +31,7 @@ require (
github.com/chromedp/sysutil v1.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgraph-io/ristretto v1.0.0 // indirect
github.com/dgraph-io/ristretto v0.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
Expand All @@ -40,6 +40,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs=
github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak=
github.com/dgraph-io/badger/v4 v4.3.1 h1:7r5wKqmoRpGgSxqa0S/nGdpOpvvzuREGPLSua73C8tw=
github.com/dgraph-io/badger/v4 v4.3.1/go.mod h1:oObz97DImXpd6O/Dt8BqdKLLTDmEmarAimo72VV5whQ=
github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE=
github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU=
github.com/dgraph-io/ristretto v1.0.0 h1:SYG07bONKMlFDUYu5pEu3DGAh8c2OFNzKm6G9J4Si84=
github.com/dgraph-io/ristretto v1.0.0/go.mod h1:jTi2FiYEhQ1NsMmA7DeBykizjOuY88NhKBkepyu1jPc=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
Expand Down Expand Up @@ -82,6 +86,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI=
github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down
Loading