Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # edited by zoky_raharjo@yahoo.com
- # http://www.facebook.com/zoky.raharjo.5
- $|=1;
- while (<>) {
- # auto detect channel ID
- my $channel = "";
- if (s/^(\d+\s+)//o) {
- $channel = $1;
- }
- @X = split;
- # number of split
- $zoky = $X[0]; ## url
- $zoky1 = $X[1]; ## ip client
- $zoky2 = $X[2]; ## -
- $zoky3 = $X[3]; ## method ( GET )
- $zoky4 = $X[4]; ## myip=ipurl
- $zoky5 = $X[5]; ## myport=porturl
- $zoky6 = $X[6]; ## kosong
- #Speedtest
- if ($zoky =~ m/^https?\:\/\/.*(speedtest|espeed).*\/(.*\.(jpg|png|bmp|txt)).*/) {
- print "$channel OK status=302 url=http://192.168.100.2:99/speedtest/$2\n";
- } elsif ($zoky =~ m/^https?\:\/\/.*(speedtest|espeed).*\/(.*\.(php)).*/) {
- print "$channel OK rewrite-url=http://192.168.100.2:99/speedtest/$2\n";
- } else {
- print "$channel ERR\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement