โลกของ "เจ๋ง"

<<
มกราคม 2554
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
 
7 มกราคม 2554
 

SHELL Script - Monitor อุปกรณ์ไม่มี SNMP

[root@monitor ~]# ./gs_mon.sh | telnet

เขียนคำสั่งใน gs_mon.sh แล้ว เอาคำสั่งไปวางไว้หลังคำสั่ง telnet

ก็เหมือน เรียก telnet แล้วเอาคำสั่งใน gs_mon.sh มากองลงไปหลังจากเรียก telnet แล้วนั่นเอง

[root@monitor ~]# vi gs_mon.sh
#!/bin/sh
host=58.x.x.x
port=23
#login=root << ถ้าอุปกรณ์ไม่มี login ก็ remark ไว้
passwd="password"
#cmd="/var/script/example.sh" << ถ้ามีอีก script นึง

echo open $host $port
sleep 1
#echo $login
#sleep 1
echo $passwd
sleep 1
#echo $cmd
echo status
sleep 1
echo exit


พอเรียกคำสั่ง

[root@monitor ~]# ./gs_mon.sh | telnet
telnet> Trying 58.x.x.x...
Connected to 58.x.x.x (58.x.x.x).
Escape character is '^]'.
Grandstream GXW-4008 V1.3B Command Shell Copyright 2006-2008
Password:
GS> status
Product Model: GXW-4008 V1.3B
MAC Address: 00:xx:xx:xx:xx:xx
Network:
IP Address -- 58.xx.xx.xx
Netmask -- 255.255.255.xxx
Gateway -- 58.xx.xx.xx
DNS Server -- 203.xx.x.xxx
DNS Server -- 203.xx.x.xxx
Software Versions:
Main -- 1.0.1.x
Boot -- 1.0.0.x
Core -- 1.0.0.x
Base -- 1.0.1.x
Port Status:
Port 1: On Hook Registered
Port 2: In Use Registered
Port 3: On Hook Registered
Port 4: On Hook Registered
Port 5: On Hook Registered
Port 6: In Use Registered
Port 7: On Hook Registered
Port 8: On Hook Registered
System uptime: 269821
System load: 0.00, 0.00, 0.00
Memory Usage: 14688256/528384/0/1937408
GS> Connection closed by foreign host.

คราวนี้ก็เอาผลลัพธ์ไปต่อยอดได้เลย

อีกแบบใช้ TCL

#!/usr/bin/expect -f
#
spawn telnet "xx.xx.xx.x"
expect "ogin:"
send "usernamer"
expect "ssword:"
send "passwordr"
expect ">"
send "rebootr"


Create Date : 07 มกราคม 2554
Last Update : 7 มกราคม 2554 15:34:14 น. 2 comments
Counter : 969 Pageviews.  
 
 
 
 
สวัสดีปีใหม่ครับ
ขอให้มีความสุขตลอดปีนะครับ
 
 

โดย: nuyect วันที่: 7 มกราคม 2554 เวลา:16:01:41 น.  

 
 
 
To whom it may concern

We are sending this email on behalf of our client, Photograph Independent Consortium of America, Inc. (PICA), and its member companies. The PICA is a trade association whose member companies create, manufacture, and distribute approximately sixty (60) percent of all legitimate professional images sold in the US.

As these copyrighted images are their main source of income, our client imposes all the copyrights to said images.

It has come to the attention of our client that your website, bloggang.com, which you own, used one of the copyrighted images without approval and without any proper credit to the copyright owner.

As you never got (nor asked for) approval to use our client's images, your work constitutes copyright infringement, in accordance with Title 17 of the U.S. Code.

Accordingly, you could be liable for statutory damages as high as $150,000 as set forth in Section 504(c)(2) therein. Removal of the image won_t fix the copyright issue, as we have recorded proof of the image being used on your website.

Our client requests that you deposit $200 in Bitcoin cryptocurrency to their wallet: bc1qq4l0gyav2nn56w94k95gg5er863hf2gtykudeq to receive full approval to use their pictures on your website.

We have been instructed to follow legal action to repair the finance damage if you refuse to pay the copyright waiver fee of $200.

You are hereby requested to add the required funds of $200 to this bitcoin wallet: bc1qq4l0gyav2nn56w94k95gg5er863hf2gtykudeq as fee for copyrighted image usage. Our client will allow you to continue using the image/s after you pay the required sum.

If they have not received the requested fee within 15 days of email receival, we will have to take legal recourse and settle this matter in court.

There won_t be a further notice.

Respectfully,

John Neidig,

Ardent Fox LLP | International Requests
 
 

โดย: John Neidig IP: 188.40.113.83 วันที่: 19 ธันวาคม 2563 เวลา:15:06:14 น.  

Name
Opinion
*ใช้ code html ตกแต่งข้อความได้เฉพาะสมาชิก

dokawa
 
Location :
กรุงเทพ Thailand

[ดู Profile ทั้งหมด]

ฝากข้อความหลังไมค์
Rss Feed
Smember
ผู้ติดตามบล็อก : 1 คน [?]




ความจำสั้น แต่ bloggang.com คงจะอายุยาว เลยเอาความรู้มาฝากไว้หน่อยครับ
[Add dokawa's blog to your web]

 
pantip.com pantipmarket.com pantown.com