Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

RE: lug-bg: perl


  • Subject: RE: lug-bg: perl
  • From: bkrosnov@xxxxxxxx (Boyan Krosnov)
  • Date: Fri, 16 Aug 2002 18:43:47 +0300



znachi w environmenta imash neshto takowa
SSH_CLIENT='194.12.246.157 1056 22'

tazi promenliwa mojesh da q wzemesh w perl eto taka
print $ENV{'SSH_CLIENT'};

mojesh da naprawish taka
($ip,$remote_port,$local_port)=split / /,$ENV{'SSH_CLIENT'};

taka w promenliwata $ip shte imash ip adresa na remote stranata. ne e nujno da pishesh wsichkite promenliwi w spisyka ot lqwata strana na priswoqwaneto. moje da e prosto
($ip)=split....

Ne e nujno da matchwash ip adresa kato posledowatqlnost ot cifri i tochki, bi trqbwalo da ti e dostatychno che ima takawa promenliwa w environmenta.
BTW wyzmojno e i pyrworo chislo ot ip adresa da e ednocifreno :)

BR,
Boyan
> -----Original Message-----
> From: Àòàíàñ Ìàâðîâ [mailto:bugar@xxxxxxx] 
> Sent: Friday, August 16, 2002 6:28 PM
> To: lug-bg@xxxxxxxxxxxxxxxxxx
> Subject: lug-bg: perl
> 
> 
> 
> Zdraweite.
> Nqkoi moje li da mi pomogne da naprawq sledniq skript.
> Znachi iskam da polucha w dadena promenliwa ip adresa na 
> klient na ssh.
> Misleh si che e nai-lesno kato izpolzwam promenliwite na sredata na
> potrebiteq 
> /env/. Ot tam moje da se izpolzwa SSH_CLIENT=ip_add_na_klient 
> x y kydeto y e 
> port 22 /portan na ssh/ a x predpolagam che e porta na 
> klienta, no wyprosyt e 
> kak da otdelq towa koeto mi trqbwa. Edinstweno koeto se setih 
> e che moje da 
> se proweri dali syshtestwuwa takwoa neshto naprimer
> .................
> if ( /\d{2,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)
> .....................
> no sled towa kakwo trqbwa da se naprawi ne znam.
> Blagodarq za pomoshtta.
> 
> __________________________________
> 12MB-POP3-WAP-SMS---TOBA-E-mail.bG
> ----------------------------------
> 
> " Ako uckame u Bue agpec B mail.bg 
> ugeme myk: http://www.mail.bg/new/ "
> 
> ==============================================================
> ==============
> A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
> http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. 
> - Stara Zagora
> To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
> ==============================================================
> ==============
> 
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.