Skip to content

Commit

Permalink
Update usage in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Nov 29, 2020
1 parent 4442666 commit fe38dd0
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,89 @@
# SimpleHTTPServer-golang

## Usage

### Help
```
$ ./webserver -help
web subcommand
-bind string
Bind Port (default "8080")
-certificate string
HTTPS certificate : openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365
-gzip
Enables gzip/zlib compression (default true)
-help
Print usage
-key string
HTTPS Key : openssl genrsa -out server.key 2048
-password string
Password for basic auth, default: notsecure (default "notsecure")
-private string
Private folder with basic auth, default /tmp/SimpleHTTPServer-golang/src/bin/private (default "private")
-public string
Default /home/florian/SimpleHTTPServer-golang/src/bin public folder
-root string
Root folder (default "/tmp/SimpleHTTPServer-golang/src/bin")
-tls
Enables HTTPS
-username string
Username for basic auth, default: admin (default "admin")
run subcommand
Usage:
./webserver-linux-amd64 run <binary> <args>
Packaged Binaries:
```

### Web server over HTTP
```
$ ./webserver
Sharing /tmp/ on 8080 ...
Sharing /tmp/private on 8080 ...
```

### Web server over HTTPS
```
$ openssl genrsa -out server.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
..........................................+++++
.................................................................................................................+++++
e is 65537 (0x010001)
$ openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
$ ./webserver web -tls -key server.key -cert server.crt
Sharing /tmp/ on 8080 ...
Sharing /tmp/private on 8080 ...
```

### Web server using private directory
```
$ ./webserver-linux-amd64 web -private ThePrivateFolder -username nodauf -password nodauf
Sharing /tmp/ on 8080 ...
Sharing /tmp/ThePrivateFolder on 8080 ...
```

### Run embedded binary
```
C:/Users/Nodauf>.\webserver.exe run Rubeus.exe kerberoast
```

## Features

* Directory listing
Expand Down

0 comments on commit fe38dd0

Please sign in to comment.