<div dir="ltr">Thanks Tommy!<div><br></div><div>Have you tested against CUCM 11.x okay?</div><div><br></div><div>I need to build the dependencies to fully run yours. I tried pulling out the important upload code but seeing the same issue I'm having with my code.</div><div><br></div><div>Thanks,</div><div>Brian Meade</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 1, 2018 at 1:18 PM, Schlotterer, Tommy <span dir="ltr"><<a href="mailto:tschlotterer@presidio.com" target="_blank">tschlotterer@presidio.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<div class="m_-299166809608453111WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Brian,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Here is my really hacky python script to do this.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><br>
Tommy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> cisco-voip [mailto:<a href="mailto:cisco-voip-bounces@puck.nether.net" target="_blank">cisco-voip-bounces@<wbr>puck.nether.net</a>]
<b>On Behalf Of </b>Brian Meade<br>
<b>Sent:</b> Friday, June 1, 2018 9:54 AM<br>
<b>To:</b> cisco-voip voyp list <<a href="mailto:cisco-voip@puck.nether.net" target="_blank">cisco-voip@puck.nether.net</a>><br>
<b>Subject:</b> [cisco-voip] CUCM Bulk TFTP File Upload<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<table class="m_-299166809608453111MsoNormalTable" border="1" cellspacing="4" cellpadding="0" style="background:lightyellow;border:solid black 1.0pt">
<tbody>
<tr>
<td style="border:none;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><span style="color:#ff3333">EXTERNAL EMAIL</span></strong><u></u><u></u></p>
</td>
</tr>
</tbody>
</table><div><div class="h5">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;display:none"><u></u> <u></u></span></p>
<table class="m_-299166809608453111MsoNormalTable" border="0" cellspacing="4" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"> <u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">Does anyone have a working script for this?<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">I put together a script in python to do this but hitting some issues.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Right now I’ve got it to the point that it’s trying to upload a single file.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I used Fiddler to copy what I saw for a working request through a browser.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I first do a Get to the cmplatform page to get a cookie.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I then do a Post to the /cmplatform/j_security_check page to authenticate that cookie.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I then do a Get to /cmplatform/tftpFileUpload.do to get a Struts Token.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I then do a Post to /cmplatform/tftpFileUpload.do with the Struts token, filename, and directory details.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I tried using the curl methods I found here (
<a href="https://communities.cisco.com/docs/DOC-43506" target="_blank"><span style="color:#0563c1">https://communities.cisco.com/<wbr>docs/DOC-43506</span></a> ) 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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Here's what it looks like when my script runs in Fiddler:<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><img border="0" width="544" height="450" id="m_-299166809608453111_x0000_i1025" src="cid:image001.png@01D3F9AB.08AD3810"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">This looks almost exactly like the real example through a browser I captured minus a few headers I tried manually adding with no luck.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Python script attached.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
</div>
</div>
</div></div></div>
<p></p>
<span style="FONT-SIZE:xx-small;FONT-FAMILY:Verdana;FONT-WEIGHT:bolder;COLOR:#808080"><br>
Tommy Schlotterer | Systems Engineer - Collaboration<br>
Presidio (NASDAQ: PSDO) | <a href="http://presidio.com" title="" target="_blank">
presidio.com</a><br>
<a href="https://maps.google.com/?q=20+N+Saint+Clair+3rd+Floor,+Toledo,+OH+43604&entry=gmail&source=g">20 N Saint Clair 3rd Floor, Toledo, OH 43604</a><br>
D: 419.214.1415 | C: 419.706.0259 | <a href="mailto:tschlotterer@presidio.com" title="Click to send email to Schlotterer, Tommy" target="_blank">
tschlotterer@presidio.com</a><br>
<br>
</span>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p></p>
<span style="FONT-SIZE:xx-small;FONT-FAMILY:Verdana;FONT-WEIGHT:bolder;COLOR:#808080"><br>
<br>
<a href="http://www.presidio.com" target="_blank"><img id="m_-299166809608453111IMG1" border="0" alt="Future. Built." src="https://www2.presidio.com/signatures/Presidio_Blue_FutureBuilt_200px.png" width="223" height="49"></a><br>
<br>
</span>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p></p>
<span style="FONT-FAMILY:Verdana;COLOR:#808080;FONT-SIZE:xx-small;FONT-WEIGHT:bolder"><br>
Follow us:<br>
<br>
<a href="http://www.twitter.com/presidio" target="_blank"><img id="m_-299166809608453111IMG1" border="0" alt="Follow Presidio on Twitter" src="http://twitter-badges.s3.amazonaws.com/t_small-a.png" width="22" height="22"></a><br>
<br>
</span>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<p></p>
<span style="FONT-FAMILY:Verdana;COLOR:#808080;FONT-SIZE:xx-small;FONT-WEIGHT:bolder"><br>
<br>
</span>
<p class="m_-299166809608453111ImprintUniqueID"></p>
<br>
<p class="MsoNormal">
</p><p class="MsoNormal"><span><em><span style="FONT-SIZE:11px">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<span style="COLOR:#1f497d">. </span>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.</span></em></span><span style="FONT-SIZE:10.5pt"><u></u><u></u><u></u></span></p>
<p></p><p></p></div>
</blockquote></div><br></div>