Ik heb dit script gister gekocht en online gezet op mijn site,

www.hello-u.nl-msn het is een msn invite script.

als ik nou mijn email en w8 woord invoer, krijg ik de melding na ongeveer 20 sec "server onbereikbaar" zelf denk ik dat dit aan mijn hosting ligt dat er iets geblokeerd word.

in een eerder script wat ik ook legaal gekocht had lag het aan dat open_basedir EN Safemode UIT moesten staan, mijn hosting zei hierop dat dit wegens beveiligingsredenen niet kon.

nou heb ik voor dit script alweer een email gestuurd naar mijn en die zeggen, kan het niet zijn dat er een poort open moet staan???

als het al een poort is die open moet staan moet dit 1863 zijn, maar ik weet dus niet wat ik nu verder aan moet met dit script, kan iemand mij misschien helpen??

Alvast bedankt.

Code:
MSN.PHP


Selecteer deze code
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277

<?
/*
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
© Alle rechten voorbehouden - Arne De Muyter - http://www.phpscripting.be
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
*/

echo "<script type=\"text/javascript\" src=\"javascript.js\"></script>";

$website['naam'] = "$dealernaam";
//websitenaam

$website['email'] = "$email";
//websitemail

$website['onderwerp'] = "$dealernaam Invite";
//onderwerp

$headers = "From: ".$website['onderwerp']." [ Wil jij ook een $artikel Winnen? ] <".$website['email'].">\r\n" .'X-Mailer: PHP/' . phpversion() . "\r\n" ."MIME-Version: 1.0\r\n" ."Content-Type: text/html; charset=utf-8\r\n" ."Content-Transfer-Encoding: 8bit\r\n\r\n";

$onderwerp = $website['onderwerp'];


if($_GET['actie'] == "verzenden")
{
if(empty($_POST['gebruikersnaam']) || empty($_POST['wachtwoord']))
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Je hebt je email of wachtwoord niet ingevuld... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
else
{
$msn = new MSN($_POST['gebruikersnaam'], $_POST['wachtwoord']);

if (!$msn->contactpersonen())
{
if ($msn->resultaat == 911)
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Email en/of wachtwoord zijn verkeerd... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
else
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Server onbereikbaar... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
}
else
{
echo "<div class=\"titel\">Contactpersonen</div>";
echo "<div class=\"bericht\">";
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"98%\">";
echo "<form method=\"POST\" action=\"index.php?pagina=dealerscript/msn&actie=mail\" name=\"formulier\" onsubmit=\"wachten()\">";

foreach ($msn->lijst as $contact)
{
echo "<tr>";
echo "<td><input type=\"checkbox\" name=\"email[]\" value=\"".$contact."\" style=\"border: 0px\" checked></td>";
echo "<td width=\"100%\">".$contact."</td>";
echo "</tr>";
}

echo "<tr>";
echo "<td colspan=\"2\"><input type=\"submit\" value=\"Verzenden\" name=\"knop\"></td>";
echo "</tr>";
echo "</table>";
echo "</form>";
echo "</div>";
}
}
}
elseif ($_GET['actie'] == "mail")
{
foreach($_POST['email'] as $email)
$website['bericht'] = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>;
<html xmlns='http://www.w3.org/1999/xhtml'; xml:lang='nl'>
<head>
<title>$dealernaam - MSN Invite</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
</head>
<body>
<h1>".$_COOKIE['Gebruikersnaam']."</h1>
Zou graag willen dat je <b>$artikel</b> van hem kocht. <br /><br />

".$_COOKIE['Gebruikersnaam']." is lid van <a href='$sitenaam'>$dealernaam</a>, dit is een spel waarbij je virtueel een $artikel moet verkopen.<br /><br />

<a href='$sitenaam/index.php?pagina=dealerscript/koop.php&dealer=".$_COOKIE['Gebruikersnaam']."'><h3>Koop een $artikel</h3></a><br />

</div>

</body>
</html>";

$bericht = $website['bericht'];

//bericht
mail($email, $onderwerp, $bericht, $headers);

echo "<div class=\"titel\">Verzonden</div>";
echo "<div class=\"bericht\">Email is succesvol verzonden naar de geselecteerde emailadressen!</div>";
}
else
{
echo "<div class=\"titel\">Privacy</div>";
echo "<div class=\"bericht\"><font color=\"#FF0000\"><b>Uw gebruikersnaam en wachtwoord worden niet opgeslagen. Wij respecteren uw privacy!</b></font></div>";

echo "<div class=\"titel\">MSN invite</div>";
echo "<div class=\"bericht\">";
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"98%\">";
echo "<form method=\"POST\" action=\"index.php?pagina=dealerscript/msn&actie=verzenden\" name=\"formulier\" onsubmit=\"wachten()\">";
echo "<tr>";
echo "<td width=\"30%\">MSN email</td>";
echo "<td width=\"70%\"><input type=\"text\" name=\"gebruikersnaam\" size=\"20\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>MSN wachtwoord</td>";
echo "<td><input type=\"password\" name=\"wachtwoord\" size=\"20\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td></td>";
echo "<td><input type=\"submit\" value=\"Inloggen\" name=\"knop\"> <input type=\"reset\" value=\"Opnieuw\" name=\"opnieuw\"></td></tr></table>";
echo "</form>";
echo "</div>";
}

class MSN
{
var $gebruikersnaam = '';
var $wachtwoord = '';
var $resultaat = 0;
var $lijst = array();
var $contacten = array();
var $aantal = 0;

function MSN($passport, $password)
{
$this->gebruikersnaam = $passport;
$this->wachtwoord = $password;
}

function contactpersonen($server = 'messenger.hotmail.com')
{
$socket = @fsockopen($server, 1863);

if (!$socket)
{
$this->resultaat = 600;
return false;
}

fputs($socket, "VER 0 MSNP8\r\n");

while (!feof($socket))
{
$data = fgets($socket);
$data = substr($data, 0, -2);
$params = explode(' ', $data);
$ret = true;

switch ($params[0])
{
case 'VER':
fputs($socket, "CVR 1 0x0409 winnt 5.1 i386 MSNMSGR 6.0.0254 MSMSGS ".$this->gebruikersnaam."\r\n");
break;

case 'CVR':
fputs($socket, "USR 2 TWN I ".$this->gebruikersnaam."\r\n");
break;

case 'XFR':
$subparams = explode(':', $params[3]);
$ret = $this->contactpersonen($subparams[0]);
break;

case 'USR':
if ($params[2] == 'TWN')
{
switch (substr($this->gebruikersnaam, strpos($this->gebruikersnaam, "@")))
{
case "@hotmail.com":
$url = "ssl://loginnet.passport.com";
break;

case "@msn.com":
$url = "ssl://msnialogin.passport.com";
break;

default:
$url = "ssl://login.passport.com";
break;
}

$fp = fsockopen($url, 443);

$req = array();
$req[] = 'GET /login2.srf HTTP/1.1';
$req[] = 'Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom, sign-in='.str_replace('@', '%40', $this->gebruikersnaam).',pwd='.urlencode($this->wachtwoord).','.$params[4];
$req[] = 'Host: login.passport.com';
$req[] = 'Connection: Close';

foreach ($req as $v)
fputs($fp, $v."\r\n");

fputs($fp, "\r\n");

$data = '';
while (!feof($fp))
$data .= @fgets($fp);

fclose($fp);

$headers = explode("\r\n", $data);

foreach ($headers as $header)
{
if (strpos($header, ':') === false)
continue;

list($name, $value) = explode(':', $header);

switch ($name)
{
case 'WWW-Authenticate':
$hash = false;
break;

case 'Authentication-Info':
$start = (strpos($value, "'") + 1);
$end = (strrpos($value, "'") - $start);
$hash = substr($value, $start, $end);
break;
}
}

if (!$hash)
{
$this->resultaat = 911;
fputs($socket, "OUT\r\n");
$ret = false;
}

fputs($socket, "USR 3 TWN S ".$hash."\r\n");
}
elseif ($params[2] == 0)
fputs($socket, "SYN 4 0\r\n");
break;

case 'SYN':
$this->aantal = $params[3];
break;

case 'LST':
$this->aantal--;

if (!isset($this->contacten[$params[1]]))
$this->contacten[$params[1]] = $params[1];

if (($params[3] & 1) > 0)
$this->lijst[$params[1]] = &$this->contacten[$params[1]];

if ($this->aantal == 0)
{
fputs($socket, "OUT\r\n");
$this->resultaat = 0;
}

break;
}

if (!$ret)
return $ret;
}

return true;
}
}
?>




INDEX.PHP



Selecteer deze code
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267

<?
/*
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
© Alle rechten voorbehouden - Arne De Muyter - http://www.phpscripting.be
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
*/

$website['naam'] = "Website naam";
//websitenaam

$website['email'] = "[email protected]";
//websitemail

$website['bericht'] =
"
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>;
<html xmlns='http://www.w3.org/1999/xhtml'; xml:lang='nl'>
<head>
<title>Titel</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
</head>
<body>
<p>Alle tekst gaat hier, je kan ook gebruik maken van html</p>
</body>
</html>
";
//bericht

$website['onderwerp'] = "Onderwerp";
//onderwerp

$headers = "From: ".$website['onderwerp']." <".$website['email'].">\r\n" .'X-Mailer: PHP/' . phpversion() . "\r\n" ."MIME-Version: 1.0\r\n" ."Content-Type: text/html; charset=utf-8\r\n" ."Content-Transfer-Encoding: 8bit\r\n\r\n";

echo "<link href=\"opmaak.css\" rel=\"stylesheet\" type=\"text/css\">";

if($_GET['actie'] == "verzenden")
{
if(empty($_POST['gebruikersnaam']) || empty($_POST['wachtwoord']))
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Je hebt je email of wachtwoord niet ingevuld... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
else
{
$msn = new MSN($_POST['gebruikersnaam'], $_POST['wachtwoord']);

if (!$msn->contactpersonen())
{
if ($msn->resultaat == 911)
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Email en/of wachtwoord zijn verkeerd... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
else
{
echo "<div class=\"titel\">Fout</div>";
echo "<div class=\"bericht\">Server onbereikbaar... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
}
else
{
echo "<div class=\"titel\">Contactpersonen</div>";
echo "<div class=\"bericht\">";
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"98%\">";
echo "<form method=\"POST\" action=\"?actie=mail\" name=\"formulier\">";

foreach ($msn->lijst as $contact)
{
echo "<tr>";
echo "<td><input type=\"checkbox\" name=\"email[]\" value=\"".$contact."\" style=\"border: 0px\" checked></td>";
echo "<td width=\"100%\">".$contact."</td>";
echo "</tr>";
}

echo "<tr>";
echo "<td colspan=\"2\"><input type=\"submit\" value=\"Verzenden\" name=\"knop\"></td>";
echo "</tr>";
echo "</table>";
echo "</form>";
echo "</div>";
}
}
}
elseif ($_GET['actie'] == "mail")
{
foreach($_POST['email'] as $email)
mail($email, $website['onderwerp'], $website['bericht'], $headers);

echo "<div class=\"titel\">Verzonden</div>";
echo "<div class=\"bericht\">Email is succesvol verzonden naar de geselecteerde emailadressen!</div>";
}
else
{
echo "<div class=\"titel\">Privacy</div>";
echo "<div class=\"bericht\"><font color=\"#FF0000\"><b>Uw gebruikersnaam en wachtwoord worden niet opgeslagen. Wij respecteren uw privacy!</b></font></div>";

echo "<div class=\"titel\">MSN invite</div>";
echo "<div class=\"bericht\">";
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"98%\">";
echo "<form method=\"POST\" action=\"?actie=verzenden\" name=\"formulier\">";
echo "<tr>";
echo "<td width=\"30%\">MSN email</td>";
echo "<td width=\"70%\"><input type=\"text\" name=\"gebruikersnaam\" size=\"20\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>MSN wachtwoord</td>";
echo "<td><input type=\"password\" name=\"wachtwoord\" size=\"20\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td></td>";
echo "<td><input type=\"submit\" value=\"Inloggen\" name=\"knop\"> <input type=\"reset\" value=\"Opnieuw\" name=\"opnieuw\"></td></tr></table>";
echo "</form>";
echo "</div>";
}

class MSN
{
var $gebruikersnaam = '';
var $wachtwoord = '';
var $resultaat = 0;
var $lijst = array();
var $contacten = array();
var $aantal = 0;

function MSN($passport, $password)
{
$this->gebruikersnaam = $passport;
$this->wachtwoord = $password;
}

function contactpersonen($server = 'messenger.hotmail.com')
{
$socket = @fsockopen($server, 1863);

if (!$socket)
{
$this->resultaat = 600;
return false;
}

fputs($socket, "VER 0 MSNP8\r\n");

while (!feof($socket))
{
$data = fgets($socket);
$data = substr($data, 0, -2);
$params = explode(' ', $data);
$ret = true;

switch ($params[0])
{
case 'VER':
fputs($socket, "CVR 1 0x0409 winnt 5.1 i386 MSNMSGR 6.0.0254 MSMSGS ".$this->gebruikersnaam."\r\n");
break;

case 'CVR':
fputs($socket, "USR 2 TWN I ".$this->gebruikersnaam."\r\n");
break;

case 'XFR':
$subparams = explode(':', $params[3]);
$ret = $this->contactpersonen($subparams[0]);
break;

case 'USR':
if ($params[2] == 'TWN')
{
switch (substr($this->gebruikersnaam, strpos($this->gebruikersnaam, "@")))
{
case "@hotmail.com":
$url = "ssl://loginnet.passport.com";
break;

case "@msn.com":
$url = "ssl://msnialogin.passport.com";
break;

default:
$url = "ssl://login.passport.com";
break;
}

$fp = fsockopen($url, 443);

$req = array();
$req[] = 'GET /login2.srf HTTP/1.1';
$req[] = 'Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom, sign-in='.str_replace('@', '%40', $this->gebruikersnaam).',pwd='.urlencode($this->wachtwoord).','.$params[4];
$req[] = 'Host: login.passport.com';
$req[] = 'Connection: Close';

foreach ($req as $v)
fputs($fp, $v."\r\n");

fputs($fp, "\r\n");

$data = '';
while (!feof($fp))
$data .= @fgets($fp);

fclose($fp);

$headers = explode("\r\n", $data);

foreach ($headers as $header)
{
if (strpos($header, ':') === false)
continue;

list($name, $value) = explode(':', $header);

switch ($name)
{
case 'WWW-Authenticate':
$hash = false;
break;

case 'Authentication-Info':
$start = (strpos($value, "'") + 1);
$end = (strrpos($value, "'") - $start);
$hash = substr($value, $start, $end);
break;
}
}

if (!$hash)
{
$this->resultaat = 911;
fputs($socket, "OUT\r\n");
$ret = false;
}

fputs($socket, "USR 3 TWN S ".$hash."\r\n");
}
elseif ($params[2] == 0)
fputs($socket, "SYN 4 0\r\n");
break;

case 'SYN':
$this->aantal = $params[3];
break;

case 'LST':
$this->aantal--;

if (!isset($this->contacten[$params[1]]))
$this->contacten[$params[1]] = $params[1];

if (($params[3] & 1) > 0)
$this->lijst[$params[1]] = &$this->contacten[$params[1]];

if ($this->aantal == 0)
{
fputs($socket, "OUT\r\n");
$this->resultaat = 0;
}

break;
}

if (!$ret)
return $ret;
}

return true;
}
}
?>

Reageren