-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathExampleSiara.java
More file actions
82 lines (70 loc) · 3.24 KB
/
Copy pathExampleSiara.java
File metadata and controls
82 lines (70 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package examples;
import java.io.IOException;
import org.json.JSONObject;
import com.DeathByCaptcha.Captcha;
import com.DeathByCaptcha.Client;
import com.DeathByCaptcha.SocketClient;
public class ExampleSiara {
public static void main(String[] args)
throws Exception {
// Put your DBC username & password or authtoken here:
String username = "your_username_here";
String password = "your_password_here";
String authtoken = "your_authtoken_here";
//Death By Captcha Socket Client
Client client = (Client) (new SocketClient(username, password));
//Death By Captcha http Client
// Client client = (Client) (new HttpClient(username, password));
client.isVerbose = true;
/* Using authtoken
Client client = (Client) new HttpClient(authtoken); */
try {
try {
System.out.println("Your balance is " + client.getBalance() + " US cents");
} catch (IOException e) {
System.out.println("Failed fetching balance: " + e.toString());
return;
}
Captcha captcha = null;
try {
// Proxy and cyber siara data
String proxy = "";
String proxytype = "";
String slideurlid = "OXR2LVNvCuXykkZbB8KZIfh162sNT8S2";
String pageurl = "https://www.cybersiara.com/book-a-demo";
String useragent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36";
/* Upload a cyber siara and poll for its status with 120 seconds timeout.
Put your proxy, proxy type, page slideurlid, page url and user agent */
JSONObject json_params = new JSONObject();
json_params.put("proxy", proxy);
json_params.put("proxytype", proxytype);
json_params.put("slideurlid", slideurlid);
json_params.put("pageurl", pageurl);
json_params.put("useragent", useragent);
captcha = client.decode(17, json_params);
} catch (IOException e) {
System.out.println("Failed uploading CAPTCHA");
return;
}
if (null != captcha) {
System.out.println("CAPTCHA " + captcha.id + " solved: " + captcha.text);
/* Report incorrectly solved CAPTCHA if necessary.
Make sure you've checked if the CAPTCHA was in fact incorrectly
solved, or else you might get banned as abuser. */
/*try {
if (client.report(captcha)) {
System.out.println("Reported as incorrectly solved");
} else {
System.out.println("Failed reporting incorrectly solved CAPTCHA");
}
} catch (IOException e) {
System.out.println("Failed reporting incorrectly solved CAPTCHA: " + e.toString());
}*/
} else {
System.out.println("Failed solving CAPTCHA");
}
} catch (com.DeathByCaptcha.Exception e) {
System.out.println(e);
}
}
}