<div dir="ltr">Does anyone have a working script for this?<div><br></div><div>I put together a script in python to do this but hitting some issues.</div><div><br></div><div>

















<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Right now I’ve got it to the point that it’s trying to
upload a single file.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I used Fiddler to copy what I saw for a working request through a browser.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I first do a Get to the cmplatform page to get a cookie.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I then do a Post to the /cmplatform/j_security_check page to
authenticate that cookie.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I then do a Get to /cmplatform/tftpFileUpload.do to get a
Struts Token.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">I then do a Post to /cmplatform/tftpFileUpload.do with the Struts token, filename, and directory details.<span></span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;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.<span></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"><br></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">I tried using the curl methods I found here (















<span style="font-size:11pt;font-family:Calibri,sans-serif"><a href="https://communities.cisco.com/docs/DOC-43506" style="color:rgb(5,99,193);text-decoration:underline">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></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"><br></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Here's what it looks like when my script runs in Fiddler:</span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"></span></p><div><img src="cid:ii_jhw13kru0_163bb9f8477e7651" width="544" height="450"><br></div><br><p></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"><br></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">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></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"><br></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Python script attached.</span></p>





<br></div></div>