I create these programs as experiments to play with golang, or to solve problems for myself. I would gladly accept pointers from others to improve, simplify, or make the code more efficient. If you would like to make any comments then please feel free to email me at mailong9527@163.com
- ftpserver: supports you to deploy an ftp server for sharing filedata
gmd ftpserver -u mailong -p 123 -P 9090 -h 127.0.0.1
- Httpserver: deploy a http server to share some files in a given floder.
gmd httpserver -h 127.0.0.1 -p 8080
- request [get]
gmd request -u http://127.0.0.1:8888/api/base/ping
- request [post]
gmd request -u http://127.0.0.1:8888/api/base/login - d '{\"username\": \"admin\", \"password\": \"VjjxGSQvPTt+9tnQHo7Vo+cVpW\"}'
- shell: support you to use gmd exec scriptfile includind python\shell\powershell etc on the local-machine.
go run .\main.go shell -f test.ps1 -d "." -t 10
- exec: supports you to exec command on windows or linux platform,such as:
gmd exec -c hostname
- ip: supports you to search ip of the local machine
gmd ip
- color: suports you to select one color to decalate your message:
gmd color -m "message" -c color
- uuid: generate a uuid string randomly.
gmd uuid
- randint: generate one number between a given interval.
gmd randint -r 10:40
- md5: support generate md5 value of one string or file content.
gmd md5 -s "string" || gmd md5 -f filename
- cut: support get sub string from a given string.
gmd cut -s "abcdefgf" -p "2:5"
- split: support split one string with given "separator".
echo "hello world" | gmd split -s " "
- replace: support replace old string with given substring.
gmd replace -s worldhello -n FUCK -o world
- match: support find out substring which satisfy regex.
gmd match -s "hell(i)45oworld" -m "[\d+]+" -o "i";
- pq:
gmd pq -m html -f xxx.html
- telnet:
gmd telnet -h 8.8.8.8:53 -t 5
- keys:
echo '{"aa": "bb", "test": "hello world"}' | gmd keys
- len:
echo "aabbcc" | gmd len or echo '{"key1": "val1", "key2": "val2"}' | gmd len
- kvs:
echo [k1, k2, k3] | gmd kvs || echo '{"k1": "v1", "k2": "v2"}' | gmd kvs
- join:
echo '["aa", "bb", "cc"]' | gmd join -s "-" -w "GG"
- json_val:
echo '{"tt":"helloworld", "bb": "fufu"}' | gmd json_val
- jq:
echo '{"tt":"helloworld", "bb": "fufu"}' | gmd jq
- sqlite3:
gmd sqlite -s sql -f filename -t tablename
gmd jf -c * -w "condition" --limit 10
- info: output information about gmd including version, server info and etc. you can use bellow command:
gmd info