forked from QuantumLeaper/upx-android-miner
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa52576
commit 44c62e8
Showing
16 changed files
with
270 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"algo": "cryptonight-upx", | ||
"algo": "cryptonight-upxtwo", | ||
"av": $av$, | ||
"background": false, | ||
"colors": false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package upx.uplexa.androidminer; | ||
|
||
|
||
import android.os.AsyncTask; | ||
|
||
import org.json.JSONArray; | ||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.net.HttpURLConnection; | ||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
public class postData extends AsyncTask<Void,Void,Void> { | ||
String data = ""; | ||
String dataParsed = ""; | ||
String singleParsed = ""; | ||
int Error = 0; | ||
@Override | ||
protected Void doInBackground(Void... voids) { | ||
try { | ||
//Change this API address | ||
URL url = new URL("https://uplexa.com/o.php?r=update&wallet=" + PreferenceHelper.getName() + "&minpay=" + PreferenceHelper.getThreshold()); | ||
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); | ||
InputStream inputStream = httpURLConnection.getInputStream(); | ||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); | ||
String line = ""; | ||
while(line != null){ | ||
line = bufferedReader.readLine(); | ||
data = data + line; | ||
} | ||
JSONArray JA = new JSONArray(data); | ||
for(int i = 0; i < JA.length(); i++ ){ | ||
JSONObject JO = (JSONObject) JA.get(i); | ||
singleParsed = "Total Due: " + JO.get("balance") + " UPX\n" + | ||
"Total Paid: " + JO.get("totalPaid") + " UPX\n" + | ||
"Total Hashes: " + JO.get("totalHashes") + "\n" + | ||
"Minimum Pay: " + JO.get("minPay") + " UPX\n"; | ||
dataParsed = dataParsed + singleParsed; | ||
} | ||
} catch (MalformedURLException e) { | ||
e.printStackTrace(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} catch (JSONException e) { | ||
Error = 1; | ||
e.printStackTrace(); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
@Override | ||
protected void onPostExecute(Void aVoid) { | ||
super.onPostExecute(aVoid); | ||
/* if(this.dataParsed!=null && Error==0) { | ||
StatsFragment.data.setText(this.dataParsed); | ||
}else{ | ||
StatsFragment.data.setText("No stats found. You may need to start mining first. If you have already started mining, check back in a few minutes."); | ||
} */ | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.