알뜰살뜰 정보/Raspberry PI

라즈베리파이 telegram-cli 설치

쉬고싶은 거북이 2020. 2. 25. 17:48

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

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

 

./configure

tg1/ . 41 6 
unwrap 
type 
RSA GETTER 
/ r s a_pen 
t g 1 / crypto / r 
RSA GETTER 
. c : In 
bn (TGI.c bn 0): 
or ; pointer 
rsa n' : 
TGLC 
'TGLC 
'TGLC 
'RSA Sty 
In 
error: 
leaches of 
. reaches end

./configure --disable-json

checking 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
checking 
check inq 
check' ng 
che c k ing 
ne tab. h pre 
for 
for 
ror string.h... 
( ea ehed 
arpa,' inet.h 
for 
for 
usability.. 
ror . 
sys/Ei1e.n 
for 'Y'/ file. h. 
'V'"ocket.h 
usability. 
temi.' . h presence. 
yes 
yes 
yes 
fo 
ror 
for 
ror 
roz 
fo 
ror 
fo 
ror 
termioS.h... yes 
site 
Inline... 
GNU libc 
GNU 
endpwenZ... 
select.. 
socket... 
Strdup... 
yes 
(cached) yes 
confiq 
creatina Makefile

 

make

tg1/ . 41 6 
unwrap 
type 
RSA GETTER 
/ r s a_pen 
t g 1 / crypto / r 
RSA GETTER 
. c : In 
bn (TGI.c bn 0): 
or ; pointer 
rsa n' : 
TGLC 
'TGLC 
'TGLC 
'RSA Sty 
In 
error: 
leaches of 
. reaches end

sudo apt-get install libssl1.0-dev

make

on's/ auto/ auto—types.o ODIS/ auto/ 
•u • ignored - D • is the default (see 
. lib'/ Iibtgl.a 
objs/cgl.o 
objs'tgl—net.o 
ob3s'crypzo/bn openssi.o 
— objs'crypto/tm altem.o 
obi crypto/ z o 
openSS1. O 
ob3s'crypzo/MS al tern. o 
objs'crypto/sha o 
obi z/ crypto/ 'ha al tern. o 
ob3s't001s.o 
— 0b}' 'crypto/ err OEen"1. O 
ob3s'auto'auto—sZ1p.o 
obi z/ auto/ auto—st o 
— obj'/auto/auto—autocc.plete.o 
-types. o 
auto/ . o 
gee 
objS/100p.0 Objs/lua—tg.o objs/åson—tg.o obås/python—zg.0 0b"/ python—types. O 
-L/usr,'lib 
-L,'usr/lib 
—raynamic —ggdb 
-1 config 
-1 event 
-11ua5.2

 

 

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

 

Copyright 2013—2015 
with ABSOLUTELY NO WARANTY; details 
free are 
ulder condition'; 'how license • for details. 
Includes developed by 
for use in the (http: .org/) 
. telegru—clil 
[ / home/ pi/ 
type 
led.

 

 

nano tg/tgl/mtproto-utils.c

 

C mtproto-utils.c • 
// checks that g_a is acceptable for DH 
76 int ( struct tgl_state *TLS, 
TGLC bn 
•p, TGLC bn 
•g_a) { 
if (TGLC 
return •I; 
return 
if (TGLC 
return -I; 
(g_a) > 256) { 
if (g_a) 2848 
_bn_cnp (p, g_a) B) { 
- 64) { 
TGLC_bn •dif - 0; 
TGLC_bn_sub (dif. p, g_a); 
if (dif) < 2048 - 64) { 
(dif); 
return —I; 
(dif); 
return e; 
static unsigned long long BN2uII (TGLC_bn •b) { 
if (5izeof (unsigned long) 
return (b); 
4f .(sizeof. (unsigned long long) 
assert t/ As long as nobody ever uses this code, it is broken. 
tmp; 
/ • Here be dragons, but it should be okay due to be64toh •t 
TGLC_bn_bn2bin (b, onsign+ char •b] &tmp); 
return be64toh ; 
else { 
assert 
Static void (TGLC_bn •b s unsigned long long Val) { 
if (sizeo€ (unsigned long) 
8 < (111 32)) { 
(b, Val); 
) else if (sizeof (unsigned long long) S) { 
assert // As long as nobody ever uses this code, assume it is broken. 
/ • Here be dragons, but it should be okay due to htobe6Z 
TGLC_bn_bin2bn ( (unsigned char &val. 8, b); 
) else 
assert

 

주석처리

Sudo make clean

Sudo make

 

번호등록하기

bin/telegram-cli -k server.pub -w



 



 

bin/telegram-cli -k server.pub

 

Dialog_list 채팅목록 보기

> dialog list 
Ch.l rEsr RTU: O 
> msg a 123 
FAIL: 38: passe arg 
> B SH 123 
FAIL. • 38 : parse arg 
User n online (gas online [2020/02/19 
07:271 
> ug B SH se%ioesf

 

 

FAIL: 38: Can not parser arg #1

 

: О =ead 
п,ет 
сп—1 TEST ИТО: О 
В SH 123 
[17:361 В SH 123 
В off11ne 
[2050/02/14

 

 

Help

 

a ccept chat 
opt 
add 
block user cuser> 
chat > 
Accepts chat. with —E 
Tri e s 
Sends text to 
get 
(offset—Ol 
info Print 5 info about Channel (id, 
to add to 
at 
Getz 
1 
Channel 
1 
1 
Channel 
invite sehannel> Invites user co channel 
kick Kicks 
leave Leaves chunel 
list [Offset—Ol 
about channel> 
set 
List Of last 
Ctype:» 
Sec s 
Set' 
Set_phOtO channel > Set s Channel 
chac < chat s Adds 
æssage this chat Defuit 100 
info. 
O — not 
e info. 
photo. Photo Vill be croppe 
to chat. Sends him 
chat del (user > 
user chat 
chat info t > 
Chaz sec _phoco 
o Sguaze 
upgrade < chat 
Prints info about Chat lid, etc. ) 
photo. Photo be cropped 
chat to ægagzoup 
chat Intezfaæ All be 
to this peer . Type / quit to end this 
concact contact 
search Searches by 
ch.1 
create group Chat 
secret cuser;» 
Creates with 
Creates group Chat With users 
Starts creation or secret chat 
delete æg 
Deletes contact 
Deletes æssage 
dialog_li't [offset—Ol 
List of 
export eard 
d method 
Prints that be by another With car 
that be used to to channel 
Prints chat link that be to join to chat 
mssage to peer. to chats 
chat I ink 
fwd 
fwd cmsg-id> 
get of service 
Foruards message to peer. Foruard co secre 
c Is Result slightly 
Prints s of 
Get m "age by id 
get Self 
Get user info 
[eormandl 
Princs this help 
messages with 
age Also æssages as read 
card (card) 
Get' use 
by cald and PI int' 
this pee: (most 
it . You then

 

load Ch. I > 
me after end 
to him as 
imsort_ehat link Chash> Joins to Chat by link 
Joins co Channel by 
to downloads 
d ml o ad end 
file Send' do—nt to 
file to 
Chac_phoco co 
load file to dirs. Prints 
d ml o ad end 
Ioad 
download ena 
emsg—id:» 
d ml o ad end 
load file 
me after end 
10 a d_phoco 
load 
d ml o ad end 
1 Oad Video 
after end 
S 
listening Socket 
mark 
msg 
file to downloads dirs. 
to downloads 
file to 
file to . 
file to downloads . 
Prints 
file 
name 
file 
Prints file na 
file 
name 
file 
file after 
updat e 
Marks 
ug Sends 
post 
POS t audio < file > 
post _tiie 
post 
Sends 
to downloads na 
to this (or . Useful with 
messages with peer as read 
text message to pee: 
text Co pee 
to peer a: 
PostS audio to peer 
POS'S peer 
co pee: 
geo 
posC_phoCo (file) [captiml 
photo to peer 
post text Sends Of text file plain text message 
[Caption I 
quit 
peer 
1 cha t < chat > (new Ræez ch a C 
contact <firSt name> Contact 
-cm.sg-id> co message 
z epiy_aualo 
Sends audio pee: 
reply 
zazy 
Sends to 
rile 
zeply Sends geo 
zeply_photo < file > photo to peer 
reply_video 
re S 01 Ve username username 
safe 
video to 
Searches user by 
search pattern 
'sages date to date to in 
resent, in all 
5 end 
send 
sazy 
audio •tpeer:• < file > 
do ænt 
Sends audio to 
pattern me 
with (if peer not p 
Sends contact (not neces 
—name > 
to peer 
Send'

 

Send _phoco [Caption I 
photo 
text Sends contents as plain message 
typimJ (status) 
0—10): 
Sends typing supply a 
typing, uplNd video, 
upload audio, upload do—nt, geo, 
send typing 
set 
Sends typing notification abort 
video peer 
Sets of uailable: 
log_1 eve I , 
deb 
i ala m, 
' et_pasmld 
Set' 
Set 
Sets profile 
Photo cropped to 
set <seczet chat) 
Set phone 
show 
Sets secret chat itself 
Changes the phone Of this 
bot < chat> Adds Co chat 
dermg purpose 
Set status 
Status Offline Sets Status Offline 
unblock user 
Prints 
last phone) 
file Co . tries Co it 
default 
photo 
CO Then to 
syszem action 
chat_photo file Co dirs. tries co it 
With 
ope n 
system 
do t 
systern default 
it with 
file 
default 
file to downloads dirs. Then tries to open it 
default action 
file Co . tries Co it 
file to Then to 
ew_ph o to eæg— 
Dmloads file to . 
_zwer_photo file to dir' 
SVSte• default action 
€msg— 
tries to 
tries to open it 
co open 
tries to 
open 
default 
video 
it with default action 
—id> to message 
file to . 
visualize 
key 
shaL of lc Lr_ 
Prints visualization or encryption key