[cisco-voip] CUCM Bulk TFTP File Upload
Stephen Welsh
stephen.welsh at unifiedfx.com
Fri Jun 1 10:52:33 EDT 2018
Hi Brian,
We do this in .Net so can’t help with the Python script,
We did find that an update to Apache did have a knock-on effect with the Struts token about UCM 11.X onward if I recall correctly.
The way you get the Struts token has changed, i.e. was ‘struts.token.name’, now it’s a reference to another hidden input element found inside: ‘org.apache.struts.taglib.html.TOKEN'
Hopefully that will point you in the right direction.
Not long to Cisco Live, for those lucky enough to attend pop round to stand 1151 in WoS for a chat and I’ll show you a funky way we managed to emulate UCCX for a new online demo of our WallboardFX product we are planning to release soon.
Also we have some cool new swag (Mini USB Fan), picture attached.
Come for the swag, stay for the technology chat ;)
Thanks
Stephen Welsh
CTO
UnifiedFX
[cid:15343029-D8B3-405C-8D29-40997282A93D at b2.unifiedfx.com]
[cid:F7E0F395-888E-4897-B29E-B0DE2861E4F1 at b2.unifiedfx.com]
On 1 Jun 2018, at 14:53, Brian Meade <bmeade90 at vt.edu<mailto:bmeade90 at vt.edu>> wrote:
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:
<image.png>
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.
<CUCM-Bulk-TFTP-Upload.py>_______________________________________________
cisco-voip mailing list
cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
https://puck.nether.net/mailman/listinfo/cisco-voip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/a7a34473/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample pic (1).jpg
Type: image/jpeg
Size: 296571 bytes
Desc: sample pic (1).jpg
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/a7a34473/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ??1.jpg
Type: image/jpeg
Size: 70319 bytes
Desc: ??1.jpg
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20180601/a7a34473/attachment-0001.jpg>
More information about the cisco-voip
mailing list