Coder Social home page Coder Social logo

levensailor / phonescrape Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 5.0 19 KB

Uses BeautifulSoup and RegEx to pull and parse data directly form Cisco IP Phones

Home Page: https://developer.cisco.com/codeexchange/github/repo/levensailor/phonescrape

License: GNU General Public License v3.0

Python 100.00%
cisco voip ipphone sip cucm ucm callmanager

phonescrape's Introduction

published

phonescrape

Uses BeautifulSoup and RegEx to pull and parse data directly form Cisco IP Phones

pip install phonescrape

input a phone ip address

from phonescrape import scrape

phones = ['10.131.202.127', '10.131.202.127']

for phone in phones:
    details = scrape.allDetails(phone)
    print(details["sn"])

FCH2053D2BS

and get back a dict of information:

{
    "sn": "FCH2053D2BS",
    "firmware": "sip88xx.12-0-1-8",
    "dn": "52807",
    "model": "CP-8851",
    "kem1": "Key expansion module 2",
    "kem2": "Hardware revision",
    "mac_address": "F8A5C59E0F1C",
    "hostname": "SEPF8A5C59E0F1C",
    "domain_name": "DHCP server",
    "dhcp_server": "10.131.202.1",
    "dhcp": "Yes",
    "ip_address": "10.131.202.127",
    "subnetmask": "255.255.255.0",
    "gateway": "10.131.202.1",
    "dns1": "8.8.8.8",
    "dns2": "DNS server 3",
    "alt_tftp": "Yes",
    "tftp1": "10.144.200.10",
    "tftp2": "DHCP address released",
    "op_vlan": "Admin VLAN ID",
    "admin_vlan": "CUCM server1",
    "cucm1": "10.144.200.10  Active",
    "cucm2": "",
    "cucm3": "CUCM server4",
    "info_url": "http://10.144.200.10:8443/ccmcip/GetTelecasterHelpText.jsp",
    "dir_url": "http://10.144.200.10:8443/ccmcip/xmldirectory.jsp",
    "msg_url": "Services URL",
    "svc_url": "http://10.144.200.10:8443/ccmcip/getservicesmenu.jsp",
    "idle_url": "Idle URL time",
    "info_url_time": "0",
    "proxy_url": "",
    "auth_url": "http://10.144.200.10:8080/ccmcip/authenticate.jsp",
    "tvs": "cucm.car.pnslabs.com",
    "status": [
        "11:39:03am 10/09/18 ITL installed",
        "11:39:04am 10/09/18 SEPF8A5C59E0F1C.cnf.xml.sgn(HTTP)",
        "11:39:05am 10/09/18 VPN not configured"
    ]
}

phonescrape's People

Contributors

levensailor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

phonescrape's Issues

Support for 7937 Conference Phone scraping

The Cisco 7937 Conference IP Phone has a unique URL for it's Web Access.
In order to scrape these devices phonescrape will need to include this additional URL.

URLs

Device Information = http://"+phone+"/localmenus.cgi?func=604
Data: (MAC Address)(Host Name)(Phone DN)(App Load ID)(Serial Number)
firefox_D5AgVZl2lD

Network Configuration = http://"+phone+"/localmenus.cgi?func=219
Data: (MAC Address)(Host Name)(IP Address)(CallManager 1)(CallManager 2)
firefox_dxjYlPgbOU

CUCM IP Address pull for 8821 Wireless IP Phones

The 8821 Wireless IP Phone runs different firmware than other 8800 endpoints.

  • On other 8800 endpoints, the CUCM IP/hostname reference on the webpage is "CUCM server1", CUCM server2", etc.

  • On the 8821, the CUCM IP/hostname reference on the webpage is just "Server 1", "Server 2", etc.

Can logic be added to facilitate this difference?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.