Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 3 of 3

Thread: script error

  1. #1
    Status
    Offline
    mohamed's Avatar
    Baru Gabung
    Join Date
    Oct 2009
    Posts
    2
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    Smile script error

    i use mikrotik v3.13 on pc i have hotspot and
    i have error in this script its if he found the name in the dns cache he put it in wep proxy and when the scrept run again he Repeat the name in the wep proxy like the pic


    Click here to enlarge



    and this is the script


    :foreach i in=[/ip dns cache find] do={:local bNew "true";:local cacheName [/ip dns cache all get $i name] ;Click here to enlargeut $cacheName;:if (([:find $cacheName "mikrotik"] != 0) || ([:find $cacheName "cnn"] != 0)) do= {/ip proxy access add dst-host= $cacheName redirect-to=google.com};:if ( $cacheName = [/ip proxy access find dst-host=$cacheName] ) do={:set bNew "false"; }}}}


    and i need another script if i have many user like:

    1- name=a profile=dufalt
    2- name=b profile=new
    3- name=c profile=dufalt
    4-name=d profile=dufalt
    5-bame=e profile=new

    i need script to put it in user profile script onlogin do if the user login set profile=another profile

    and thankes for any help

  2. #2
    Status
    Offline
    mohamed's Avatar
    Baru Gabung
    Join Date
    Oct 2009
    Posts
    2
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    trannslation

    i use v3.13 mikrotik di pc saya telah hotspot dan
    i have error pada script ini yang jika ia menemukan nama di dns cache ia meletakkannya di WEP proxy dan ketika dijalankan lagi ia scrept Ulangi nama proxy WEP seperti pic


    dan ini adalah script


    : foreach i in = [/ ip dns cache menemukan] do = (: bNew lokal "true";: cacheName lokal [/ ip dns cache semua mendapatkan $ i name]; ut $ cacheName;: if (([: find $ cacheName "mikrotik"]! = 0) | | ([: find $ cacheName "cnn"]! = 0)) do = (/ ip proxy access add dst-host = $ cacheName redirect-to = google.com);: jika ($ cacheName = [/ ip proxy akses menemukan dst-host = $ cacheName]) do = (: set bNew "false"Click here to enlarge)))


    dan i need skrip lain jika saya memiliki banyak pengguna seperti:

    1 - nama = profil = dufalt
    2 - name = b profil = new
    3 - nama = c profil = dufalt
    4-name = d profil = dufalt
    5-bame = e profil = new

    i need script untuk memasukkannya ke dalam script onlogin profil pengguna jika pengguna melakukan login mengatur profil = profil lain

    dan thankes for any help

  3. #3
    Status
    Offline
    jabrik's Avatar
    Baru Gabung
    Join Date
    Jul 2008
    Posts
    4
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    script ip dns access

    saya juga pernah mengalami hal yang sama... tp setelah googling sekian lama ketemu juga scrpit dari tetangga sebelah :

    script aslinya seperti ini:

    :foreach x in=[/ip dns cache find] do={
    :local newaddress "true";
    :local cachename [/ip dns cache all get $x name];
    :if ( [:find $cachename "frienster"]=0 || [:find $cachename "www.friendster"]=0 ) do={
    :local tmpaddress [/ip dns cache get $x address];
    :if ( [/ip firewall address-list find ] = "" ) do={
    :log info ("menambahkan " . [/ip dns cache get $x name] . " IP " . $tmpaddress);
    /ip firewall address-list add address=$tmpaddress list=friendster disabled=no;
    } else={
    :foreach y in=[/ip firewall address-list find ] do={
    :if ( [/ip firewall address-list get $y address] = "$tmpaddress" && [/ip firewall address-list get $y list] = "friendster") do={
    :set newaddress "false" ;
    }
    }
    :if ( $newaddress = "true" ) do={
    :log info ("menambahkan " . [/ip dns cache get $x name] . " IP " . $tmpaddress);
    /ip firewall address-list add address=$tmpaddress list=friendster disabled=no;
    }
    }
    }
    }

    dan saya modifikasi agar masuk ke ip proxy access dengan menangkap kata"porn" hasilnya seperti ini :

    :foreach x in=[/ip dns cache find] do={
    :local newaddress "true";
    :local cachename [/ip dns cache all get $x name];
    :if ( [:find $cachename "porn"]=0 || [:find $cachename "www.porn"]=0 ) do={
    :local tmpaddress [/ip dns cache get $x address];
    :if ( [/ip proxy access find ] = "" ) do={
    :log info ("menambahkan " . [/ip dns cache get $x name] . " IP " . $tmpaddress);
    /ip proxy access add src-address=192.168.0.3-192.168.0.15 dst-host=$tmpaddress action=deny redirect-to=radin-net.blogdns.net/block/blocked.php comment="testblock";
    } else={
    :foreach y in=[/ip proxy access find ] do={
    :if ( [/ip proxy access get $y dst-host] = "$tmpaddress" && [/ip proxy access get $y dst-host] = "$tmpaddress") do={
    :set newaddress "false" ;
    }
    }
    :if ( $newaddress = "true" ) do={
    :log info ("menambahkan " . [/ip dns cache get $x name] . " IP " . $tmpaddress);
    /ip proxy access add src-address=192.168.0.3-192.168.0.15 dst-host=$tmpaddress action=deny redirect-to=radin-net.blogdns.net/block/blocked.php comment="testblock";
    }
    }
    }
    }

    ini gambarnya :

    Click here to enlarge
    Click here to enlarge


    akan tetapi saya masi belum puas dengan script modifikasi ini, jika ada yang lebih simple boleh dong di share di sini.



    terima kasih

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. RX error
    By sufandi in forum Beginner Basics
    Replies: 13
    Last Post: 10-03-2011, 10:11
  2. web-proxy error
    By yudinindi in forum Beginner Basics
    Replies: 8
    Last Post: 19-10-2009, 15:36
  3. [help] mikrotik error pivot_root error
    By konpiuse in forum Beginner Basics
    Replies: 1
    Last Post: 17-10-2008, 16:52
  4. nth error
    By alie in forum General Networking
    Replies: 2
    Last Post: 18-08-2008, 11:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •