-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add README, Makefile .github
- Loading branch information
Showing
6 changed files
with
158 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: release binaries | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release-binaries: | ||
name: release binaries linux/windows/android | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [linux, windows, android] | ||
goarch: ["386", amd64, arm64] | ||
exclude: | ||
- goarch: 386 | ||
goos: android | ||
- goarch: amd64 | ||
goos: android | ||
- goarch: arm64 | ||
goos: windows | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: "1.19" | ||
ldflags: "-w -s" | ||
md5sum: FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build: | ||
go build -ldflags="-w -s" | ||
|
||
install: | ||
mv xenv /usr/bin/xenv | ||
|
||
termux-install: | ||
mv xenv /data/data/com.termux/files/usr/bin/xenv | ||
|
||
all: build install | ||
|
||
termux-all: build termux-install | ||
|
||
clean: | ||
rm -f xenv /usr/bin/xenv | ||
|
||
termux-clean: | ||
rm -f xenv /data/data/com.termux/files/usr/bin/xenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# X-ENV | ||
|
||
 | ||
|
||
Scan for exposed env file. | ||
|
||
## Usage: | ||
|
||
``` | ||
-h, --help Show this help | ||
-t, --thread=NBR Number of threads (default 50) | ||
-o, --output=FILE Output file (default found_env.txt) | ||
-i, --input=FILE Input file | ||
-e, --env-path=ENV Env Path (comma separated) | ||
-k, --insecure Ignore certificate errors | ||
-u, --user-agent=USR Set user agent | ||
-p, --proxy=PROXY Use proxy (proto://ip:port) | ||
-V, --version Print version and exit | ||
``` | ||
|
||
**[!] note:** `-e|--env-path` souldn't have space and must start with `/`. | ||
|
||
By default it only scan for "/.env", but most common path are: | ||
|
||
- /.env | ||
- /api/.env | ||
- /core/.env | ||
- /admin/.env | ||
- /local/.env | ||
- /docker/.env | ||
- etc... | ||
|
||
|
||
## Examples: | ||
|
||
```sh | ||
$ xenv -i top-alexa.txt | ||
$ xenv -i top-alexa.txt -k -e "/.env,/api/.env,/core/.env" | ||
$ xenv -p socks5://127.0.0.1:9050 -o good.txt -i top-alexa.txt -t 60 | ||
``` | ||
|
||
**Example of input file:** | ||
|
||
``` | ||
google.com | ||
github.com | ||
domain.com/code | ||
``` | ||
|
||
**note:** domain in list shouldn't have protocol in them: | ||
|
||
|
||
```go | ||
req, err := http.NewRequest("GET", "https://"+url+"/.env/", nil) | ||
``` | ||
|
||
|
||
#### WARNING | ||
|
||
Do not use too much threads or you will DOS yourself. | ||
|
||
|
||
## Install: | ||
|
||
With one liner if **$GOROOT/bin/** is in **$PATH**: | ||
|
||
```sh | ||
go install github.com/mmpx12/xenv@latest | ||
``` | ||
|
||
or from source with: | ||
|
||
```sh | ||
git clone https://github.com/mmpx12/xenv.git | ||
cd xenv | ||
make | ||
sudo make install | ||
# or | ||
sudo make all | ||
``` | ||
|
||
for **termux** you can do: | ||
|
||
```sh | ||
git clone https://github.com/mmpx12/xenv.git | ||
cd xenv | ||
make | ||
make termux-install | ||
# or | ||
make termux-all | ||
``` | ||
|
||
|
||
There is also prebuild binaries [here](https://github.com/mmpx12/xenv/releases/latest). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module xenv | ||
module github.com/mmpx12/xenv | ||
|
||
go 1.19 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters