Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!$_POST[perfis]) {
- ?>
- <html>
- <title><b style="color:black;background-color:#ffff66">MassRetweet</b></title>
- <head>
- <style type="text/css">
- #btn
- {
- background: transparent;
- border: solid thin;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- font-family: Verdana;
- width: 300px;
- }
- #follow
- {
- background: transparent;
- border: solid thin;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- font-family: Verdana;
- }
- textarea
- {
- width: 400px;
- height: 320px;
- }
- .work
- {
- font-weight: bold;
- color: green;
- }
- .notwork
- {
- font-weight: bold;
- color: red;
- }
- a
- {
- color: #000000;
- font-weight: bold;
- }
- </style>
- <script type="text/javascript">
- function countFakes()
- {
- document.getElementById("count").innerHTML =
- document.getElementById("perfis").value.split("\n").length;
- }
- </script>
- </head>
- <center>
- <form method="POST" action="">
- <textarea name="perfis" id="perfis" onkeydown="countFakes()" onchange="countFakes()"></textarea><br />
- <font id="count" style="font-weight: bold;">0</font> Perfis inseridos.<br /><br />
- <font face="Verdana">Id do Tweet</font><br />
- <input type="text" name="id" id="id" /><br /><br />
- <input type="submit" value="Retwittar" id="btn">
- </form>
- <?php
- } else {
- set_time_limit(0);
- Function Login ( $email, $password ) {
- $ch = curl_init();
- curl_setopt_array($ch, Array(
- CURLOPT_URL => 'https://mobile.twitter.com/session/new',
- CURLOPT_SSL_VERIFYPEER => false,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_HEADER => true));
- $response = curl_exec($ch);
- preg_match("/_mobile_sess=[^\s]+/", $response, $_mobile_sess);
- preg_match("/name=\"authenticity_token\" type=\"hidden\" value=\"([^\"]+)/", $response, $authenticity_token);
- curl_setopt_array($ch, Array(
- CURLOPT_URL => 'https://mobile.twitter.com/session',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_POST => true,
- CURLOPT_COOKIE => $_mobile_sess[0],
- CURLOPT_SSL_VERIFYPEER => false,
- CURLOPT_POSTFIELDS => 'authenticity_token=' . $authenticity_token . '&username=' . trim(rawurlencode($email)) . '&password=' . trim(rawurlencode($password)),
- CURLOPT_HEADER => true));
- $response = curl_exec($ch);
- preg_match("/k=[^\s]+/", $response, $k);
- preg_match("/_mobile_sess=[^\s]+/", $response, $mobile);
- preg_match("/oauth_token=[^\s]+/", $response, $oauth);
- curl_close($ch);
- return $k[0] . $mobile[0] . $oauth[0]; // retorna os cookies
- }
- Function Unfollow ( $cookies, $id ) {
- $ch = curl_init();
- curl_setopt_array($ch, Array(
- CURLOPT_URL => 'http://mobile.twitter.com/',
- CURLOPT_COOKIE => $cookies,
- CURLOPT_RETURNTRANSFER => true));
- $response = curl_exec($ch);
- preg_match("/name=\"authenticity_token\" type=\"hidden\" value=\"([^\"]+)/", $response, $authenticity);
- curl_setopt_array($ch, Array(
- CURLOPT_URL => "http://mobile.twitter.com/statuses/".$id."/retweet",
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_POST => true,
- CURLOPT_REFERER => 'mobile.twitter.com/',
- CURLOPT_COOKIE => $cookies,
- CURLOPT_FOLLOWLOCATION => false,
- CURLOPT_POSTFIELDS => 'authenticity_token=' .$authenticity[1]. '&authenticity_token=' . $authenticity[1]. '&x=1&y=8'));
- $response = curl_exec($ch);
- return $response; // precisa aplicar uma reg x pra ele retornar true ou false, dependendo do sucesso da ação
- }
- $login = $_POST[perfis];
- $logins = explode("\n", $login);
- foreach ($logins as $perfil)
- {
- $data = explode(":", $perfil);
- $usuario = trim($data[0]);
- $senha = trim($data[1]);
- $user = login($usuario, $senha);
- if(!preg_match("/auth/", $user)) {
- echo "<center><font color=\"red\">".$usuario." Login ou senha incorretos!</font><br>";
- } else {
- echo "<center><b><font color=\"green\">".$usuario." </font>Deu Retweet!</b><br>";
- Unfollow($user, $_POST['id']);
- }
- flush();
- ob_flush();
- sleep(1);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement