SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | error_reporting(0); | |
3 | class curl { | |
4 | var $ch, $agent, $error, $info, $cookiefile, $savecookie; | |
5 | function curl() { | |
6 | $this->ch = curl_init(); | |
7 | curl_setopt ($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.164.0 Safari/530.1'); | |
8 | curl_setopt ($this->ch, CURLOPT_HEADER, 1); | |
9 | curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1); | |
10 | curl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, 0); | |
11 | curl_setopt ($this->ch, CURLOPT_SSL_VERIFYHOST, 0); | |
12 | curl_setopt ($this->ch, CURLOPT_FOLLOWLOCATION,true); | |
13 | curl_setopt ($this->ch, CURLOPT_TIMEOUT, 30); | |
14 | curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,30); | |
15 | } | |
16 | function header($header) { | |
17 | curl_setopt ($this->ch, CURLOPT_HTTPHEADER, $header); | |
18 | } | |
19 | function timeout($time){ | |
20 | curl_setopt ($this->ch, CURLOPT_TIMEOUT, $time); | |
21 | curl_setopt ($this->ch, CURLOPT_CONNECTTIMEOUT,$time); | |
22 | } | |
23 | function http_code() { | |
24 | return curl_getinfo($this->ch, CURLINFO_HTTP_CODE); | |
25 | } | |
26 | function error() { | |
27 | return curl_error($this->ch); | |
28 | } | |
29 | function ssl($veryfyPeer, $verifyHost){ | |
30 | curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $veryfyPeer); | |
31 | curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $verifyHost); | |
32 | } | |
33 | function cookies($cookie_file_path) { | |
34 | $this->cookiefile = $cookie_file_path;; | |
35 | $fp = fopen($this->cookiefile,'wb');fclose($fp); | |
36 | curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile); | |
37 | curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile); | |
38 | } | |
39 | function proxy($sock) { | |
40 | curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true); | |
41 | curl_setopt ($this->ch, CURLOPT_PROXY, $sock); | |
42 | } | |
43 | function post($url, $data) { | |
44 | curl_setopt($this->ch, CURLOPT_POST, 1); | |
45 | curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data); | |
46 | return $this->getPage($url); | |
47 | } | |
48 | function data($url, $data, $hasHeader=true, $hasBody=true) { | |
49 | curl_setopt ($this->ch, CURLOPT_POST, 1); | |
50 | curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data)); | |
51 | return $this->getPage($url, $hasHeader, $hasBody); | |
52 | } | |
53 | function get($url, $hasHeader=true, $hasBody=true) { | |
54 | curl_setopt ($this->ch, CURLOPT_POST, 0); | |
55 | return $this->getPage($url, $hasHeader, $hasBody); | |
56 | } | |
57 | function getPage($url, $hasHeader=true, $hasBody=true) { | |
58 | curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0); | |
59 | curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1); | |
60 | curl_setopt ($this->ch, CURLOPT_URL, $url); | |
61 | $data = curl_exec ($this->ch); | |
62 | $this->error = curl_error ($this->ch); | |
63 | $this->info = curl_getinfo ($this->ch); | |
64 | return $data; | |
65 | } | |
66 | } | |
67 | ||
68 | function fetchCurlCookies($source) { | |
69 | preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches); | |
70 | $cookies = array(); | |
71 | foreach($matches[1] as $item) { | |
72 | parse_str($item, $cookie); | |
73 | $cookies = array_merge($cookies, $cookie); | |
74 | } | |
75 | return $cookies; | |
76 | } | |
77 | ||
78 | function string($length = 15) | |
79 | { | |
80 | $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; | |
81 | $charactersLength = strlen($characters); | |
82 | $randomString = ''; | |
83 | for ($i = 0; $i < $length; $i++) { | |
84 | $randomString .= $characters[rand(0, $charactersLength - 1)]; | |
85 | } | |
86 | return $randomString; | |
87 | } | |
88 | ||
89 | function angka($length = 15) | |
90 | { | |
91 | $characters = '0123456789'; | |
92 | $charactersLength = strlen($characters); | |
93 | $randomString = ''; | |
94 | for ($i = 0; $i < $length; $i++) { | |
95 | $randomString .= $characters[rand(0, $charactersLength - 1)]; | |
96 | } | |
97 | return $randomString; | |
98 | } | |
99 | function fetch_value($str,$find_start,$find_end) { | |
100 | $start = @strpos($str,$find_start); | |
101 | if ($start === false) { | |
102 | return ""; | |
103 | } | |
104 | $length = strlen($find_start); | |
105 | $end = strpos(substr($str,$start +$length),$find_end); | |
106 | return trim(substr($str,$start +$length,$end)); | |
107 | } | |
108 | ||
109 | function loop($socks,$timeout,$reff) { | |
110 | $curl = new curl(); | |
111 | $curl->cookies('cookies/'.md5($_SERVER['REMOTE_ADDR']).'.txt'); | |
112 | $curl->ssl(0, 2); | |
113 | $curl->timeout($timeout); | |
114 | $curl->proxy($socks); | |
115 | ||
116 | ||
117 | $deviceId = string(15); | |
118 | $angka1 = angka(1); | |
119 | $angka2 = angka(2); | |
120 | $angka3 = angka(3); | |
121 | $page_api = file_get_contents('https://www.fakenamegenerator.com'); | |
122 | $address = fetch_value($page_api, '<div class="address">','</div>'); | |
123 | $name = fetch_value($address, '<h3>','</h3>'); | |
124 | preg_match_all('/<dl class="dl-horizontal">(.*?)<\/dl>/s', $page_api, $user); | |
125 | $mail = fetch_value($user[1][8], '<dd>','<div class="adtl">'); | |
126 | $mail_p = explode('@', $mail); | |
127 | $domain = array ('@gmail.com','@yahoo.com','@mail.com','@yandex.com','@gmx.de','@t-online.de','@yahoo.co.id','@yahoo.co.uk'); | |
128 | $random = rand(0,7); | |
129 | $email = $mail_p[0].angka(4).$domain[$random]; | |
130 | $uname = fetch_value($user[1][9], '<dd>','</dd>'); | |
131 | $username = $uname.angka(4); | |
132 | $password = string(8); | |
133 | $hash = md5($password); | |
134 | ||
135 | ||
136 | $headers = array(); | |
137 | $headers[] = 'Host: offercashapp.com'; | |
138 | $headers[] = 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 7.1.2; Redmi 4X MIUI/8.5.31)'; | |
139 | $headers[] = 'Connection: Keep-Alive'; | |
140 | $headers[] = 'Content-Type: application/x-www-form-urlencoded'; | |
141 | $curl->header($headers); | |
142 | ||
143 | $page = $curl->post('http://offercashapp.com/TNF6H9LcrLM7OloBKP76/register.php', 'name='.$name.'&password='.$hash.'&email='.$email.'&hash=ZvOhowBCLCOdGW6BMZSP&reff='.$reff.'&did=2'.$angka1.'6cdac1a'.$angka3.'a'.$angka2.'d'); | |
144 | ||
145 | if (stripos($page, '"status":2')) { | |
146 | $post = $curl->post('http://offercashapp.com/TNF6H9LcrLM7OloBKP76/getPoints.php', '&password='.$hash.'&email='.$email.'&hash=ZvOhowBCLCOdGW6BMZSP&did=2'.$angka1.'6cdac1a'.$angka3.'a'.$angka2.'d'); | |
147 | ||
148 | if (stripos($post, '"status":2')) { | |
149 | echo "SUCCESS\n"; | |
150 | flush(); | |
151 | ob_flush(); | |
152 | } else { | |
153 | echo "FAILED\n"; | |
154 | flush(); | |
155 | ob_flush(); | |
156 | } | |
157 | } else { | |
158 | echo "SOCKS DIE | ".$socks."\n"; | |
159 | flush(); | |
160 | ob_flush(); | |
161 | } | |
162 | } | |
163 | ||
164 | echo "CREATED BY YUDHA TIRA PAMUNGKAS\n"; | |
165 | echo "Reff (Ex: OC74BDDX): "; | |
166 | $reff = trim(fgets(STDIN)); | |
167 | if ($reff == "") { | |
168 | die ("Refferal cannot be blank!\n"); | |
169 | } | |
170 | echo "Name file proxy (Ex: proxy.txt): "; | |
171 | $namefile = trim(fgets(STDIN)); | |
172 | if ($namefile == "") { | |
173 | die ("Proxy cannot be blank!\n"); | |
174 | } | |
175 | echo "Timeout : "; | |
176 | $timeout = trim(fgets(STDIN)); | |
177 | if ($timeout == "") { | |
178 | die ("Cannot be blank!\n"); | |
179 | } | |
180 | echo "Please wait"; | |
181 | sleep(1); | |
182 | echo "."; | |
183 | sleep(1); | |
184 | echo "."; | |
185 | sleep(1); | |
186 | echo ".\n"; | |
187 | $file = file_get_contents($namefile) or die ("File not found!\n"); | |
188 | $socks = explode("\r\n",$file); | |
189 | $total = count($socks); | |
190 | echo "Total proxy: ".$total."\n"; | |
191 | ||
192 | $i = 0; | |
193 | foreach ($socks as $value) { | |
194 | loop($value, $timeout, $reff); | |
195 | $i++; | |
196 | } | |
197 | ||
198 | ||
199 | ||
200 | ?> |