<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Brian,
<div class=""><br class="">
</div>
<div class="">We do this in .Net so can’t help with the Python script,
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">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'</div>
<div class=""><br class="">
</div>
<div class="">Hopefully that will point you in the right direction.</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Also we have some cool new swag (Mini USB Fan), picture attached.</div>
<div class=""><br class="">
</div>
<div class="">Come for the swag, stay for the technology chat ;)</div>
<div class=""><br class="">
</div>
<div class="">Thanks</div>
<div class=""><br class="">
</div>
<div class="">Stephen Welsh</div>
<div class="">CTO</div>
<div class="">UnifiedFX</div>
<div class=""><br class="">
</div>
<div class=""><img apple-inline="yes" id="BBD1C69B-CFFC-4ADA-B200-EE44984B64D5" src="cid:15343029-D8B3-405C-8D29-40997282A93D@b2.unifiedfx.com" class=""></div>
<div class="">
<div><br class="">
</div>
<div><img apple-inline="yes" id="5CBA0838-FBEE-4C15-B924-587F60860435" src="cid:F7E0F395-888E-4897-B29E-B0DE2861E4F1@b2.unifiedfx.com" class=""></div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 1 Jun 2018, at 14:53, Brian Meade <<a href="mailto:bmeade90@vt.edu" class="">bmeade90@vt.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Does anyone have a working script for this?
<div class=""><br class="">
</div>
<div class="">I put together a script in python to do this but hitting some issues.</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Right now I’ve got it to the point that it’s trying to upload a single file.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I used Fiddler to copy what I saw for a working request through a browser.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I first do a Get to the cmplatform page to get a cookie.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I then do a Post to the /cmplatform/j_security_check page to authenticate that cookie.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I then do a Get to /cmplatform/tftpFileUpload.do to get a Struts Token.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I then do a Post to /cmplatform/tftpFileUpload.do with the Struts token, filename, and directory details.<span class=""></span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span class=""> </span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
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.<span class=""></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class=""><br class="">
</span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class="">I tried using the curl methods I found here (
<span style="font-size:11pt;font-family:Calibri,sans-serif" class=""><a href="https://communities.cisco.com/docs/DOC-43506" style="color:rgb(5,99,193);text-decoration:underline" class="">https://communities.cisco.com/docs/DOC-43506</a></span> ) 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.</span><br class="">
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class=""><br class="">
</span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class="">Here's what it looks like when my script runs in Fiddler:</span></div>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:11pt" class=""></span></p>
<div class=""><span id="cid:ii_jhw13kru0_163bb9f8477e7651"><image.png></span><br class="">
</div>
<br class="">
<div class=""><br class="webkit-block-placeholder">
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class=""><br class="">
</span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class="">This looks almost exactly like the real example through a browser I captured minus a few headers I tried manually adding with no luck.</span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class=""><br class="">
</span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size:11pt" class="">Python script attached.</span></div>
<br class="">
</div>
</div>
<span id="cid:0CA8FED3-4CA1-44C1-B5C6-5A9138BE1662@b2.unifiedfx.com"><CUCM-Bulk-TFTP-Upload.py></span>_______________________________________________<br class="">
cisco-voip mailing list<br class="">
<a href="mailto:cisco-voip@puck.nether.net" class="">cisco-voip@puck.nether.net</a><br class="">
https://puck.nether.net/mailman/listinfo/cisco-voip<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>