stanioomega Публикувано 22 Декември, 2010 Доклад Сподели Публикувано 22 Декември, 2010 Здравийте имам 2 скрипта с които си добавям адреси на PayPal в /ip hotspot walled-garden ip мъча се да им добавя още една екстра ,същият този скрипт да добавя ИП тата и в /ip firewall address-list но нещо не се получава. Това са двата сцрипта PayPal_addresses_find :local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]]; :local today [/system clock get date]; :local paypalobject [/ip hotspot walled-garden ip find dst-address=$ppobjip]; :local thisdate none; :local noip true; :foreach i in=$paypalobject do={ :set noip false; :set thisdate [/ip hotspot walled-garden ip get $i comment]; :if ($thisdate != ("ppobj $today")) do={ /ip hotspot walled-garden ip set $i comment="ppobj $today"; } } :if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; }:local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]]; :local today [/system clock get date]; :local paypalobject [/ip hotspot walled-garden ip find dst-address=$ppobjip]; :local thisdate none; :local noip true; :foreach i in=$paypalobject do={ :set noip false; :set thisdate [/ip hotspot walled-garden ip get $i comment]; :if ($thisdate != ("ppobj $today")) do={ /ip hotspot walled-garden ip set $i comment="ppobj $today"; } } :if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; } PayPal_addresses_update :local today [/system clock get date]; :local old [/ip hotspot walled-garden ip find comment~"ppobj*"]; :local thisrem none; :local thisip none; :foreach i in=$old do={ :set thisrem [/ip hotspot walled-garden ip get $i comment]; :if ($thisrem != ("ppobj $today")) do={ /ip hotspot walled-garden ip remove $i; } } :resolve [url=http://www.paypal.com]www.paypal.com[/url] :global paypalips [/ip dns cache find name="www.paypal.com"]; :global oldips [/ip hotspot walled-garden ip find comment="paypal"]; :foreach x in=$oldips do={ /ip hotspot walled-garden ip remove $x; } :foreach i in=$paypalips do={ :set thisip [/ip dns cache get $i address]; /ip hotspot walled-garden ip add comment="paypal" dst-address=$thisip; }:local today [/system clock get date]; :local old [/ip hotspot walled-garden ip find comment~"ppobj*"]; :local thisrem none; :local thisip none; :foreach i in=$old do={ :set thisrem [/ip hotspot walled-garden ip get $i comment]; :if ($thisrem != ("ppobj $today")) do={ /ip hotspot walled-garden ip remove $i; } } :resolve [url=http://www.paypal.com]www.paypal.com[/url] :global paypalips [/ip dns cache find name="www.paypal.com"]; :global oldips [/ip hotspot walled-garden ip find comment="paypal"]; :foreach x in=$oldips do={ /ip hotspot walled-garden ip remove $x; } :foreach i in=$paypalips do={ :set thisip [/ip dns cache get $i address]; /ip hotspot walled-garden ip add comment="paypal" dst-address=$thisip; } разбирасе има решение с одделен скрипт да стане това , например с този който ползвам за да add to address-list IP´s YouTube # Sync an address list with DNS cache # Version: 1.0.0 # This script currently only works with type A and non-static DNS records. # If no matching DNS records are found: # the address list is removed. # If matching DNS records are found: # if an address list entry is NOT found in search result, it is removed. # if an address list entry IS found in search result, is not modified. # if a search result is NOT found in address list, it is added. # # Search string format: # "(:|=|~)<search string>" # : match string anywhere # = match string exactly (case sensitive) # ~ match string using regular expression (requires ROS >= v3.23) # # Example: To search all records containing 'google.com': # :local search ":google.com" # # To search all records ending with 'microsoft.com': # :local search "~microsoft\\.com\$" #:local search "google.com" :local search "~youtube\\.com\$" #:local search "youtube.com" #:local search "www.youtube.com" # The prefix of address list ("" = none) :local listprefix "DNSCache_" # Internal processing... :local IPs "" :local Names "" :local sop [:pick [:tostr $search] 0 1] :set search [:pick [:tostr $search] 1 [:len [:tostr $search]]] /ip dns cache all { :local findex; :local property; :local value; :local name; :local type; :local data :local sfound 0 :foreach rule in=[print detail as-value where static=no] do={ :set name ""; :set type ""; :set data "" :foreach item in=$rule do={ :set findex [:find [:tostr $item] "="] :set property [:pick [:tostr $item] 0 $findex] :set value [:pick [:tostr $item] ($findex + 1) [:len [:tostr $item]]] :if ($property = "name") do={ :set name $value } :if ($property = "type") do={ :set type $value } :if ($property = "data") do={ :set data $value } } # Search DNS cache name using specified operator :set sfound 0 :if ($sop = ":") do={ :if ([:find [:tostr $name] [:tostr $search]] != "" && $type = "A") do={ :set sfound 1 } } :if ($sop = "=") do={ :if ([:tostr $name] = [:tostr $search] && $type = "A") do={ :set sfound 1 } } :if ($sop = "~") do={ :if ([:tostr $name] ~ [:tostr $search] && $type = "A") do={ :set sfound 1 } } :if ($sfound = 1) do={ # :put ("Found " . $name . " -> " . $data) :set IPs ($IPs . $data . ",") :set Names ($Names . $name . ",") } } # /ip dns cache all } :put ("DNS cache search found " . [:len [:toarray $IPs]] . " match(es) for '" . $search . "'") # Search through IPs and add to address list /ip firewall address-list { :local findex; :local listaddr; :local IPsFound "" :put ("Searching address list '" . ($listprefix . [:tostr $search]) . "'...") :foreach l in=[find list=($listprefix . [:tostr $search])] do={ :set listaddr [get $l address] :if ([:len [:find [:toarray $IPs] [:toip $listaddr]]] = 0) do={ :put (" " . $listaddr . " not found in search, removing...") remove $l } else={ # :put ($listaddr . " found address in IPs") :set IPsFound ($IPsFound . $listaddr . ",") } } # Add remaining records to address list :set findex 0 :foreach ip in=[:toarray $IPs] do={ :if ([:len [:find [:toarray $IPsFound] [:toip $ip]]] = 0) do={ :put (" Adding address " . $ip) add list=($listprefix . $search) address=[:toip $ip] comment=([:pick [:toarray $Names] $findex]) disabled=no } :set findex ($findex + 1) } # /ip firewall address-list } # Sync an address list with DNS cache # Version: 1.0.0 # This script currently only works with type A and non-static DNS records. # If no matching DNS records are found: # the address list is removed. # If matching DNS records are found: # if an address list entry is NOT found in search result, it is removed. # if an address list entry IS found in search result, is not modified. # if a search result is NOT found in address list, it is added. # # Search string format: # "(:|=|~)<search string>" # : match string anywhere # = match string exactly (case sensitive) # ~ match string using regular expression (requires ROS >= v3.23) # # Example: To search all records containing 'google.com': # :local search ":google.com" # # To search all records ending with 'microsoft.com': # :local search "~microsoft\\.com\$" #:local search "google.com" :local search "~youtube\\.com\$" #:local search "youtube.com" #:local search "www.youtube.com" # The prefix of address list ("" = none) :local listprefix "DNSCache_" # Internal processing... :local IPs "" :local Names "" :local sop [:pick [:tostr $search] 0 1] :set search [:pick [:tostr $search] 1 [:len [:tostr $search]]] /ip dns cache all { :local findex; :local property; :local value; :local name; :local type; :local data :local sfound 0 :foreach rule in=[print detail as-value where static=no] do={ :set name ""; :set type ""; :set data "" :foreach item in=$rule do={ :set findex [:find [:tostr $item] "="] :set property [:pick [:tostr $item] 0 $findex] :set value [:pick [:tostr $item] ($findex + 1) [:len [:tostr $item]]] :if ($property = "name") do={ :set name $value } :if ($property = "type") do={ :set type $value } :if ($property = "data") do={ :set data $value } } # Search DNS cache name using specified operator :set sfound 0 :if ($sop = ":") do={ :if ([:find [:tostr $name] [:tostr $search]] != "" && $type = "A") do={ :set sfound 1 } } :if ($sop = "=") do={ :if ([:tostr $name] = [:tostr $search] && $type = "A") do={ :set sfound 1 } } :if ($sop = "~") do={ :if ([:tostr $name] ~ [:tostr $search] && $type = "A") do={ :set sfound 1 } } :if ($sfound = 1) do={ # :put ("Found " . $name . " -> " . $data) :set IPs ($IPs . $data . ",") :set Names ($Names . $name . ",") } } # /ip dns cache all } :put ("DNS cache search found " . [:len [:toarray $IPs]] . " match(es) for '" . $search . "'") # Search through IPs and add to address list /ip firewall address-list { :local findex; :local listaddr; :local IPsFound "" :put ("Searching address list '" . ($listprefix . [:tostr $search]) . "'...") :foreach l in=[find list=($listprefix . [:tostr $search])] do={ :set listaddr [get $l address] :if ([:len [:find [:toarray $IPs] [:toip $listaddr]]] = 0) do={ :put (" " . $listaddr . " not found in search, removing...") remove $l } else={ # :put ($listaddr . " found address in IPs") :set IPsFound ($IPsFound . $listaddr . ",") } } # Add remaining records to address list :set findex 0 :foreach ip in=[:toarray $IPs] do={ :if ([:len [:find [:toarray $IPsFound] [:toip $ip]]] = 0) do={ :put (" Adding address " . $ip) add list=($listprefix . $search) address=[:toip $ip] comment=([:pick [:toarray $Names] $findex]) disabled=no } :set findex ($findex + 1) } # /ip firewall address-list } и 3-те скрипта докато търсят из DNS кеша процесора отива на 100% и не ми се ще да го тваря с още един такъв за това се чудех ако може на пурвите 2 скрипта да се добави опция освем в /ip hotspot walled-garden ip да добавят и в /ip firewall address-list. Еб.ш не еб.ш на .уя времето минава ... Адрес на коментара Сподели в други сайтове More sharing options...
Mupo neTkoB Отговорено 22 Декември, 2010 Доклад Сподели Отговорено 22 Декември, 2010 :if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; }:if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; } добави /ip firewalladdress-list add address=$ppobjip list=paypal-ips ; Теория - това е когато знаете всичко, но нищо не работи Практика - това е когато всичко работи, но не знаете защо При нас съчетаваме теорията с практиката - НИЩО не работи и нямаме понятие защо!!! Адрес на коментара Сподели в други сайтове More sharing options...
stanioomega Отговорено 22 Декември, 2010 Автор Доклад Сподели Отговорено 22 Декември, 2010 това го пробвах но не става П.С незнам защо но кода не го показва точен тук ако някой иска да копира кода няма да е верен зщото променя някои неща като например това :local ppobjip [:resolve www.paypalobjects.com]; в това :local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]];в това :local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]]; Еб.ш не еб.ш на .уя времето минава ... Адрес на коментара Сподели в други сайтове More sharing options...
Администратор 111111 Отговорено 22 Декември, 2010 Администратор Доклад Сподели Отговорено 22 Декември, 2010 с тия www на дали ще го пингне нещо Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Адрес на коментара Сподели в други сайтове More sharing options...
stanioomega Отговорено 22 Декември, 2010 Автор Доклад Сподели Отговорено 22 Декември, 2010 Цитат с тия www на дали ще го пингне нещо Втория скрипт без www не работи Еб.ш не еб.ш на .уя времето минава ... Адрес на коментара Сподели в други сайтове More sharing options...
Администратор 111111 Отговорено 22 Декември, 2010 Администратор Доклад Сподели Отговорено 22 Декември, 2010 Не мога да разбера ползването на ВВ кода за какво е [url=http://www.paypalobjects.com]www.paypalobjects.com[/url][url=http://www.paypalobjects.com]www.paypalobjects.com[/url] така написано само във форум ще излезне замени го само с paypalobjects.compaypalobjects.com копирано е от форум това http://forum.mikrotik.com/viewtopic.php?f=2&t=45098 http://wiki.mikrotik.com/wiki/PayPal_with_hotspot_and_walled_garden_bypass Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Адрес на коментара Сподели в други сайтове More sharing options...
stanioomega Отговорено 22 Декември, 2010 Автор Доклад Сподели Отговорено 22 Декември, 2010 Скриптовете си работят перфектно , въпросът ми беше друг освем във /ip hotspot walled-garden ip да ги накарам да добавят и в /ip firewall address-list Еб.ш не еб.ш на .уя времето минава ... Адрес на коментара Сподели в други сайтове More sharing options...
Администратор 111111 Отговорено 23 Декември, 2010 Администратор Доклад Сподели Отговорено 23 Декември, 2010 Тъп въпрос но все пак защо са ти там след като може да направиш маркиране по аутентикиран и неаутентикиран трафик ? Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Адрес на коментара Сподели в други сайтове More sharing options...
stanioomega Отговорено 23 Декември, 2010 Автор Доклад Сподели Отговорено 23 Декември, 2010 идеята е тази add action=drop chain=input comment=WWW-External-IP disabled=no dst-address-list=!paypal dst-port=80 protocol=tcp add action=drop chain=input comment=WWW-External-IP disabled=no dst-address-list=!paypal dst-port=80 protocol=tcp знам че PayPal уш няма работа на тоя порт но бе това dst-address-list=!paypal не иска да потварди плащането Скрипровете мисля че се получиха , оспях да ги докарам до тук и работят :local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]]; :local today [/system clock get date]; :local paypalobject [/ip hotspot walled-garden ip find dst-address=$ppobjip]; :local thisdate none; :local noip true; :foreach i in=$paypalobject do={ :set noip false; :set thisdate [/ip hotspot walled-garden ip get $i comment]; :if ($thisdate != ("ppobj $today")) do={ /ip hotspot walled-garden ip set $i comment="ppobj $today"; /ip firewall address-list add address=$ppobjip list=paypal comment=paypal disabled=no; } } :if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; /ip firewall address-list add address=$ppobjip list=paypal comment=paypal disabled=no; }:local ppobjip [:resolve [url=http://www.paypalobjects.com]www.paypalobjects.com[/url]]; :local today [/system clock get date]; :local paypalobject [/ip hotspot walled-garden ip find dst-address=$ppobjip]; :local thisdate none; :local noip true; :foreach i in=$paypalobject do={ :set noip false; :set thisdate [/ip hotspot walled-garden ip get $i comment]; :if ($thisdate != ("ppobj $today")) do={ /ip hotspot walled-garden ip set $i comment="ppobj $today"; /ip firewall address-list add address=$ppobjip list=paypal comment=paypal disabled=no; } } :if ($noip) do={ :log warning "paypal script adding $ppobjip"; /ip hotspot walled-garden ip add dst-address=$ppobjip comment="ppobj $today"; /ip firewall address-list add address=$ppobjip list=paypal comment=paypal disabled=no; } :local today [/system clock get date]; :local old [/ip hotspot walled-garden ip find comment~"ppobj*"]; :local thisrem none; :local thisip none; :foreach i in=$old do={ :set thisrem [/ip hotspot walled-garden ip get $i comment]; :if ($thisrem != ("ppobj $today")) do={ /ip hotspot walled-garden ip remove $i; } } :resolve [url=http://www.paypal.com;]www.paypal.com;[/url] :global paypalips [/ip dns cache find name="www.paypal.com"]; :global oldips [/ip hotspot walled-garden ip find comment="paypal"]; :global oldipss [/ip firewall address-list find comment="paypal"]; :foreach x in=$oldips do={ /ip hotspot walled-garden ip remove $x; } :foreach xx in=$oldipss do={ /ip firewall address-list remove $xx; } :foreach i in=$paypalips do={ :set thisip [/ip dns cache get $i address]; /ip hotspot walled-garden ip add comment="paypal" dst-address=$thisip; # /ip firewalladdress-list add address=$thisip list=paypal-ips ; /ip firewall address-list add address=$thisip list=paypal comment=paypal disabled=no; }:local today [/system clock get date]; :local old [/ip hotspot walled-garden ip find comment~"ppobj*"]; :local thisrem none; :local thisip none; :foreach i in=$old do={ :set thisrem [/ip hotspot walled-garden ip get $i comment]; :if ($thisrem != ("ppobj $today")) do={ /ip hotspot walled-garden ip remove $i; } } :resolve [url=http://www.paypal.com;]www.paypal.com;[/url] :global paypalips [/ip dns cache find name="www.paypal.com"]; :global oldips [/ip hotspot walled-garden ip find comment="paypal"]; :global oldipss [/ip firewall address-list find comment="paypal"]; :foreach x in=$oldips do={ /ip hotspot walled-garden ip remove $x; } :foreach xx in=$oldipss do={ /ip firewall address-list remove $xx; } :foreach i in=$paypalips do={ :set thisip [/ip dns cache get $i address]; /ip hotspot walled-garden ip add comment="paypal" dst-address=$thisip; # /ip firewalladdress-list add address=$thisip list=paypal-ips ; /ip firewall address-list add address=$thisip list=paypal comment=paypal disabled=no; } Еб.ш не еб.ш на .уя времето минава ... Адрес на коментара Сподели в други сайтове More sharing options...
petrichbg Отговорено 22 Ноември, 2011 Доклад Сподели Отговорено 22 Ноември, 2011 Ше работи ли това на Микротик 5.8 ? Адрес на коментара Сподели в други сайтове More sharing options...
sftt Отговорено 9 Декември, 2011 Доклад Сподели Отговорено 9 Декември, 2011 Здравейте колеги и колежки ако има такива .Проблема ми е че трябва да пусна един хотспот малък но искам да ползвам системата на ПайПал трябва ми някакви насоки за да прочета по точно как трябва да стане в ВИКИ вече четох но неможах да го направя .Значи идеята ми е следната. КЛИЕНТ-------хотспот-----ПайПал------Плащане------Получаване на код от ПайПал-------Ауторизация Пред хотспота (ако е платено и кода е валиден влиза ако ли не вън). Благодаря ви предварително. Адрес на коментара Сподели в други сайтове More sharing options...
Администратор 111111 Отговорено 9 Декември, 2011 Администратор Доклад Сподели Отговорено 9 Декември, 2011 Коя част те спъва? Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Адрес на коментара Сподели в други сайтове More sharing options...
sftt Отговорено 10 Декември, 2011 Доклад Сподели Отговорено 10 Декември, 2011 (Редактирано) На 9.12.2011 г. at 17:38, 111111 написа: Коя част те спъва? Понеже за първи път ще ползвам ПайПал с тази цел пояснявам. С скрипта нямам проблеми но единственното което незнам , е как да го направя в пайпал да може да дава пароли на клиентите който са платили.Тоест Примерно задал съм скорости с цените клиента избира скорост плаща за нея как да го направя така че пайпал след като клиента си плати да му даде парола и усер за достъп. П.П. до сега съм правил хотспоти само с покупката на паролите от магазини или др. Но там където трябва да го монтирам няма такива работи в близост Редактирано 10 Декември, 2011 от sftt Адрес на коментара Сподели в други сайтове More sharing options...
Recommended Posts
Създайте нов акаунт или се впишете, за да коментирате
За да коментирате, трябва да имате регистрация
Създайте акаунт
Присъединете се към нашата общност. Регистрацията става бързо!
Регистрация на нов акаунтВход
Имате акаунт? Впишете се оттук.
Вписване