diff options
author | login | 2021-10-17 16:25:53 +0000 |
---|---|---|
committer | login | 2021-10-17 16:25:53 +0000 |
commit | b0de38eafe7fe897f907066dc1ef923073690d5d (patch) | |
tree | 7abbf3ee84417762fadbc7493e0ff119aeba3e9d /utils/mtc | |
parent | bd53b1ec0cf20e79828e8e95576a44f1eaf004db (diff) |
pcoin_keys fixed
Thanks to ~jmjl, I was able to find that pcoin_keys didn't work. To fix it, tcoin uses sneaky magic but with stdin isntead of an argument, and a new library imported called popen2, that lets me send both stdin and receive stdout, to successfully get "ls <path to the pcoin_keys directory>" to work (it execl's another instance of the tcoin comand so that it runs under setuid instead of as the original user who ran it.
Diffstat (limited to 'utils/mtc')
-rwxr-xr-x | utils/mtc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/mtc b/utils/mtc new file mode 100755 index 0000000..ba14d90 --- /dev/null +++ b/utils/mtc @@ -0,0 +1,4 @@ +#!/bin/bash +#Message Tcoin Converter +(/bin/echo;/bin/cat "$1") | /home/login/bin/message-tcoin-converter.awk - | /bin/sed -e 'H;${x;s/\n\n/\t/g;p;};d' | /usr/bin/awk -F'\t' -v OFS='\t' '$1 {cmd="/bin/date -d \""$1"\" +%s"; cmd | getline $1; close(cmd)} 1' - + |