HTTP 418 while automining Unicoins [closed] - unicoins

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
Clicking rocks is fun, but I wanted to automate the process of mining unicoins.
I found the following code while googling for "Satoshi Nakamoto". It will exploit a flaw in the Unicoin protocol called "rock malleability". Somehow, rainbow tables are used as well.
It's easy to use, just bring up your developer's console in Chrome and enter the following:
setInterval(
function(){
$.get(
"/unicoin/rock?_=" + String(new Date().getTime()),
function(rainbowTable){
$.post(
"/unicoin/mine?rock=" + rainbowTable.rock,
{"fkey": $("#fkey").val()},
function(malleableRock){
console.log(
"Mined " + malleableRock.value + " unicoin(s)");
}
)
}
)
}, 11000)
The problem is that I'm getting an HTTP error -- HTTP 418 to be specific. What am I doing wrong?

Here is a UserScript that automatically mines Unicoins while you browse Stack Exchange sites:
// ==UserScript==
// #name UnicoinHax
// #namespace http://stackexchange.com
// #description Constantly gives you Unicoins whenever you visit a Stack Exchange site
// #include http://*.stackoverflow.com/*
// #include https://*.stackoverflow.com/*
// #include http://*.serverfault.com/*
// #include https://*.serverfault.com/*
// #include http://*.superuser.com/*
// #include https://*.superuser.com/*
// #include http://stackapps.com/*
// #include https://stackapps.com/*
// #include http://*.stackexchange.com/*
// #include https://*.stackexchange.com/*
// #include http://*.askubuntu.com/*
// #include https://*.askubuntu.com/*
// #version 1
// #grant none
// ==/UserScript==
//You can also just copy this code and paste it into the console on any page where the domain is a Stack Exchange site:
var hackMeSomeUnicoins = function(myFkey) {
console.log("Unicoin hacking begun!");
window.setInterval(function() {
$.get(window.location.protocol + "//" + window.location.host + "/unicoin/rock", function( data ) {
var rockId = data.rock;
$.post(window.location.protocol + "//" + window.location.host + "/unicoin/mine?rock=" + rockId, {fkey: myFkey})
.done(function(data) {
console.log(data);
});
});
}, 11000);
};
hackMeSomeUnicoins(StackExchange.options.user.fkey);
Github link.
It is based heavily off of this script by alais1.

Related

Can Arduino Send Data to Rails Server using REST API method? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can We send data from arduino that using ethernet or wifi shield to RAILS server using API? If it possibly to be done, can you tell me which library and how to use it?
Yes, you can make calls to RESTful APIs from Arduino through ethernet or wifi shields. I prefer using standard libraries such as Ethernet / Ethernet 2.
Here is a sample (ethernet) implementation for your reference:
#include <Ethernet2.h>
#include <EthernetClient.h>
#include <EthernetUdp2.h>
#include <util.h>
IPAddress _ip(192, 168, 1, 12); // Client (Arduino) IP address
byte _mac[] = {0x90, 0xA2, 0xDA, 0x11, 0x3C, 0x69}; // Arduino mac address
char _server[] = "192.168.1.10"; // Server IP address
int _port = 9200; // Server port number
EthernetClient _client;
void setup() {
Ethernet.begin(_mac, _ip);
delay(1000);
Serial.print("Local IP: ");
Serial.println(Ethernet.localIP());
if (_client.connect(_server, _port)) {
Serial.println("SUCCESS: Connected to the server!");
} else {
Serial.println("ERROR: Connection failed to the server!");
return;
}
delay(1000);
}
void loop() {
// JSON formatted data package including sample
// 'temperature', 'humidity', and 'timestamp' values
String data = "{\"temperature\": " + String(temperature) + ", " +
"\"humidity\": " + String(humidity) + ", " +
"\"timestamp\": " + String(timestamp) + "}";
String url = "/my-api/savedata"; // API url hosted on the server
// Finally, make an API call: POST request
_client.print("POST " + url + " HTTP/1.1 \r\n" +
"Content-Type: application/json \r\n" +
"Content-Length: " + data.length() + " \r\n" +
"\r\n" + data);
delay(500); // Give the network some time
// Read all the lines of the reply from server and
// print them to Serial to validate your API call
while (_client.available()) {
String reply = _client.readStringUntil('\r');
Serial.print(reply);
}
Serial.println();
}

How can i use back4app with AngularJS application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want use Back4App with angularjs application, for simple user login.
Can I do this and how?
Yes this can be done and is done. Use the javascript doc on parse.com http://docs.parseplatform.org/js/guide/
Also there is a nodejs tool. https://www.npmjs.com/package/angular-parse
Are you familiar with Angularjs?
Load angularjs and parse in HTML
In your controller, pass data from your sign in form:
$scope.submitFormReg = function(newUser){
var user = new Parse.User();
user.set("username", newUser.user);
user.set("password", newUser.pass);
user.set("email", newUser.email);
user.signUp(null, {
success: function(user) {
// Hooray! Let them use the app now.
},
error: function(user, error) {
// Show the error message somewhere and let the user try again.
alert("Error: " + error.code + " " + error.message);
Parse.User.logOut().then(() => {
});
}
});
};
$scope.submitFormLogin = function(newUser){
Parse.User.logIn(newUser.user, newUser.pass, {
success: function(user) {
// Do stuff after successful login.
$location.path('/');
},
error: function(user, error) {
// The login failed. Check error to see why.
alert(newUser + " login failed: " + error);
}
});
};

Http client mode with Contiki?

I want to make a webAPI call from a sensor using http, is it possible to do http requests using Contiki OS?
As far as I've searched I found only coap client examples.
Check the examples/http-socket example, it shows how to use CRUD methods such as PUT, GET, etc.
Here's the link to the example (working with the latest master commit)
This example relies on IP64, but can be changed to work with IPv6, basically you need to include the http-socket library. Here are the more relevant parts of the example:
#include "contiki-net.h"
#include "http-socket.h"
#include "ip64-addr.h"
#include <stdio.h>
static struct http_socket s;
static int bytes_received = 0;
static void
callback(struct http_socket *s, void *ptr,
http_socket_event_t e,
const uint8_t *data, uint16_t datalen)
{
if(e == HTTP_SOCKET_ERR) {
printf("HTTP socket error\n");
} else if(e == HTTP_SOCKET_DATA) {
bytes_received += datalen;
printf("HTTP socket received %d bytes of data\n", datalen);
}
}
PROCESS_THREAD(http_example_process, ev, data)
{
PROCESS_BEGIN();
/* Initializes the socket */
http_socket_init(&s);
/* GET request */
http_socket_get(&s, "http://www.contiki-os.org/", 0, 0,
callback, NULL);
/* Waits forever for the HTTP callback */
while(1) {
PROCESS_WAIT_EVENT_UNTIL(0);
}
PROCESS_END();
}
Yes you can do that:
What I understand is that you are looking for Websense Example in Contiki OS.it uses HTTP protocl.
A: so find this file.
~/contiki/examples/zolertia/z1/ipv6/z1-websense/z1-websense.c
Burn it on Sender Mote.
Burn border-router.c file located in /home/superuser/contiki/examples/ipv6/rpl-border-router/
Connect Border Router with tunnelslip with command make connect-router.
use the HTTP IPV6 url shown by tunnelslip on connection.
this url in browser will give you address of motes connected to it.
use that sender mote address in web browser and see the mote output.
B: or from contiki/cooja simulator:
launch this project file. this is working demo for the websense.
~contiki/examples/zolertia/z1/ipv6/z1-websense/example-z1-websense.csc
and repeat from step 3.
for further you can ask me.

Disposable Temporary Email with attachment download API support [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am working on an application that uses guerrillamail to get temporary email and then I use its given API's to get the contents of emails sent to this id. What I am not able to achieve is that if email contains attachment how can I download it using API or parse the MIME using a mime parser library if I have the email source?
Or can you please recommend any alternative that provide API support to download attachments.
I tried to see if I could find an answer, so I made some code that seems to work:
var template_content = $("#mail")[0].content;
var tep = $("#mail");
function getMail(id, mail_id) {
$.get("https://api.guerrillamail.com/ajax.php?f=fetch_email&lang=en&sid_token=" + id + "&email_id=" + mail_id, function(mail) {
console.log("Mail:");
console.log(mail);
template_content.querySelector('p:nth-of-type(1)').innerHTML = mail.mail_from;
template_content.querySelector('p:nth-of-type(2)').innerHTML = mail.mail_subject;
template_content.querySelector('p:nth-of-type(3)').innerHTML = mail.mail_body;
if (mail.att == 0) {
template_content.querySelector('span').innerHTML = "-none-";
} else {
var sp = template_content.querySelector('span');
$.each(mail.att_info, function(l, att) {
console.log(att);
var a = document.createElement('a');
console.log(a);
var linkText = document.createTextNode(att.f + " [" + att.t + "]");
a.appendChild(linkText);
a.title = att.f + " [" + att.t + "]";
a.href = "https://www.guerrillamail.com/inbox?get_att&lang=en&sid_token=" + id + "&email_id=" + mail.mail_id + "&part_id=" + att.p;
sp.appendChild(a);
});
}
var clone = document.importNode(template_content, true);
document.querySelector('#mails').appendChild(clone);
});
}
$.get("https://api.guerrillamail.com/ajax.php?f=get_email_address&lang=en", function(data) {
var email = data.email_addr;
var id = data.sid_token;
$("#email_addr").text(email);
$("#pane").show();
$("#get").click(function() {
$.get("https://api.guerrillamail.com/ajax.php?f=get_email_list&lang=en&sid_token=" + id + "&offset=0", function(data) {
console.log(data.list);
var tep = $("#mail");
$.each(data.list, function(i, mail) {
getMail(id, mail.mail_id)
});
});
});
});
p {
display: inline
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="pane" style="display:none">
<p>Send email with attachment to [<b id="email_addr">frefr</b>] and press the button:</p>
<button id="get">Get mails!</button>
</div>
<br/>
<br/>
<div id="mails">
</div>
<template id="mail">
<div>
<h2>Mail</h2>
Sender:
<p>1</p>
<br/>Subject:
<p>2</p>
<br/>Body:
<br/>
<hr/>
<p>3</p>
<br/>
<hr/>Attachments:
<br>
<span></span>
</div>
</template>
I can't find any info about the attachment stuff in the documentation, but in my code I used the "normal" attachment link, and it seems to work:
https://www.guerrillamail.com/inbox?get_att&lang=en&sid_token={sid_token}&email_id={email_id}&part_id={part_id}";
Look at my example code to see how to use it.
You seem to have most of the code done on the iPhone side, basically you just have to add a call to the get_att url with the att parameters from the fetch_email.
Temp Mail seems to have an API that suits your needs. You can retrieve an email attachment with:
https://privatix-temp-mail-v1.p.mashape.com/request/attachments/id/{md5}/
It gives you back a JSON array of all the attachment.

Is there any Facebook plugin for phonegap 2.7.0? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Is there any Facebook plugin for Phonegap 2.7.0?
When we try the below one, we are end up with deprecated error on Phonegap 2.7.0.
https://github.com/phonegap/phonegap-facebook-plugin/blob/master/README.md
We couldn't find anything when we Google it.
Thank you,
Sid
I would suggest you use the inappbrowser plugin that comes with phonegap to do this .. example shown below.
Fill in the xxx below with your relevant info
var my_client_id = "xxxxxx", // YOUR APP ID
my_secret = "xxxxxxxxx", // YOUR APP SECRET
my_redirect_uri = "https://www.facebook.com/connect/login_success.html", // LEAVE THIS
my_type ="user_agent", my_display = "touch"; // LEAVE THIS
var facebook_token = "fbToken"; // OUR TOKEN KEEPER
var ref; //IN APP BROWSER REFERENCE
// FACEBOOK
var Facebook = {
init:function(){
// Begin Authorization
var authorize_url = "https://www.facebook.com/dialog/oauth?";
authorize_url += "client_id=" + my_client_id;
authorize_url += "&redirect_uri=" + my_redirect_uri;
authorize_url += "&display=" + my_display;
authorize_url += "&scope=publish_stream";
//CALL IN APP BROWSER WITH THE LINK
ref = window.open(authorize_url, '_blank', 'location=no');
ref.addEventListener('loadstart', function(event){
Facebook.facebookLocChanged(event.url);
});
},
facebookLocChanged:function(loc){
if (loc.indexOf("code=") >= 1 ) {
//CLOSE INAPPBROWSER AND NAVIGATE TO INDEX
ref.close();
//THIS IS MEANT TO BE DONE ON SERVER SIDE TO PROTECT CLIENT SECRET
var codeUrl = 'https://graph.facebook.com/oauth/access_token?client_id='+my_client_id+'&client_secret='+my_secret+'&redirect_uri='+my_redirect_uri+'&code='+loc.split("=")[1];
console.log('CODE_URL::' + codeUrl);
$.ajax({
url: codeUrl,
data: {},
type: 'POST',
async: false,
cache: false,
success: function(data, status){
//WE STORE THE TOKEN HERE
localStorage.setItem(facebook_token, data.split('=')[1].split('&')[0]);
},
error: function(){
alert("Unknown error Occured");
}
});
}
}
I would add more functions for logout and posting to a wall etc.
You can find documenatation on the inappbrowser here

Resources