Giter Site home page Giter Site logo

go-webvuln's Introduction

脆弱なウェブアプリケーションのサンプル for Go

Go 言語による、基本的なウェブアプリケーションセキュリティの学習用サンプルアプリケーションです。

動作要件

  • Go 1.10.x 以上
  • GCC
    • 依存している cgo パッケージのインストールのため

これらの動作要件を満たせない場合、 Docker イメージを用いることもできます。その場合は Docker をインストールしている必要があります。

インストール、実行手順

以下のどちらかの手順を選択してください。

本アプリを直接ローカルで実行する場合

以下のようにしてインストールをおこなってください。

$ go get github.com/co3k/go-webvuln
$ cd `go env GOPATH`/src/github.com/co3k/go-webvuln
$ make install

その後、以下のコマンドを実行してください。

$ make server

Starting up the server と表示されれば成功です。ブラウザ (Edge, Firefox, Chrome, Safari の最新安定版を推奨します) で http://localhost:8000/ を開いてください。

本アプリを Docker 経由で実行する場合

Go 公式の Docker イメージを利用しています。

以下のようにしてインストールをおこなってください。

$ go get github.com/co3k/go-webvuln
$ cd `go env GOPATH`/src/github.com/co3k/go-webvuln
$ docker build -t go-webvuln .

その後、以下のコマンドを実行してください。

$ docker-compose up

Starting up the server と表示されれば成功です。ブラウザ (Edge, Firefox, Chrome, Safari の最新安定版を推奨します) で http://localhost:8000/ を開いてください。

go-webvuln's People

Contributors

co3k avatar saxsir avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

go-webvuln's Issues

docker imageをビルドできない

https://github.com/co3k/go-webvuln/blob/master/README.md#%E6%9C%AC%E3%82%A2%E3%83%97%E3%83%AA%E3%82%92-docker-%E7%B5%8C%E7%94%B1%E3%81%A7%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88

に記載されている手順の実行結果。

~/src/github.com/co3k/go-webvuln on  master ⌚ 17:23:02
$ docker images -a | grep golang

~/src/github.com/co3k/go-webvuln on  master ⌚ 17:23:17
$ docker build -t go-webvuln .
Sending build context to Docker daemon  685.1kB
Step 1/2 : FROM golang:onbuild
onbuild: Pulling from library/golang
ad74af05f5a2: Pull complete
2b032b8bbe8b: Pull complete
a9a5b35f6ead: Pull complete
25d9840c55bc: Pull complete
d792ec7d64a3: Pull complete
be556a93c22e: Pull complete
3a5fce283a1e: Pull complete
0621865a0c2e: Pull complete
Digest: sha256:c0ec19d49014d604e4f62266afd490016b11ceec103f0b7ef44875801ef93f36
Status: Downloaded newer image for golang:onbuild
# Executing 3 build triggers
 ---> Running in 66bb9f0d7100
+ exec go get -v -d
github.com/co3k/go-webvuln (download)
github.com/mattn/go-sqlite3 (download)
Fetching https://golang.org/x/crypto/scrypt?go-get=1
Parsing meta tags from https://golang.org/x/crypto/scrypt?go-get=1 (status code 200)
get "golang.org/x/crypto/scrypt": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/scrypt?go-get=1
get "golang.org/x/crypto/scrypt": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)
github.com/gorilla/mux (download)
The command '/bin/sh -c go-wrapper download' returned a non-zero code: 1
~/src/github.com/co3k/go-webvuln on  master ⌚ 17:24:26
$ g rev-parse HEAD
604751cf7e480f0d18a9b6477e3d273fdfb8e10b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.