텔레그램 Cli 버전이 있어 설치하여 연동이 가능하다니 신기하네요. 기본적인 설치 방법을 정리하였습니다.



※ 설치절차


- Update the packages with


sudo apt-get update

sudo apt-get upgrade



- Install libs

  readline or libedit, openssl and (if you want to use config) libconfig and liblua. If you do

  not want to use them pass options --disable-libconfig and --disable-liblua respectively.


sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev make


저는 여기서 libjansson 없다고 에러가 발생했습니다. 그래서 apt-get install libjansson 했더니 안되더군요. HARDCOPYWORLD 사이트에서 참조해서 해결했습니다.


sudo apt-get install libjansson-dev


python dev 에러일 경우

sudo apt-get install python-dev



- Clone GitHub Repository

git clone --recursive https://github.com/vysheng/tg.git && cd tg 

./configure

make

Running this command takes a little time and after install is done.



- Utilization

Navigate to the folder tg

cd tg

then

bin/telegram-cli -k tg-server.pub -W


  instructables.com의 안내에 따라서 했는데 에러가 발생했습니다.

pi@raspberrypi:~/tg $ bin/telegram-cli -k tg-server.pub -W

Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman

Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.

This is free software, and you are welcome to redistribute it

under certain conditions; type `show_license' for details.

Telegram-cli uses libtgl version 2.1.0

Telegram-cli includes software developed by the OpenSSL Project

for use in the OpenSSL Toolkit. (http://www.openssl.org/)

I: config dir=[/home/pi/.telegram-cli]

telegram-cli: tgl/mtproto-utils.c:101: BN2ull: Assertion 0' failed. SIGNAL received


  해당에러는 tgl/mtproto-utils.c의 101번재 줄에서 발생해서 인터넷을 검색하니 해당 줄을

  주석처리하고 다시 재컴파일 하면 문제가 없다고 합니다. 다행이 저는 잘 동작하네요.

101번 줄에 주석 //를 추가합니다.


sudo vi tgl/mtproto-utils.c


     97 static unsigned long long BN2ull (TGLC_bn *b) {

     98   if (sizeof (unsigned long) == 8) {

     99     return TGLC_bn_get_word (b);

    100   } else if (sizeof (unsigned long long) == 8) {

    101     //assert (0); // As long as nobody ever uses this code, assume it is broken.

    102     unsigned long long tmp;

    103     /* Here be dragons, but it should be okay due to be64toh */

    104     TGLC_bn_bn2bin (b, (unsigned char *) &tmp);

    105     return be64toh (tmp);

    106   } else {

    107     assert (0);

    108   }


sudo make clean

sudo make


  초기 인증 설정


sudo bin/telegram-cli -k tg-server.pub -W

phone number: +82xxxxxxxxxx

code ('call' for phone call): xxxxx


  메세지 보내기

  메세지는 msg 명령으로 보내며 이름, 성 순서이며 공백은 _ 로 대체합니다.


  msg 현수_유 안녕하세요.



  한글이 깨지는 경우 http://n3015m.tistory.com/329 하단의 한글지원 설정을 참고


※ 참고 사이트

- Telegram on Raspberry Pi

  http://www.instructables.com/id/Telegram-on-Raspberry-Pi/

- 라즈베리 파이를 메시지 서버로!(TELEGRAM CLI)

  http://www.hardcopyworld.com/gnuboard5/bbs/board.php?bo_table=lecture_rpi&wr_id=7

Posted by n3015m
:
BLOG main image
'네오이즘'의 보안LAB 블로그입니다........... n3oism@gmail.com by n3015m

카테고리

분류 전체보기 (228)
[ HappyDevTool ] (29)
[ HappyToolRelease ] (4)
[Book] (6)
[ Security Studies ] (0)
- CII (2)
- BigData (2)
- Web Hacking (10)
- SQL Injection (25)
- Mobile Security (9)
- Network (6)
- OperatingSystem (4)
- Malware & Reversing (4)
- Phishing (5)
- Compliance (0)
- Programming (13)
- Tools (13)
- IoT (6)
- etc (21)
[Pentration Testing] (3)
[OS X] (4)
[ Security Trends ] (16)
[ Fixing Guideline ] (7)
My Way, My Life (34)
About Me (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :