Skip to content

Commit

Permalink
Other supplementary improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhade3 committed Sep 23, 2022
1 parent dd04dea commit d2afdc3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can download the pre-built binaries from the [releases](https://github.com/u

urlhunter requires 3 parameters to run: `-keywords`, `-date` and `-o`.

For example: `urlhunter -keywords keywords.txt -date 2020-11-20 -o out.txt`
For example: `urlhunter --keywords keywords.txt --date 2020-11-20 --o out.txt`

### --keywords

Expand Down
16 changes: 0 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var err error
var archivesPath string

func main() {

var keywordFile string
var dateParam string
var outFile string
Expand Down Expand Up @@ -227,7 +226,6 @@ func getArchive(body []byte, date string, keywordFile string, outfile string) {
}

func searchFile(fileLocation string, keyword string, outfile string) {

var path string

if strings.HasPrefix(fileLocation, "archives") {
Expand Down Expand Up @@ -384,20 +382,6 @@ func downloadFile(url string) {
color.Green("Download Finished!")
}

func ByteCountSI(b int64) string {
const unit = 1000
if b < unit {
return fmt.Sprintf("%d B", b)
}
div, exp := int64(unit), 0
for n := b / unit; n >= unit; n /= unit {
div *= unit
exp++
}
return fmt.Sprintf("%.1f %cB",
float64(b)/float64(div), "kMGTPE"[exp])
}

func Unzip(src string, dest string) ([]string, error) {
var filenames []string
r, err := zip.OpenReader(src)
Expand Down

0 comments on commit d2afdc3

Please sign in to comment.