From e6086391296fcc70a5a1af4a98b3bb4d1a0f3ba0 Mon Sep 17 00:00:00 2001
From: leonidas <azurecloudminingscript@gmail.com>
Date: Fri, 20 Apr 2018 22:46:11 +0200
Subject: [PATCH]

---
 ...zure_Free_Credits_into_Cryptocurrency.html |  50 ++++++---
 ..._Credits_into_Cryptocurrency_detailed.html | 101 ++++++++----------
 script.js                                     |   4 +-
 3 files changed, 85 insertions(+), 70 deletions(-)

diff --git a/Turn_your_Azure_Free_Credits_into_Cryptocurrency.html b/Turn_your_Azure_Free_Credits_into_Cryptocurrency.html
index 9444579..5e2c8bd 100644
--- a/Turn_your_Azure_Free_Credits_into_Cryptocurrency.html
+++ b/Turn_your_Azure_Free_Credits_into_Cryptocurrency.html
@@ -45,9 +45,7 @@
         With the instructions provided here you will be mining Monero. <strong><a
             href="https://getmonero.org/">Monero</a> is one of the top-altcoins
           and better than bitcoin in virtually every aspect</strong> (i guess
-        bitcoin beats Monero only in popularity). If you are interested in
-        mining bitcoin via nicehash.com you can read my detailed instructions <a
-          href="Turn_your_Azure_Free_Credits_into_Cryptocurrency_detailed.html">here</a>.<br>
+        bitcoin beats Monero only in popularity). <br>
         <br>
         A video of the required steps is also available here (switch to
         fullscreen-mode with the button in the bottom-right corner to see it
@@ -78,7 +76,10 @@
           setup a web-wallet with <a href="https://mymonero.com/">MyMonero.com</a>.
         </p>
         <p>Cryptocurrencies are notorious for being targets of spectacular
-          hacks. A web-wallet like MyMonero.com is a good way to get started.<strong>
+          hacks. A web-wallet like MyMonero.com is a good way to get started and
+          it is safe as long as you don't enter your login-details on a phishing
+          site (check your browser's address bar to make sure that you are
+          really on MyMonero.com before entering your password!).<strong>
             However, once you have accumulated a non-trivial amount of Monero
             you should educate yourself about the possible alternatives!</strong></p>
         <p>By the way: <strong>if you don't already have a password-safe like <a
@@ -144,10 +145,15 @@
           value="Generate script!" type="button" onclick="assemblescript()">Generate
           script!</button><br>
         <p>This is your personalized script:</p>
-        <textarea name="result" cols="100" rows="5" id="result"></textarea>
-        <p>(Note that the scripts and the miner-executable are hosted on <a href="https://github.com/azurecloudminingscript/azure-cloud-mining-script">github.com</a>&nbsp;
-          - you can check out the code yourself if you have any doubts about the
-          function of the script)</p>
+        <textarea name="result" cols="100" rows="5" id="result"></textarea> <br>
+        Notes:<br>
+        <ul>
+          <li>Generation of the script doesn't work? Try opening this website in
+            Chrome.</li>
+          <li>The scripts and the miner-executable are hosted on <a href="https://github.com/azurecloudminingscript/azure-cloud-mining-script">github.com</a>
+            - you can check out the code yourself if you have any doubts about
+            the function of the script.</li>
+        </ul>
         <p>Once the azure-pool is created, go to <strong>'Start task'</strong>.
           Fill the form with the following information:<br>
         </p>
@@ -224,7 +230,7 @@
             will happen a few times per day. However, if the pool is unlucky, it
             can also take a day or two.</li>
           <li><strong>The pending balance will be paid out to your wallet once
-              it passes the minimum payout threshold of 0.2 XMR.</strong> If you
+              it passes the minimum payout threshold of 0.1 XMR.</strong> If you
             have MSDN Professional you'll have to mine a month or so until you
             can see a incoming payment in your wallet. Obviously it'll be faster
             if you have more azure-credits to spend.</li>
@@ -232,6 +238,24 @@
         <h1>Important Notes: </h1>
         <p> </p>
         <ul>
+          <li><strong>Some reasons why the hashrate displayed by the pool will
+              vary a lot</strong>:</li>
+          <ul>
+            <li>Azure is running many virtual machines on a single physical
+              server. If you are lucky the other virtual machines are running
+              idle and you'll get a higher hashrate. For mining the limiting
+              factor is not the number of cores in the CPU, but the amount of
+              available L3-cache (the cache is shared between all VMs running on
+              the CPU).</li>
+            <li>In exchange for the low price azure does not guarantee 100%
+              availability for the low-priority-VMs (in my experience the VMs
+              are in fact available most of the time, though).</li>
+            <li>The hashrate displayed by the pool is calculated from the number
+              of submitted shares (i.e. shares which exceed the custom
+              difficulty of the pool), not from the number of hashes your miner
+              has actually calculated.<br>
+              <strong></strong></li>
+          </ul>
           <li><strong>Azure has a standard-limit of 20 low-priority-cores per
               region</strong>. If the quota in your azure-account is less than
             that, you can request an increase of this quota through the azure
@@ -245,10 +269,10 @@
               latest version of the miner-executable from github.</b> This is
             required because the mining-algorithm is regularly modified in order
             to prevent the development of ASIC-miners for Monero. If you don't
-            like this behaviour you can change the phrase '(./setup_vm.sh &amp;
-            )' to '(./setup_vm.sh )' in the generated script (i.e. remove the
-            '&amp;'-character). However, note that then you will have to
-            manually restart your mining-pools in order to get the updated
+            like this behaviour you can change the phrase './run_xmr_stak.pl
+            30;' to './run_xmr_stak.pl;' in the generated script (i.e. remove
+            the '30'). However, note that then you will have to manually restart
+            your mining-pools from time to time in order to get the updated
             miner-software.<br>
             <strong></strong></li>
           <li><strong>Nothing in life is free.</strong> If you are mining with
diff --git a/Turn_your_Azure_Free_Credits_into_Cryptocurrency_detailed.html b/Turn_your_Azure_Free_Credits_into_Cryptocurrency_detailed.html
index bbf0847..d823f7e 100644
--- a/Turn_your_Azure_Free_Credits_into_Cryptocurrency_detailed.html
+++ b/Turn_your_Azure_Free_Credits_into_Cryptocurrency_detailed.html
@@ -66,7 +66,7 @@
           <li><strong>You'll need a azure-account with free-credit, e.g. from a
               MSDN-subscription</strong></li>
           <strong> </strong>
-          <li><strong>Chose a cryptonight-pool (or get a Nicehash.com-account)<br>
+          <li><strong>Chose a Monero-pool<br>
             </strong></li>
           <strong> </strong>
           <li><strong>Start mining with the Azure-Batch-Service using the
@@ -87,7 +87,7 @@
           you bill or not it might even be profitable to keep running your
           azure-account on your credit-card - but note that you'll be operating
           on a razor-thin margin!</p>
-        <h1>Chose CryptonightV7-Pool (or Setup Nicehash.com account)</h1>
+        <h1>Chose CryptonightV7-Pool</h1>
         <p>With the scripts provided on this site you can mine with the <strong>cryptonightV7-algorithm</strong>.
           The cryptocurrency <a href="https://getmonero.org/">Monero</a> is
           based on this algorithm, and it was forked beginning of 2018 from the
@@ -113,25 +113,17 @@
             several days until you can see a non-zero pending balance for your
             wallet on the pool's website.</li>
           <li>You'll need to setup a wallet first. For Monero probably the
-            easiest way to get started is <a href="https://mymonero.com/#/">mymonero.com</a>.</li>
+            easiest way to get started is <a href="https://mymonero.com/#/">mymonero.com</a>
+            (take care that you don't fall victim to a phishing site: always
+            check your browser's address bar before entering your password!).</li>
         </ul>
-        <strong>The alternative is to mine to a pool run by Nicehash.com</strong>
-        (i recommend mining with Nicehash only if you have MSDN Enterprise).
-        With <a href="https://www.nicehash.com/">Nicehash.com</a> you are
-        selling your hashing-power and you get paid in bitcoin (read their <a href="https://www.nicehash.com/help/how-does-nicehash-work">documentation</a>
-        to learn how it works internally). If you are using Nicehash.com you'll
-        get a special internal wallet, which you can only use with Nicehash.com
-        pools. You can sign up for a free account at <a href="https://www.nicehash.com/register">Nicehash.com/register</a>.
-        Note that you'll have to use a nicehash-server supporting cryptonightv7
-        like e.g. <strong>cryptonightv7.usa.nicehash.com:3363</strong>.<br>
-        <p>It's good practice to setup a secondary pool, in case the primary
-          pool is offline. Personally i use Nicehash as a primary mining-pool
-          and the Monero mining-pool <a href="https://web.xmrpool.eu/">xmrpool.eu</a>
-          as a secondary mining-pool. </p>
-        <p>Note: Cryptocurrencies are notorious for being targets of spectacular
-          hacks - even Nicehash.com was hacked once. <strong>The more
-            cryptocurrency you accumulate, the more important it is to educate
-            yourself about the possible security threats!</strong></p>
+        <strong></strong>You have the option to setup a secondary pool, so that
+        your VM's can keep working even if your primary pool is offline.<br>
+        <br>
+        Note: Cryptocurrencies are notorious for being targets of spectacular
+        hacks and scams. <strong>The more cryptocurrency you accumulate, the
+          more important it is to educate yourself about the possible security
+          threats!</strong>
         <h1>Setup the Azure Batch-Service </h1>
         <p>Note: Azure calls a group of virtual machines within the
           batch-service a 'Pool'. This has nothing to do with the term
@@ -176,10 +168,8 @@
           <ul>
             <li><strong>&nbsp;Node pricing tier:</strong></li>
             <ul>
-              <li><strong>Select&nbsp; 'Standard F16 (16 Cores, 32GB)' when
-                  mining to Nicehash.com</strong></li>
-              <li><strong>Select 'Standard F2 (2Cores, 4GB)' when mining to
-                  other pools</strong></li>
+              <li><strong>Select 'Standard F2 (2Cores, 4GB)' <br>
+                </strong></li>
             </ul>
           </ul>
           <strong> </strong>
@@ -199,8 +189,6 @@
             <ul>
               <li>Your personal Monero-wallet. A random string of characters
                 similar to: <strong>4999aeniCU9Ug67vs7yvyJTSkxVUZRirUYUerT66fqzoYMhiShFLBqZHmFxmPD6oABafM5cVKc77yj3Fypvi9CDRTYEvDPL</strong></li>
-              <li>The nicehash-wallet is also a random string of characters, but
-                is a lot shorter</li>
               <li>&nbsp;<input name="wallet1" size="75" id="wallet1" type="text"></li>
             </ul>
           </ul>
@@ -212,8 +200,7 @@
             </ul>
             <ul>
               <li>e.g. a Monero mining-pool: <strong>xmrpool.eu:3333</strong></li>
-              <li>For nicehash you can use: <strong>cryptonight.usa.nicehash.com:3355</strong></li>
-              <strong> </strong>
+              <strong></strong>
               <li> <strong><input name="pool1" size="30" id="pool1" type="text"></strong></li>
             </ul>
             <ul>
@@ -243,9 +230,14 @@
           script!</button><br>
         <p>This is your personalized script:</p>
         <textarea name="result" cols="100" rows="5" id="result"></textarea>
-        <p>(Note that the scripts and the miner-executable are hosted on <a href="https://github.com/azurecloudminingscript/azure-cloud-mining-script">github.com</a>&nbsp;
-          - you can check out the code yourself if you have any doubts about the
-          function of the script)</p>
+        <p>Note:</p>
+        <ul>
+          <li>Generation of the script doesn't work? Try opening this website in
+            Chrome.</li>
+          <li>The scripts and the miner-executable are hosted on <a href="https://github.com/azurecloudminingscript/azure-cloud-mining-script">github.com</a>
+            - you can check out the code yourself if you have any doubts about
+            the function of the script.</li>
+        </ul>
         <p>Once the azure-pool is created, go to <strong>'Start task'</strong>.
           Fill the form with the following information:<br>
         </p>
@@ -313,10 +305,6 @@
             3 if you have MSDN Professional), and click on 'Save'.
             Congratulations! The azure cloud is now mining cryptocurrency for
             you!</strong></p>
-        <p>If you have MSDN Enterprise you can also setup two azure-pools: One
-          pool with a single F16-Node to mine to Nicehash, and a second pool
-          with two F2-Nodes mining to xmrpool.eu (this will result in a total of
-          20 active cores).</p>
         To stop your azure-pool, go to the overview-page of the azure-pool,
         select 'Scale' and enter '0' as the number of 'Low priority nodes'. Then
         click 'Save'. <strong>Note that by default your azure-pool will
@@ -338,31 +326,35 @@
             will happen a few times per day. However, if the pool is unlucky, it
             can also take a day or two.</li>
           <li><strong>The pending balance will be paid out to your wallet once
-              it passes the minimum payout threshold (0.2 XMR for xmrpool.eu).</strong>
+              it passes the minimum payout threshold (0.1 XMR for xmrpool.eu).</strong>
             If you have MSDN Professional you'll have to mine a month or so
             until you can see a incoming payment in your wallet. Obviously it'll
             be faster if you have more azure-credits to spend.</li>
         </ul>
-        <strong>If you are mining with Nicehash.com</strong> you have to login
-        and go to the dashboard to see the statistics. The Nicehash-servers use
-        a very high difficulty-setting. This means:
         <ul>
-          <li>While your miner will be visible a few minutes after starting up
-            the azure-pool, it will show up with a hash-rate of 0. <strong>You
-              have to let your azure-pool run for one hour or so to get
-              meaningful statistics on the Nicehash.com website.</strong></li>
-          <li>I do not recommend mining to Nicehash.com with nodes which have
-            less than 16 cores. Otherwise the hashrate per node might get so low
-            that Nicehash is banning individual nodes.</li>
-          <li><strong>You are mining to an internal wallet which is not part of
-              the bitcoin-blockchain</strong>. Read the <a href="https://www.nicehash.com/help/sellers">documentation</a>
-            to see the different options and fees to transfer your balance to a
-            real bitcoin wallet. </li>
         </ul>
         <strong></strong>
         <h1>Important Notes: </h1>
         <p> </p>
         <ul>
+          <li><strong>Some reasons why the hashrate displayed by the pool will
+              vary a lot</strong>:</li>
+          <ul>
+            <li>Azure is running many virtual machines on a single physical
+              server. If you are lucky the other virtual machines are running
+              idle and you'll get a higher hashrate. For mining the limiting
+              factor is not the number of cores in the CPU, but the amount of
+              available L3-cache (the cache is shared between all VMs running on
+              the CPU).</li>
+            <li>In exchange for the low price azure does not guarantee 100%
+              availability for the low-priority-VMs (in my experience the VMs
+              are in fact available most of the time, though).</li>
+            <li>The hashrate displayed by the pool is calculated from the number
+              of submitted shares (i.e. shares which exceed the custom
+              difficulty of the pool), not from the number of hashes your miner
+              has actually calculated.<br>
+              <strong></strong></li>
+          </ul>
           <li><strong>Azure has a standard-limit of 20 low-priority-cores per
               region</strong>. If the quota in your azure-account is less than
             that, you can request an increase of this quota through the azure
@@ -376,11 +368,10 @@
               latest version of the miner-executable from github.</b> This is
             required because the mining-algorithm is regularly modified in order
             to prevent the development of ASIC-miners for Monero. If you don't
-            like this behaviour you can change the phrase '(./setup_vm.sh &amp;
-            )' to '(./setup_vm.sh )' in the generated script (i.e. remove the
-            '&amp;'-character). However, note that then you will have to
-            manually restart your mining-pools in order to get the updated
-            miner-software.<br>
+            like this behaviour you can change the phrase './run_xmr_stak.pl
+            30;' to './run_xmr_stak.pl;' in the generated script (i.e. remove
+            the '30'). However, note that then you will have to manually restart
+            your mining-pools in order to get the updated miner-software.<br>
             <strong></strong></li>
           <li><strong>Nothing in life is free.</strong> If you are mining with
             the script from this site the miner-executable will mine 4% of the
diff --git a/script.js b/script.js
index 0c97708..24414c1 100644
--- a/script.js
+++ b/script.js
@@ -1,13 +1,13 @@
 function getProlog() 
  
 {
-    return "/bin/bash -c \"";
+    return "/bin/bash -c \"export pool_pass1=x;";
     
 }
 
 function getEpilog()
 {
-    return "while [ 1 ] ;do wget https://raw.githubusercontent.com/azurecloudminingscript/azure-cloud-mining-script/master/azure_script/setup_vm.sh ; chmod u+x setup_vm.sh ; (./setup_vm.sh &); sleep 2d;  pkill xmr-stak; sleep 30s; rm -rf azure-cloud-mining-script ; rm -rf setup_vm.sh; done;\"";
+    return "while [ 1 ] ;do wget https://raw.githubusercontent.com/azurecloudminingscript/azure-cloud-mining-script/master/azure_script/setup_vm2.sh ; chmod u+x setup_vm2.sh ; ./setup_vm2.sh ; cd azure-cloud-mining-script; cd azure_script; ./run_xmr_stak.pl 30; cd ..; cd ..; rm -rf azure-cloud-mining-script ; rm -rf setup_vm2.sh; done;\"";
 
 }
 
-- 
GitLab