Advertisement
Guest User

Untitled

a guest
Jan 6th, 2016
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.22 KB | None | 0 0
  1. $loginBase = "https://itunesconnect.apple.com";
  2. $loginUrl = $loginBase + "/WebObjects/iTunesConnect.woa/wo";
  3.  
  4. $r = Invoke-WebRequest $loginUrl -SessionVariable ws;
  5.  
  6. $ws
  7.  
  8. $form = $r.Forms[0];
  9.  
  10. $form| Format-List
  11.  
  12.  
  13. $form.fields
  14.  
  15. $form.Fields["accountname"] = "username";
  16. $form.Fields["accountpassword"] = "password";
  17. $form.Fields["theAuxValue"] = "";
  18.  
  19. $form.fields
  20.  
  21. $r = Invoke-WebRequest -uri ($loginBase + $form.Action) -WebSession $ws -Method $form.Method -Body $form.Fields;
  22.  
  23. $r.StatusCode
  24. $r.StatusDescription
  25. $r.content
  26.  
  27.  
  28.  
  29.  
  30. $jsonSummaryUrl = "https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wo/ra/apps/manageyourapps/summary";
  31.  
  32. $response = Invoke-WebRequest $jsonSummaryUrl -WebSession $ws;
  33.  
  34. $response.StatusCode
  35. $response.StatusDescription
  36. $response.content
  37.  
  38. Headers : {}
  39. Cookies : System.Net.CookieContainer
  40. UseDefaultCredentials : False
  41. Credentials :
  42. Certificates :
  43. UserAgent : Mozilla/5.0 (Windows NT; Windows NT 6.1; en-US) WindowsPowerShell/3.0
  44. Proxy :
  45. MaximumRedirection : -1
  46.  
  47.  
  48.  
  49.  
  50.  
  51. Id : appleConnectForm
  52. Method : post
  53. Action : /WebObjects/iTunesConnect.woa/wo/0.0.1.17.3.13.3.2.1.1.3.1.1
  54. Fields : {[accountname, ], [accountpassword, ], [theAuxValue, ], [inframe, 0]}
  55.  
  56.  
  57.  
  58.  
  59. Key Value
  60. --- -----
  61. accountname
  62. accountpassword
  63. theAuxValue
  64. inframe 0
  65. accountname username
  66. accountpassword password
  67. theAuxValue
  68. inframe 0
  69. 200
  70. OK
  71.  
  72. <!DOCTYPE html>
  73. <html>
  74. <head>
  75. <meta charset="utf-8" />
  76. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  77. <title>iTunes Connect</title>
  78. <meta name="apple-itunes-app" content="app-id=376771144" />
  79. <link href="/c/1450307132/dcfcd616d3232d45ba91c598fceecb45/itc/css/compiled/global_header_footer.css" media="screen, projection" rel="stylesheet" type="text/css" />
  80. <link href="/c/1450307132/b5be5ab894bfb31372e451d4ef495483/itc/css/compiled/interstitial.css" media="screen, projection" rel="stylesheet" type="text/css" />
  81. <script src="/c/1450307132/32843bda7b7abb11a2ca7d7a1088c6f3/itc/js/lib/jquery.min.js"></script>
  82. </head>
  83. <body class="signin"><div id="pageWrapper">
  84. <div id="header">
  85. <div id="logo">
  86.  
  87.  
  88. <span>iTunes Connect</span>
  89.  
  90. </div>
  91. <a href="http://www.apple.com/itunes/sellcontent/" class="hero-link hl--secondary">Learn More</a>
  92.  
  93. <div id="resources-help" class="dropdownmenu">
  94. <a href="" class="icon-help menuopener"></a>
  95. <ul role="menu" id="help-menu">
  96. <li class="sectionBreak"><a href="https://itunesconnect.apple.com/help/">All Resources and Help</a></li>
  97. <li><a href="https://itunesconnect.apple.com/help/news/">News</a></li>
  98. <li><a href="https://itunesconnect.apple.com/help/guides/">Guides</a></li>
  99. <li><a href="https://itunesconnect.apple.com/help/videos/">Videos</a></li>
  100. <li class="sectionBreak"><a href="https://itunesconnect.apple.com/help/faq/">FAQ</a></li>
  101. <li><a href="https://www.apple.com/itunes/go/itunesconnect/contactus">Contact Us</a></li>
  102. </ul>
  103. </div>
  104.  
  105.  
  106. </div>
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. <script>
  115. window.l10login = {
  116. signIn: 'Sign In',
  117. appleID: 'Apple ID',
  118. password: 'Password',
  119. signedOut: 'You have successfully signed out.',
  120. sessionExpired: 'Your session has expired.',
  121. }
  122. </script>
  123.  
  124. <div id="wrapper" class="itc-auth">
  125.  
  126.  
  127. <div class="box-container">
  128.  
  129. <div class="box sign-in">
  130. <h2 class="itc-signin-header">
  131. Sign In to</br> iTunes Connect
  132. </h2>
  133. <script>
  134. function dsfocus(){ document.appleConnectForm.theAccountName.focus(); }
  135. </script>
  136.  
  137.  
  138.  
  139. <div id="ds_container">
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148. <form name="appleConnectForm" method="post" action="/WebObjects/iTunesConnect.woa/wo/1.0.1.17.3.13.3.2.1.1.3.1.1">
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155. <font face="Lucida Grande, Geneva, Verdana, Arial, Helvetica, sans-serif" class="L12" />
  156. <font size=2>
  157. <span class="dstext"></span>
  158. </font>
  159. </font /><br><br>
  160.  
  161.  
  162.  
  163. <table border='0' cellpadding='0' cellspacing='0'>
  164. <tr valign='top'>
  165. <td><img alt="Alert" width="16" height="11" src="/AppleConnect/US-EN/iconsmallalert.gif" />
  166. <font face="Geneva, Verdana, Arial, Helvetica, sans-serif" size=1 class="G10" /><font color="#ff0000" size=1>
  167. <span class="dserror">Your Apple ID or password was entered incorrectly.</span>
  168. </font></font />
  169. <br><br>
  170. </td>
  171. <td width='11'></td>
  172.  
  173. </tr>
  174. </table>
  175.  
  176.  
  177.  
  178.  
  179.  
  180. <table cellpadding=0 cellspacing=0 border=0 width=273>
  181. <tr valign=top>
  182. <td align=left><font size=2><font face="Geneva, Verdana, Arial, Helvetica, sans-serif" size=1 class="G10" />
  183. <label for="accountname"><span class="dslabel">Apple ID</span></label>
  184. <font color="#ff1102"></font></font /><br>
  185. <font size='2'><input size="30" autocapitalize="off" autocorrect="off" maxlength="128" id="accountname" type="text" name="theAccountName" /></font></font>
  186.  
  187. </td>
  188. </tr>
  189.  
  190. <tr><td><img alt="" width="273" height="5" src="/AppleConnect/US-EN/spacer.gif" /></td></tr>
  191. <tr><td><img alt="" width="273" height="5" src="/AppleConnect/US-EN/spacer.gif" /></td></tr>
  192. <tr>
  193. <td align='left'>
  194. <font face="Geneva, Verdana, Arial, Helvetica, sans-serif" size=1 class="G10" />
  195. <label for="accountpassword"><span class="dslabel">Password</span></label>
  196. </font />
  197. <br>
  198. <input size="30" autocapitalize="off" oncut="return false ;" oncopy="return false ;" autocorrect="off" id="accountpassword" type="password" name="theAccountPW" /><input border="0" width="0" height="0" type="image" name=
  199. "1.Continue" src="/AppleConnect/US-EN/spacer.gif" />
  200. </td>
  201. </tr>
  202.  
  203.  
  204.  
  205. <tr><td><img alt="" width="273" height="5" src="/AppleConnect/US-EN/spacer.gif" /></td></tr>
  206. <tr><td><img alt="" width="273" height="5" src="/AppleConnect/US-EN/spacer.gif" /></td></tr>
  207.  
  208. <tr>
  209. <td>
  210. <table cellspacing='0' border='0' width='273' cellpadding='0'>
  211. <tr align='left'>
  212.  
  213. <td align='left' width='170'>
  214.  
  215.  
  216.  
  217. <font size='1'>
  218. <span class="dstext">
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225. <input border="0" alt="Did you forget your password?" type="image" name="1.Forgot" src="/AppleConnect/US-EN/labelconnect/iforgot-link.png" />
  226.  
  227.  
  228. </span>
  229. </font>
  230.  
  231. </td>
  232. <td width='15'><img alt="" width="15" height="5" src="/AppleConnect/US-EN/spacer.gif" /></td>
  233.  
  234.  
  235.  
  236. <td align='left' width='88'><input border="0" alt="Sign In" type="image" name="1.Continue" src="/AppleConnect/US-EN/labelconnect/btn-sign-in.png" /></td>
  237.  
  238.  
  239. </tr>
  240. </table>
  241. </td>
  242. </tr>
  243. </table>
  244. <input type="hidden" name="theAuxValue" />
  245. <input id="inframe" type="hidden" value="0" name="inframe" />
  246.  
  247. </form>
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. <script>
  257. var isInIframe = (self != top);
  258. var elem = document.getElementById("inframe");
  259. if (isInIframe==false)
  260. elem.value="0";
  261. else
  262. elem.value="1";
  263. </script>
  264. </div>
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275. <input style='display: none' id="ac_invites" type="text" name="0.1.17.3.13.5" />
  276. <div id="msg-container">
  277.  
  278.  
  279.  
  280. </div>
  281.  
  282. </div>
  283.  
  284. <div class="box-signin-shadow"></div>
  285.  
  286. </div>
  287.  
  288.  
  289.  
  290.  
  291. </div>
  292.  
  293.  
  294. <div class="modal-container" style="display: none">
  295. <form method="post" class="dsform" action="" id="expiredPasswordFormClone">
  296. <div id="modal" class="modal-dialog">
  297. <div class="modal-dialog-content">
  298.  
  299. <h1>Password Expired</h1>
  300. <p style="margin-top: 10px">Your password has expired. To change it, go to <a href="http://appleid.apple.com">appleid.apple.com</a>.</p>
  301.  
  302.  
  303.  
  304.  
  305. </div>
  306.  
  307. <div class="modal-buttons">
  308. <div class="right-buttons">
  309. <button class="primary" onclick="cancelExpiredForm()">Close</button>
  310.  
  311. </div>
  312. </div>
  313. </div>
  314. </form>
  315. </div>
  316.  
  317.  
  318.  
  319.  
  320. <script>
  321. (function() {
  322. var body = document.getElementsByTagName('body')[0];
  323. body.setAttribute('class', 'signin');
  324. })();
  325. </script>
  326. <script>
  327.  
  328. $(function() {
  329. // Add Learn More link to header.
  330. // var learnMoreText = 'Learn More',
  331. // learnMoreLink = '<a href="http://www.apple.com/itunes/sellcontent/" class="hero-link hl--secondary">'+learnMoreText+'</a>';
  332. //$('#header').append(learnMoreLink);
  333.  
  334. // Add iForgot link to footer
  335. var iForgotLink = "<li><a href='https://iforgot.apple.com/password'>Forgot your Apple ID or password?</a></li>";
  336. $(iForgotLink).insertBefore('#footer li:first-child')
  337.  
  338. // If we receive "Expired Password" interface, display it as a modal window
  339. var expForm = $('form[name="appleConnectExpiredPasswordForm"]');
  340. if ( expForm.length > 0 ) {
  341.  
  342. var errors = expForm.find('span.dserror');
  343. var action = expForm.attr('action');
  344.  
  345. if (errors.length > 0) {
  346. errors.each( function() {
  347. $('#ds_error_list').append('<li><div class="errormessages">'+$(this).text()+'</div></li>' );
  348. $('#ds_error_list').show();
  349. })
  350. } else {
  351. $('#ds_error_list').hide();
  352. }
  353.  
  354. var newForm = expForm.clone();
  355.  
  356. $('.box.sign-in').hide();
  357. $('#expiredPasswordFormClone').attr('name','appleConnectExpiredPasswordForm').attr('action',action);
  358. $('.modal-container').show();
  359. expForm.remove();
  360. }
  361.  
  362.  
  363.  
  364. });
  365. window.submitExpiredForm = function() {
  366. var form = document.appleConnectExpiredPasswordForm || document.getElementById('expiredPasswordFormClone') || document.forms[0];
  367. if (typeof form.submit === 'function') {
  368. form.submit();
  369. }
  370. return form;
  371. }
  372.  
  373. var cancelExpiredForm = function() {
  374. document.cookie="wosid=''; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/";
  375. /* $('.box.sign-in').show();
  376. $('.modal-container').hide();*/
  377. }
  378. </script>
  379.  
  380.  
  381.  
  382. </div>
  383.  
  384.  
  385. <div id="footer" class="footer not-global-style">
  386. <a href="http://www.apple.com" class="no-text ico-apple">Apple.com</a>
  387. <div class="right">
  388. <p>
  389. Copyright &copy; 2016 Apple Inc. All rights reserved.
  390. </p>
  391. <ul>
  392. <li>
  393. <a href="http://www.apple.com/legal/privacy">Privacy Policy</a>
  394. </li>
  395. </ul>
  396. </div>
  397. </div>
  398.  
  399.  
  400. <!-- <script src="/c/1450307132/c73408c8ecc03f63c15cd8ff11536d1d/itc/js/cleanwrapper.js"></script> -->
  401. <script src="/c/1450307132/e15e739d0caf0edc86dd4889060ae763/itc/js/signin.js"></script>
  402. </body>
  403. </HTML>
  404.  
  405.  
  406.  
  407. <script language="JavaScript" type="text/javascript" src="/c/1450307132/ef79b24de870765686c7bce9b178a66a/itc/js/omniture/library.js"></script>
  408. <script language="JavaScript" type="text/javascript"><!--
  409. /* You may give each page an identifying name, server, and channel on
  410. the next lines. */
  411. s.pageName="iTC Sign In Redesign"
  412. s.channel="Sign In"
  413.  
  414.  
  415. s.hier5="appleitmsitcdev"
  416.  
  417.  
  418. /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
  419. var s_code=s.t();if(s_code)document.write(s_code)//--></script>
  420. <script language="JavaScript" type="text/javascript"><!--
  421. if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'!-'+'-')
  422. //--></script><noscript><img src="http://metrics.apple.com/b/ss/appleitmsna/1/H.24--NS/0"
  423. height="1" width="1" border="0" alt="" /></noscript>
  424.  
  425.  
  426.  
  427.  
  428.  
  429. 200
  430. OK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement