• Tags :: Тагове

  • « Борба със спама: mafiqta.host-bg.info | Home | Така се печели трафик! »

    Тъп виц чрез SMS?

    By admin | March 29, 2008

    Искате ли да получавате тъпи вицове чрез sms? Много е лесно. Нужен ви е Този скрипт:

    #!/usr/bin/perl
    ###########################################################################
    # This program is free software: you can redistribute it and/or modify #
    # it under the terms of the GNU General Public License as published by #
    # the Free Software Foundation, either version 3 of the License, or #
    # (at your option) any later version. #
    # #
    # This program is distributed in the hope that it will be useful, #
    # but WITHOUT ANY WARRANTY; without even the implied warranty of #
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
    # GNU General Public License for more details. #
    # #
    # You should have received a copy of the GNU General Public License #
    # along with this program. If not, see <http://www.gnu.org/licenses/>.#
    # (c) 2008 Blagovest Petrov. - http://petrovs.info #
    # <blagovest ^a*t petrovs Do$t info> #
    ###########################################################################
    use strict;
    use LWP::Simple;
    use MIME::Lite;
    use Text::Iconv;

    # our $phone = ’sms-scripts@edubg.gclass.info’;
    our $phone = @@@NO SPAM@@@;
    our $datanatural = get(http://extra.tophost.bg/api/show.php?vicove&uid=petrovs.info);

    our $converter = Text::Iconv->new(cp1251, utf8);
    our $data = $converter->convert($datanatural);

    $data =~ s/<//g;
    $data =~ s/>//g;
    $data =~ s/br//g;
    $data =~ s/a href//g;
    $data =~ s/font//g;
    $data =~ s/size//g;
    $data =~ s/title//g;
    $data =~ s/a//g;
    $data =~ s/extr.tophost.bg//g;
    $data =~ s/http//g;
    $data =~ s/://g;
    $data =~ s/=//g;
    $data =~ s/\///g;
    $data =~ s/\;//g;
    $data =~ s/title=//g;
    $data =~ s///g;
    $data =~ s/document\.write\(//g;
    $data =~ s/extra.tophost.bg//g;
    $data =~ s///g;
    $data =~ s/\)//g;
    $data =~ s/\(//g;
    $data =~ s/1//g;
    $data =~ s/&quot//g;
    $data =~ s/\n//g;
    ####################################################
    $data =~ s/а/a/g;
    $data =~ s/б/b/g;
    $data =~ s/в/w/g;
    $data =~ s/г/g/g;
    $data =~ s/д/d/g;
    $data =~ s/е/e/g;
    $data =~ s/ж/j/g;
    $data =~ s/ц/z/g;
    $data =~ s/и/i/g;
    $data =~ s/й/y/g;
    $data =~ s/к/k/g;
    $data =~ s/л/l/g;
    $data =~ s/м/m/g;
    $data =~ s/н/n/g;
    $data =~ s/о/o/g;
    $data =~ s/п/p/g;
    $data =~ s/р/r/g;
    $data =~ s/с/s/g;
    $data =~ s/т/t/g;
    $data =~ s/y/u/g;
    $data =~ s/ф/f/g;
    $data =~ s/х/h/g;
    $data =~ s/ц/tc/g;
    $data =~ s/ч/4/g;
    $data =~ s/ш/6/g;
    $data =~ s/щ/6t/g;
    $data =~ s/ъ/u/g;
    $data =~ s/ь/y/g;
    $data =~ s/ю/ju/g;
    $data =~ s/я/q/g;
    $data =~ s/з/z/g;
    #..
    $data =~ s/А/A/g;
    $data =~ s/Б/B/g;
    $data =~ s/В/W/g;
    $data =~ s/Г/G/g;
    $data =~ s/Д/D/g;
    $data =~ s/Е/E/g;
    $data =~ s/Ж/J/g;
    $data =~ s/Ц/Z/g;
    $data =~ s/И/I/g;
    $data =~ s/Й/Y/g;
    $data =~ s/К/K/g;
    $data =~ s/Л/L/g;
    $data =~ s/М/M/g;
    $data =~ s/Н/N/g;
    $data =~ s/О/O/g;
    $data =~ s/П/P/g;
    $data =~ s/Р/R/g;
    $data =~ s/С/S/g;
    $data =~ s/Т/T/g;
    $data =~ s/У/U/g;
    $data =~ s/Э/F/g;
    $data =~ s/Х/H/g;
    $data =~ s/Ц/Tc/g;
    $data =~ s/Ч/4/g;
    $data =~ s/Ш/6/g;
    $data =~ s/Щ/6t/g;
    $data =~ s/Ъ/U/g;
    $data =~ s/Ь/Y/g;
    $data =~ s/Ю/Ju/g;
    $data =~ s/Я/Q/g;
    $data =~ s/З/Z/g;

    print $data . \n;

    our $msg = MIME::Lite->new
    (
    Subject => $data,
    From => .,
    To => $phone,
    Type => text/html,
    Data => .
    );

    $msg->send();

    Може да се тобави в Crontab или да се донапише един безкраен While цикъл и да се сложи в .bashrc/като init скрипт. Моя беше нагласен за изпращане на всеки 15 минути - от Cron. Доста досадна работа…

    Topics: Разработки, OpenSource |

    Comments