Repository navigation
Expand file tree
/
Copy pathc2.php
More file actions
142 lines (128 loc) · 4.66 KB
/
Copy pathc2.php
File metadata and controls
142 lines (128 loc) · 4.66 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
set_time_limit(0);
error_reporting(E_ALL);
include "lib/c2bot.php";
include "lib/tempmail.class.php";
if($_POST){
$ex_bio=array();
$count=$_POST["count"];
$exx_bio = trim($_POST['ex_bio']);
$ex_bio = explode("\n", $exx_bio);
$ex_bio = array_filter($ex_bio, 'trim');
$bio = file('bio.txt', FILE_IGNORE_NEW_LINES);
$ids=$_POST["accounts"];
$ids=explode("\n",$ids);
$ids=array_filter($ids,"trim");
for($i=0; $i<$count;$i++){
$random_user = call("http://api.randomuser.me/?nat=tr"); #http://api.randomuser.me/?nat=tr change ?nat= for another countries
$random_user = json_decode($random_user);
$random_user_name = $random_user->results[0]->name->first;
$random_user_surname = $random_user->results[0]->name->last;
$random_user_gender = $random_user->results[0]->gender;
$names[] = ucfirst($random_user_name)." ".ucfirst($random_user_surname);
for($z=0;$z<5;$z++){
$random_user = call("http://api.randomuser.me/?nat=tr");
$random_user = json_decode($random_user);
$random_user_name = $random_user->results[0]->name->first;
$random_user_surname = $random_user->results[0]->name->last;
if($random_user->results[0]->gender==$random_user_gender){
$names[] = ucfirst($random_user_name)." ".ucfirst($random_user_surname);
}
}
if ($random_user_gender == "female"){
$gender="f";
$pictures = glob("botImages/f/*.{jpg}", GLOB_BRACE);
}else{
// continue; #ENABLE HERE FOR ONLY FEMALE ACCOUNTS
$pictures = glob("botImages/m/*.{jpg}", GLOB_BRACE);
$gender="m";
}
$phone_number = randomNumber(7);
$settings = [
'_folder' => 'cookies/',
'_extension' => '.json',
'_bio' => $bio,
'_ex_bio' => $ex_bio,
'_names' => $names,
'_pictures' => $pictures,
'_follow_ids' => $ids,
'_proxys' => NULL,
'_sql' => FALSE,
'_gender' => $gender,
'_phone_number' => $phone_number,
];
$boting = new c2bot($settings);
$result = $boting->createUser(1);
$result = json_decode ($result);
print_r($result);
}
}
function call($url,$post=null,$header=null,$session=null,$jsonx=null){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
if(!empty($post)){
if(empty($jsonx)){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}else{
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
}
if(!empty($header)){
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
}
if(!empty($session)){
$dirname = dirname($session);
if (!is_dir($dirname))
{
mkdir($dirname, 0755, true);
}
curl_setopt($ch, CURLOPT_COOKIEFILE, $session);
curl_setopt($ch, CURLOPT_COOKIEJAR, $session);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, TRUE );
//curl_setopt($ch, CURLOPT_POSTREDIR, 5);
$server_output = curl_exec ($ch);
$httpCode = curl_getinfo($ch);
curl_close ($ch);
return $server_output;
}
function replace_tr($text) {
$text = trim($text);
$replace = array('c','c','g','g','i','i','o','o','s','s','u','u',' ');
$new_text = str_replace($search,$replace,$text);
return $new_text;
}
function set_cookies_in_file($cookies,$file)
{
$fh = fopen($file, 'w+');
fwrite($fh, "# Netscape HTTP Cookie File\n# http://curl.haxx.se/rfc/cookie_spec.html\n# This file was generated by libcurl! Edit at your own risk.\n\n");
foreach($cookies as $cookie) {
$line = array(
'domain' => $cookie['domain'],
'domain_only' => (isset($cookie['domain_only']) && $cookie['domain_only'])? 'TRUE' : 'FALSE',
'path' => (isset($cookie['path']))? $cookie['path'] : '/',
'secure' => (isset($cookie['secure']) && $cookie['secure'])? 'TRUE' : 'FALSE',
'expires' => (isset($cookie['expires']))? $cookie['expires'] : 0,
'key' => $cookie['key'],
'value' => $cookie['value'],
);
fwrite($fh, "{$line['domain']}\t{$line['domain_only']}\t{$line['path']}\t{$line['secure']}\t{$line['expires']}\t{$line['key']}\t{$line['value']}\n");
}
fclose($fh);
} // END function set_cookies_in_file()
function randomNumber($length) {
$items = ['505','506','507','531','532','533','535','554','555','542'];
$first = $items[array_rand($items)];
$result = '';
for($i = 0; $i < $length; $i++) {
$result .= mt_rand(0, 9);
}
return $first.$result;
}
?>