Skip to content

Commit

Permalink
[*]更换包管理模式为gomod,现在更容易部署编译了
Browse files Browse the repository at this point in the history
  • Loading branch information
lcvvvv committed Mar 30, 2021
1 parent 8b07016 commit 1b85b3e
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 265 deletions.
8 changes: 8 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

248 changes: 36 additions & 212 deletions .idea/workspace.xml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions kscan.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
"app/finger"
"app/params"
"app/run"
"app/update"
"lib/slog"
"kscan/src/app/finger"
"kscan/src/app/params"
"kscan/src/app/run"
"kscan/src/app/update"
"kscan/src/lib/slog"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions src/app/config/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package config

import (
"encoding/json"
"lib/misc"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"os"
)

Expand Down
4 changes: 2 additions & 2 deletions src/app/finger/finger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package finger

import (
"encoding/json"
"lib/misc"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"os"
)

Expand Down
4 changes: 2 additions & 2 deletions src/app/params/check.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package params

import (
"lib/misc"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"os"
"regexp"
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/params/params.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package params

import (
"app/config"
"flag"
"fmt"
"kscan/src/app/config"
"os"
"strings"
)
Expand Down
10 changes: 5 additions & 5 deletions src/app/params/serialization.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package params

import (
"app/config"
"lib/IP"
"lib/misc"
"lib/slog"
"lib/urlparse"
"kscan/src/app/config"
"kscan/src/lib/IP"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"kscan/src/lib/urlparse"
"regexp"
"strings"
)
Expand Down
10 changes: 5 additions & 5 deletions src/app/run/run.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package run

import (
"app/params"
"fmt"
"lib/misc"
"lib/port"
"lib/queue"
"lib/slog"
"kscan/src/app/params"
"kscan/src/lib/misc"
"kscan/src/lib/port"
"kscan/src/lib/queue"
"kscan/src/lib/slog"
"sync"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions src/app/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package update

import (
"bufio"
"lib/misc"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/IP/IP.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package IP

import (
"errors"
"lib/misc"
"kscan/src/lib/misc"
"regexp"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/net/port/port.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package port

import (
"lib/misc"
"kscan/src/lib/misc"
)

type (
Expand Down
16 changes: 8 additions & 8 deletions src/lib/port/banner.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package port

import (
"app/config"
"app/finger"
"app/params"
"errors"
"fmt"
"github.com/PuerkitoBio/goquery"
"io/ioutil"
"lib/iconhash"
"lib/misc"
"lib/shttp"
"lib/slog"
"lib/urlparse"
"kscan/src/app/config"
"kscan/src/app/finger"
"kscan/src/app/params"
"kscan/src/lib/iconhash"
"kscan/src/lib/misc"
"kscan/src/lib/shttp"
"kscan/src/lib/slog"
"kscan/src/lib/urlparse"
"math/rand"
"net"
"net/http"
Expand Down
8 changes: 4 additions & 4 deletions src/lib/scan/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package scan

import (
"errors"
"lib/net/port"
"lib/net/stcp"
"lib/net/stls"
"lib/slog"
"kscan/src/lib/net/port"
"kscan/src/lib/net/stcp"
"kscan/src/lib/net/stls"
"kscan/src/lib/slog"
"regexp"
"time"
)
Expand Down
6 changes: 3 additions & 3 deletions src/lib/scan/probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package scan
import (
"errors"
"fmt"
"lib/misc"
"lib/net/port"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/net/port"
"kscan/src/lib/slog"
"os"
"regexp"
"strings"
Expand Down
8 changes: 4 additions & 4 deletions src/lib/shttp/shttp.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package shttp

import (
"app/config"
"app/params"
"bytes"
"crypto/tls"
"errors"
"fmt"
"golang.org/x/text/encoding/simplifiedchinese"
"io"
"io/ioutil"
"lib/misc"
"lib/slog"
"kscan/src/app/config"
"kscan/src/app/params"
"kscan/src/lib/misc"
"kscan/src/lib/slog"
"math/rand"
"net/http"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/slog/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"
"io/ioutil"
"lib/misc"
"kscan/src/lib/misc"
"log"
"os"
"runtime"
Expand Down
8 changes: 4 additions & 4 deletions src/lib/urlparse/urlparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (
"regexp"
)

type url struct {
type Url struct {
Scheme, Host, Port, Path string
}

func Load(s string) (url, error) {
func Load(s string) (Url, error) {
r := regexp.MustCompile("^(?:(http|https)://)?([A-Za-z0-9.\\-]+(?:\\.[A-Za-z0-9.\\-]+))(?::(\\d+))?(/*[\\w/%]*)?$")
o := r.FindStringSubmatch(s)
if len(o) != 5 {
return url{}, errors.New("URL格式不正确")
return Url{}, errors.New("URL格式不正确")
}
if o[3] == "" {
switch o[1] {
Expand All @@ -23,7 +23,7 @@ func Load(s string) (url, error) {
o[3] = "80"
}
}
return url{
return Url{
Scheme: o[1],
Host: o[2],
Port: o[3],
Expand Down
6 changes: 3 additions & 3 deletions test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"lib/misc"
"lib/scan"
"lib/slog"
"kscan/src/lib/misc"
"kscan/src/lib/scan"
"kscan/src/lib/slog"
)

//func main() {
Expand Down

0 comments on commit 1b85b3e

Please sign in to comment.