sohotcall

Signal CLI

Jan 13th, 2021 (edited)
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (from https://medium.com/digital-forensics-deep-learning-and-dev/simple-signal-bot-6ce841c7982e)
  2.  
  3. Download newest tar.gz release from https://github.com/AsamK/signal-cli/releases
  4. $ cd ~
  5. $ wget https://github.com/AsamK/signal-cli/releases/download/v0.7.2/signal-cli-0.7.2.tar.gz
  6.  
  7. Extract
  8. $ tar -vzxf signal-cli-0.7.2.tar.gz
  9. $ mv signal-cli-0.7.2 signal-cli
  10.  
  11. Enter
  12. $ cd ~/signal-cli/bin
  13.  
  14. ///////
  15. Install Java
  16. $ sudo apt update
  17. $ sudo apt install default-jdk
  18.  
  19. Alternatively, if your OS only give you old java version by default like me, use:
  20. $ sudo apt-get install dirmngr
  21. $ echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main" | sudo tee /etc/apt/sources.list.d/linuxuprising-java.list
  22. $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
  23. $ sudo apt update
  24. $ sudo apt install oracle-java15-set-default
  25.  
  26. Check Java
  27. $ java -version
  28. \\\\\\\
  29.  
  30. Install Signal on your phone and set it up, you will need it to get confimation code.
  31.  
  32. Register
  33. $ ./signal-cli -u +628123456789 register
  34.  
  35. Receive confirmation code from your phone, verify
  36. $ ./signal-cli -u +628123456789 verify 123–456
  37.  
  38. Send message
  39. $ ./signal-cli -u +628123456789 send -m "Hello hello hello,"$'\n'"World!" +628987654321
  40. 1610594445133
  41.  
  42. Receive deliver statuses, read statuses, and messages.
  43. $ ./signal-cli -u +4915151111111 receive --json
  44. {"envelope":{"source":"+628987654321","sourceDevice":1,"relay":null,"timestamp":1610594450743,"dataMessage":null,"syncMessage":null,"callMessage":null,"receiptMessage":{"when":1610594450743,"isDelivery":true,"isRead":false,"timestamps":[1610594445133]}}}
  45. {"envelope":{"source":"+628987654321","sourceDevice":1,"relay":null,"timestamp":1610594451013,"dataMessage":null,"syncMessage":null,"callMessage":null,"receiptMessage":{"when":1610594451013,"isDelivery":false,"isRead":true,"timestamps":[1610594445133]}}}
  46. {"envelope":{"source":"+628987654321","sourceDevice":1,"relay":null,"timestamp":1610594529488,"dataMessage":{"timestamp":1610594529488,"message":"World world world,\nHello!","expiresInSeconds":0,"reaction":null,"quote":null,"mentions":[],"attachments":[],"groupInfo":null},"syncMessage":null,"callMessage":null,"receiptMessage":null}}
  47.  
RAW Paste Data