Created
July 8, 2022 19:21
-
-
Save speters/43a23e201ce8693bb0e1e8d878874fbf to your computer and use it in GitHub Desktop.
A simple candump to yacht devices canview converter using netcat and some sed
This file contains hidden or 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
candump -t A can0 | sed -e 's/ (.* \(.*\)\.\(...\).*) *can. *\([0-9A-F]*\) *\[.*\] */\1.\2 R \3 /g' -e 's/[\r\n]*$/\r/' | nc -l -p 1457 2>&1 | sed -u -n -e 's/^\([^ ]*\) /\1#/g;s/ //g;s/\r//g;/^$/!p;' | while IFS="" read CMD ; do cansend can0 $CMD ; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does not report back that command has been sent, maybe convert to using exec filedescriptor redirection or some more elaborate script in Python...