View difference between Paste ID: JHdCYQeU and WmQGpDHY
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 NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.54');
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 proxy($sock) {
20
		curl_setopt ($this->ch, CURLOPT_HTTPPROXYTUNNEL, true); 
21
		curl_setopt ($this->ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); 
22
		curl_setopt ($this->ch, CURLOPT_PROXY, $sock);
23
	}
24
	function post($url, $data) {
25
		curl_setopt($this->ch, CURLOPT_POST, 1);	
26
		curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
27
		return $this->getPage($url);
28
	}
29
	function data($url, $data, $hasHeader=true, $hasBody=true) {
30
		curl_setopt ($this->ch, CURLOPT_POST, 1);
31
		curl_setopt ($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
32
		return $this->getPage($url, $hasHeader, $hasBody);
33
	}
34
	function get($url, $hasHeader=true, $hasBody=true) {
35
		curl_setopt ($this->ch, CURLOPT_POST, 0);
36
		return $this->getPage($url, $hasHeader, $hasBody);
37
	}	
38
	function getPage($url, $hasHeader=true, $hasBody=true) {
39
		curl_setopt($this->ch, CURLOPT_HEADER, $hasHeader ? 1 : 0);
40
		curl_setopt($this->ch, CURLOPT_NOBODY, $hasBody ? 0 : 1);
41
		curl_setopt ($this->ch, CURLOPT_URL, $url);
42
		$data = curl_exec ($this->ch);
43
		$this->error = curl_error ($this->ch);
44
		$this->info = curl_getinfo ($this->ch);
45
		return $data;
46
	}
47
}
48
49
function fetchCurlCookies($source) {
50
	preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $source, $matches);
51
	$cookies = array();
52
	foreach($matches[1] as $item) {
53
		parse_str($item, $cookie);
54
		$cookies = array_merge($cookies, $cookie);
55
	}
56
	return $cookies;
57
}
58
59
function string($length = 15)
60
{
61
	$characters = '0123456789abcdefghijklmnopqrstuvwxyz';
62
	$charactersLength = strlen($characters);
63
	$randomString = '';
64
	for ($i = 0; $i < $length; $i++) {
65
		$randomString .= $characters[rand(0, $charactersLength - 1)];
66
	}
67
	return $randomString;
68
}
69
70
function nama($length = 15)
71
{
72
	$characters = 'abcdefghijklmnopqrstuvwxyz';
73
	$charactersLength = strlen($characters);
74
	$randomString = '';
75
	for ($i = 0; $i < $length; $i++) {
76
		$randomString .= $characters[rand(0, $charactersLength - 1)];
77
	}
78
	return $randomString;
79
}
80
81
function fetch_value($str,$find_start,$find_end) {
82
	$start = @strpos($str,$find_start);
83
	if ($start === false) {
84
		return "";
85
	}
86
	$length = strlen($find_start);
87
	$end    = strpos(substr($str,$start +$length),$find_end);
88
	return trim(substr($str,$start +$length,$end));
89
}
90
91
function loop ($socks) {
92
93
	$curl = new curl();
94
	$curl->proxy($socks);
95
	$register = $curl->get('https://www.instagram.com/accounts/emailsignup/');
96
97
	$cookies = fetchCurlCookies($register);
98
	$csrftoken = $cookies['csrftoken'];
99
	$mid = $cookies['mid'];
100
101
	if ($register) {
102
103
		$headers = array();
104
		$headers[] = "accept-language: en-US,en;q=0.9";
105
		$headers[] = "content-type: application/x-www-form-urlencoded";
106
		$headers[] = 'cookie: mid='.$mid.'; mcd=3; shbid=13734; rur=FTW; csrftoken='.$csrftoken.'; csrftoken='.$csrftoken.';';
107
		$headers[] = "referer: https://www.instagram.com/accounts/emailsignup/";
108
		$headers[] = "user-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.54";
109
		$headers[] = "x-csrftoken: ".$csrftoken."";
110
		$curl->header($headers);
111
112
		$page_api = file_get_contents('https://randomuser.me/api/');
113
		$password = string(8);
114
		$username = string(10);
115
		$domain = array ('@gmail.com','@yahoo.com','@mail.com','@yandex.com','@gmx.de','@t-online.de','@yahoo.co.id','@yahoo.co.uk');
116
		$random = rand(0,7);
117
		$email  = string(11).$domain[$random];
118
		$name = fetch_value($page_api, '"first":"','"');
119
120
121
		$page_register = $curl->post('https://www.instagram.com/accounts/web_create_ajax/', 'email='.$email.'&password='.$password.'&username='.$username.'&first_name='.$name.'&seamless_login_enabled=1&tos_version=row&opt_into_one_tap=false');
122
123
		if (strpos($page_register, '"account_created": true')) {
124
			echo "SUCCESS| ".$socks." | ".$email." | ".$username." | ".$password."\n";
125
			$data =  "SUCCESS| ".$socks." | ".$email." | ".$username." | ".$password."\r\n";
126
			$fh = fopen("success.txt", "a");
127
			fwrite($fh, $data);
128
			fclose($fh);
129
			flush();
130
			ob_flush();
131
		} elseif(strpos($page_register, '"account_created": false')) {
132
			$ip = fetch_value($page_register, '"ip": ["','"]');
133
			echo "FAILED | ".$socks." | ".$email." | ".$username." | ".$password." | ".$ip."\n";
134
			flush();
135
			ob_flush();
136
		}
137
138
	} else {
139
		echo "SOCKS DIE | ".$socks."\n";
140
		flush();
141
		ob_flush();
142
	}
143
}
144
145
echo "INSTAGRAM ACCOUNT CREATOR BY: YUDHA TIRA PAMUNGKAS\n";
146
sleep(1);
147
echo "Name File Socks (ex: socks.txt): ";
148
$namefile = trim(fgets(STDIN));
149
sleep(1);
150
echo "Please Wait";
151
sleep(1);
152
echo ".";
153
sleep(1);
154
echo ".";
155
sleep(1);
156
echo ".\n";
157
$file = file_get_contents($namefile) or die ("File Not Found\n");
158
$socks = explode("\r\n",$file);
159
$total = count($socks);
160
echo "Total Socks: ".$total."\n";
161
162
foreach ($socks as $value) {
163
	loop($value);
164
}
165
166
?>