[cisco-voip] CUCM Bulk TFTP File Upload
Schlotterer, Tommy
tschlotterer at presidio.com
Fri Jun 1 13:18:31 EDT 2018
Brian,
Here is my really hacky python script to do this.
Thanks
Tommy
From: cisco-voip [mailto:cisco-voip-bounces at puck.nether.net] On Behalf Of Brian Meade
Sent: Friday, June 1, 2018 9:54 AM
To: cisco-voip voyp list <cisco-voip at puck.nether.net>
Subject: [cisco-voip] CUCM Bulk TFTP File Upload
EXTERNAL EMAIL
Does anyone have a working script for this?
I put together a script in python to do this but hitting some issues.
Right now I’ve got it to the point that it’s trying to upload a single file.
I used Fiddler to copy what I saw for a working request through a browser.
I first do a Get to the cmplatform page to get a cookie.
I then do a Post to the /cmplatform/j_security_check page to authenticate that cookie.
I then do a Get to /cmplatform/tftpFileUpload.do to get a Struts Token.
I then do a Post to /cmplatform/tftpFileUpload.do with the Struts token, filename, and directory details.
This looks to be successful as I get a "File uploaded successfully" message returned but then I can't find the file on the TFTP File Management page.
I tried using the curl methods I found here ( https://communities.cisco.com/docs/DOC-43506 ) but no luck there. Not sure if this works in 11.5 without grabbing the Struts token. Without a token, I get an error message saying something to the affect of I hit the Submit button twice.
Here's what it looks like when my script runs in Fiddler:
[cid:image001.png at 01D3F9AB.08AD3810]
This looks almost exactly like the real example through a browser I captured minus a few headers I tried manually adding with no luck.
Python script attached.
Tommy Schlotterer | Systems Engineer - Collaboration
Presidio (NASDAQ: PSDO) | presidio.com<http://presidio.com>
20 N Saint Clair 3rd Floor, Toledo, OH 43604
D: 419.214.1415 | C: 419.706.0259 | tschlotterer at presidio.com<mailto:tschlotterer at presidio.com>
[Future. Built.]<http://www.presidio.com>
Follow us:
[Follow Presidio on Twitter]<http://www.twitter.com/presidio>
This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments. Please be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/d54d553b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 363906 bytes
Desc: image001.png
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/d54d553b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Upload.py
Type: application/octet-stream
Size: 14110 bytes
Desc: Upload.py
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/d54d553b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.py
Type: application/octet-stream
Size: 8685 bytes
Desc: mainwindow.py
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/d54d553b/attachment-0001.obj>
More information about the cisco-voip
mailing list