Kau bisa bersembunyi dari kesalahanmu, tapi tidak dari penyesalanmu. Kau bisa bermain dengan dramamu, tapi tidak dengan karmamu.

  • About

    Seorang Teknisi Jaringan yang pernah berkecimpung di Internet Service Provider (ISP) dan akhirnya memutuskan diri untuk menjadi freelancer yang berdomisili di Solo, Surakarta Hadiningrat.

  • Services

    Melayani jasa pasang Internet berbasis Wireless maupun Fiber Optic, Jasa Pasang Tower/Pipa, Pointing Wireless, Setting Router, CCTV, Hotspot, Proxy, Web Server, Network Managed dan Monitoring

  • Contact

    Berbagai saran, kritikan, keluhan dan masukan akan sangat berarti bagi saya. Anda dapat menghubungi/whatsapp saya di nomor:08564-212-8686 atau melalui BBM:2128686

    Sunday, January 12, 2020


    Kali ini akan saya share script untuk blokir unbound berdasarkan list porn StevenBlack.
    Syarat penggunaan script ini adalah jika unbound telah berhasil diinstall dan berjalan dengan baik tanpa error. Jangan lupa install dahulu dos2unix jika belum terinstall, caranya
    apt install dos2unix -y
    Baiklah, silahkan buat file convert.sh, kemudian chmod 777 convert.sh
    # list of ads domain names
    array=( https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts )
    for i in "${array[@]}"
    do
    wget $i -O w
    grep -v " #\|<td>\|<p>\|<meta>\|<link>\|<title>\|href\|title=\|=\|<" w > adsList.txt
    rm w
    dos2unix adsList.txt
    # remove host syntax and clean file
    sed -i 's/0.0.0.0//g' adsList.txt
    sed -i 's/127.0.0.1//g' adsList.txt
    sed -i 's/localhost//g' adsList.txt
    sed -i 's/.localdomain//g' adsList.txt
    # remove commentary after domain name
    sed -i 's/#.*//' adsList.txt
    # remove tabulation character and carriage return
    sed -i "s/\t//g" adsList.txt
    sed -i "s/\r//g" adsList.txt
    # remove useless space
    sed -i 's/ //g' adsList.txt
    # remove empty lines
    sed -i '/^\s*$/d' adsList.txt
    # add prefix and suffix for unbound
    sed -i "s/.*/local-zone: \"&\" static/" adsList.txt
    cat adsList.txt >> adsListFinal.txt
    done
    # order list by name, it didn't cost a lot and could maybe increase unbound performance
    sort adsListFinal.txt -o adsListFinal.txt
    # remove duplicate ads domain in order to avoid warning with Unbound
    uniq adsListFinal.txt > adslist.txt
    # remove tempory files
    rm adsListFinal.txt adsList.txt
    kemudian eksekusi ./convert.sh 
    dari hasil script di atas akan muncul file adsList.txt, kemudian pindahkan ke /etc/unbound/unbound.conf.d/
    kemudian laukan pengecekan
    root@DNS-20-10:/home/rahox # unbound-checkconf
    unbound-checkconf: no errors in /etc/unbound/unbound.conf
    jika dipastikan tidak error silahkan reload atau restart unbound dengan cara
    unbound-control reload 
    atau
    unbound-control restart
    Jika sudah, lakukan pengecekan seperti berikut, pastikan /etc/resolv.conf sudah diarahkan ke 127.0.0.1
    root@DNS-20-10:/home/rahox # nslookup xnxx.com
    Server:         127.0.0.1
    Address:        127.0.0.1#53
    ** server can't find xnxx.com: NXDOMAIN

    Friday, November 29, 2019

    deb http://kartolo.sby.datautama.net.id/debian stretch main contrib non-free
    deb http://kartolo.sby.datautama.net.id/debian stretch-updates main contrib non-free
    deb http://kartolo.sby.datautama.net.id/debian-security/ stretch/updates main contrib non-free
    deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
    disable /etc/apt/sources.list.d/pve-enterprise.list

    disable apt update ipv6
    nano /etc/apt/apt.conf.d/99force-ipv4
    Acquire::ForceIPv4 "true";
    apt update; apt dist-upgrade


    Thursday, November 14, 2019

    # source : https://nsrc.org/workshops/ws-files/2011/sanog17/exercises/exercises-smokeping.html
    # Note that all IP addresses in this file are false, to prevent some
    # machine falling under a deadly DOS storm because all users keep
    # the same addresses in their config.
    
    *** General ***
    
    ################################################
    # DON'T TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING
    # BETWEEN THESE MARKS!
    ################################################
    sendmail = /usr/sbin/sendmail
    imgcache = /var/www/smokeping
    imgurl   = ../smokeping
    datadir  = /var/lib/smokeping
    piddir   = /var/run/smokeping
    smokemail = /etc/smokeping/smokemail
    tmail    = /etc/smokeping/tmail
    ################################################
    # END OF DON'T TOUCH SECTION
    ################################################
    
    
    # Please edit this to suit your installation
    #
    # If you have a fully qualified domain name, then you should add this to all
    # occurrences of "noc".
    #
    owner    = The NOCMeister
    contact  = monitor@noc
    cgiurl   = http://noc/cgi-bin/smokeping.cgi
    mailhost = localhost 
    # specify this to get syslog logging
    syslogfacility = local0
    # each probe is now run in its own process
    # disable this to revert to the old behaviour
    # concurrentprobes = no
    
    *** Alerts ***
    to = monitor@noc
    from = smokealert@noc
    
    +bigloss
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0%
    comment = suddenly there is packet loss
    
    +someloss
    type = loss
    # in percent
    pattern = >0%,*12*,>0%,*12*,>0%
    comment = loss 3 times  in a row
    
    +startloss
    type = loss
    # in percent
    pattern = ==S,>0%,>0%,>0%
    comment = loss at startup
    
    +rttdetect
    type = rtt
    # in milli seconds
    pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100
    comment = routing messed up again ?
    
    +hostdown
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%, ==U
    comment = no reply
    
    +lossdetect
    type = loss
    # in percent
    pattern = ==0%,==0%,==0%,==0%,>20%,>20%,>20%
    comment = suddenly there is packet loss
    
    
    
    
    *** Database ***
    
    step     = 300
    pings    = 20
    
    # consfn mrhb steps total
    
    AVERAGE  0.5   1  1008
    AVERAGE  0.5  12  4320
        MIN  0.5  12  4320
        MAX  0.5  12  4320
    AVERAGE  0.5 144   720
        MAX  0.5 144   720
        MIN  0.5 144   720
    
    *** Presentation ***
    
    template = /etc/smokeping/basepage.html
    
    + overview 
    
    width = 600
    height = 50
    range = 10h
    
    + detail
    
    width = 600
    height = 200
    unison_tolerance = 2
    
    "Last 3 Hours"    3h
    "Last 30 Hours"   30h
    "Last 10 Days"    10d
    "Last 400 Days"   400d
    
    *** Probes ***
    
    + FPing
    binary = /usr/bin/fping
    
    + EchoPingHttp
    
    + DNS
    binary = /usr/bin/dig
    pings = 5
    step = 180
    
    
    
    *** Targets ***
    
    probe = FPing
    
    ## You have to edit and uncomment all what you want below this.
    # Please, refer to smokeping_config man page for more info
    # The given adresses aren't real to avoid DoS.
    
    menu = Top
    title = Network Latency Grapher
    remark = intERLab at AIT Network Operations and Management Workshop \
             sample SmokePing site 
    
    + Local
    
    menu = APRICOT 2008 
    title = Network Management Workshop 
    
    #
    ####### LATENCY ########
    #
    
    ++ Latency
    
    menu = Latency
    title = Measure of Latency using icmp ping
    
    +++ LocalMachine 
    
    menu = NOC 
    title = The NOC@intERLab
    host = localhost
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    #++ NOCSquid
    #
    #menu = The NOC Squid
    #title = www-cache / HTTP for noc@apricot2008
    #probe = EchoPingHttp
    #host = localhost
    #port = 8080 # use the squid port
    #url = http://localhost/
    #
    
    #
    ## You should edit this for your particular class setup.
    ## For each PC if you have a fully qualified domain name,
    ## you should add this as well.
    ##
    #
    
    +++ PC1
    
    menu = pc1
    title = pc1
    host = pc1
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC2
    
    menu = pc2
    title = pc2
    host = pc2
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC3
    
    menu = pc3
    title = pc3
    host = pc3
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC4
    
    menu = pc4
    title = pc4
    host = pc4
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC5
    
    menu = pc5
    title = pc5
    host = pc5
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC6
    
    menu = pc6
    title = pc6
    host = pc6
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC7
    
    menu = pc7
    title = pc7
    host = pc7
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC8
    
    menu = pc8
    title = pc8
    host = pc8
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC9
    
    menu = pc9
    title = pc9
    host = pc9
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC10
    
    menu = pc10
    title = pc10
    host = pc10
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC11
    
    menu = pc11
    title = pc11
    host = pc11
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC12
    
    menu = pc12
    title = pc12
    host = pc12
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC13
    
    menu = pc13
    title = pc13
    host = pc13
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    +++ PC14
    
    menu = pc14
    title = pc14
    host = pc14
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    +++ PC15
    
    menu = pc15
    title = pc15
    host = pc15
    alerts = startloss,someloss,bigloss,rttdetect,hostdown
    
    #
    ####### APACHE ########
    #
    
    #
    # You should edit this for your particular class setup.
    # For each PC if you have a fully qualified domain name,
    # you should add this as well.
    #
    
    ++ Apache
    
    menu = HTTP
    title = Apache (http) service
    
    +++ NOC
    
    menu = NOC
    title = Apache 2 Server for noc
    probe = FPing
    host = localhost
    
    +++ PC1
    
    menu = PC1 
    title = Apache 2 Server for pc1
    probe = FPing
    host = pc1
    
    +++ PC2
    
    menu = PC2 
    title = Apache 2 Server for pc2
    probe = FPing
    host = pc2
    
    +++ PC3
    
    menu = PC3 
    title = Apache 2 Server for pc3
    probe = FPing
    host = pc3
    
    +++ PC4
    
    menu = PC4 
    title = Apache 2 Server for pc4
    probe = FPing
    host = pc4
    
    +++ PC5
    
    menu = PC5 
    title = Apache 2 Server for pc5
    probe = FPing
    host = pc5
    
    +++ PC6
    
    menu = PC6 
    title = Apache 2 Server for pc6
    probe = FPing
    host = pc6
    
    +++ PC7
    
    menu = PC7 
    title = Apache 2 Server for pc7
    probe = FPing
    host = pc7
    
    +++ PC8
    
    menu = PC8 
    title = Apache 2 Server for pc8
    probe = FPing
    host = pc8
    
    +++ PC9
    
    menu = PC9 
    title = Apache 2 Server for pc9
    probe = FPing
    host = pc9
    
    +++ PC10
    
    menu = PC10 
    title = Apache 2 Server for pc10
    probe = FPing
    host = pc10
    
    +++ PC11
    
    menu = PC11 
    title = Apache 2 Server for pc11
    probe = FPing
    host = pc11
    
    +++ PC12
    
    menu = PC12 
    title = Apache 2 Server for pc12
    probe = FPing
    host = pc12
    
    +++ PC13
    
    menu = PC13 
    title = Apache 2 Server for pc13
    probe = FPing
    host = pc13
    
    +++ PC14
    
    menu = PC14 
    title = Apache 2 Server for pc14
    probe = FPing
    host = pc14
    
    +++ PC15
    
    menu = PC15 
    title = Apache 2 Server for pc15
    probe = FPing
    host = pc15
    
    #
    ####### APACHE ########
    #
    
    ++ DNS 
    
    probe = DNS
    menu = DNS 
    title = DNS (name server latency)
    
    
    +++ NOC
    
    menu = NOC
    title = Name Server Latency for noc
    host = noc 
    
    #
    ####### WORLD ########
    #
    
    + World
    
    menu = World
    title = Worldwide Connectivity
    
    ++ Africa
    
    menu = Africa
    title = African Connectivity
    
    +++ SouthAfrica
    
    menu = AfNOG
    title = African Network Operators Group
    host = afnog.org
    
    ++ NorthAmerica
    
    menu = North America
    title = North American Connectivity
    
    +++ USA
    
    menu = USA
    title = Select US Servers
    
    ++++ NSRC
    
    menu = NSRC
    title = NSRC (Eugene, Oregon, USA)
    host = nsrc.org
    
    ++++ WRC
    
    menu = WRC
    title = ISOC Workshop Resource Centre (Eugene, Oregon, USA)
    host = ws.edu.isoc.org
    
    ++++ shell
    
    menu = shell.uoregon.edu
    title = Main User Box, University of Oregon (Eugene, Oregon, USA)
    host = shell.uoregon.edu
    
    ++ SouthAmerica
    
    menu = South America
    title =South American Connectivity
    
    +++ Chile
    
    menu = Chile
    title = sageduck.org
    host = sageduck.org
    
    
    #
    ####### Multi Targe ########
    #
    
    #+ MultiTarget 
    
    #menu = MultiTarget 
    #title = Multi Target Graph of ping Latency  
    
    #++ NorthAmerica 
    
    #menu = NorthAmerica 
    #title = North American Servers
    #host = shell.uoregon.edu \
    #       nsrc.org \
    #       psg.com
    #alerts = bigloss,rttdetect 
    

    Monday, September 9, 2019


    Kali ini saya akan share tips menambahkan gadget ke dalam addresslist mikrotik

    :local newDynamics value=[/ip dhcp-server lease find dynamic=yes];
    :local newList value="";
    :foreach i in=[$newDynamics] do={
    :local dynamicIP [/ip dhcp-server lease get $i address];
    :local dynamicMAC [/ip dhcp-server lease get $i mac-address];
    :local dynamicHOST [/ip dhcp-server lease get $i host-name];
    :if ($dynamicHOST~"(Andro|andro|Redmi|redmi|Vivo|vivo|Iphone|iphone|Galaxy|galaxy|BLACKBER)") do={
          /ip firewall address-list add list=cidr_hs_office address=$dynamicIP comment=$dynamicHOST
          :log warning "$dynamicIP added"
          }
    }
    script diatas silahkan tambahkan pada system => scheduler

    Tuesday, August 27, 2019

    Kali ini saya akan bagi tips buat anda yang pengen bikin address-list akamai di mikrotik.
    OK, saya anggap anda bisa searching di bgp.he.net untuk mendapatkan informasi as-number akamai
    kemudian di blog ini juga sudah ada generate prefix berdasarkan asnumber, silahkan cari.
    setelah ini anggaplah sudah ter-generate dan muncul 2 file berisi list ip akamai tadi


    kemudian, gabunglah kedua file tadi
    /dump # cat  AS35994-AS35994-akamai.rsc >> AS20940-AS20940-akamai.rsc
    /dump # sort --unique -k7 AS20940-AS20940-akamai.rsc >> cidr_akamai.rsc 

    contoh hasilnya seperti berikut
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.251.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.252.0/22
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.34.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.38.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.40.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.48.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.51.0/24
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.54.0/23
    /ip firewall address-list add list=cidr_akamai comment=AS20940-akamai address=96.7.74.0/24

    jika sudah, maka siap di import di mikrotik anda.

    note::
     --unique = berarti filter ip address tanpa duplikat
    -k7 = adalah kolom ke-7 yang akan kita urutkan



    on-up
    ====

    :local remote
    :set remote $"remote-address"
    :log warning ("wellcome ppp-$user ( $remote )")
    :if ( [ /ppp secret get "$user" comment ] = "" ) do={
    :local month
    :local year
    :local yeardiv
    :local yearmult
    :local leapyear
    :local lastday
    :local date [ /system clock get date ]
    :local time [ /system clock get time ]
    # ambil nama bulan dan tahun dari date
    :set month [:pick $date 0 3]
    :set year [:pick $date 7 11]
    # check tahun kabisat atau bukan
    :set yeardiv ($year / 4)
    :set yearmult ($yeardiv * 4)
    :if ([$yearmult] = $year) do={ :set leapyear true } else={ :set leapyear false }
    # set nilai lastday sesuai nama bulan dan tahun
    :if ([$month] = "jan") do={ :set lastday 31d }
    :if ([$month] = "feb") do={
    :if ($leapyear = true) do={ :set lastday 29d }
    :if ($leapyear = false) do={ :set lastday 28d }
    }
    :if ([$month] = "mar") do={ :set lastday 31d }
    :if ([$month] = "apr") do={ :set lastday 30d }
    :if ([$month] = "may") do={ :set lastday 31d }
    :if ([$month] = "jun") do={ :set lastday 30d }
    :if ([$month] = "jul") do={ :set lastday 31d }
    :if ([$month] = "aug") do={ :set lastday 31d }
    :if ([$month] = "sep") do={ :set lastday 30d }
    :if ([$month] = "oct") do={ :set lastday 31d }
    :if ([$month] = "nov") do={ :set lastday 30d }
    :if ([$month] = "dec") do={ :set lastday 31d }
    # cek nilai lastday
    #:log info ("$lastday")
    /ppp secret set $user comment="$date $time"
    /system scheduler remove [find name="ppp-$user"]
    /system scheduler add interval=$lastday name="ppp-$user" on-event="/ppp active remove [find user=\"$user\"]\r\n/ppp secret disable [find name=\"$user\"]\r\n/system scheduler remove [find name=\"ppp-$user\"]" start-date=$date start-time=$time
    } else={
    :local zoky [ /ppp secret get "$user" comment ]
    :local zoky1 " $zoky"
    :local zoky2
    :for i from=0 to=([:len $zoky1] - 1) do={
    :local char [:pick $zoky1 $i]
    :if ($char = " ") do={
    :set $char "\\ "
    }
    :set zoky2 ($zoky2 . $char)
    }
    :local var $zoky2
    :local myArray [:toarray [:pick $var ([:find $var " "]+1) [:len $var]]]
    :local month
    :local year
    :local yeardiv
    :local yearmult
    :local leapyear
    :local lastday
    :local comdate [:pick $myArray 0]
    :local comtime [:pick $myArray 1]
    # ambil nama bulan dan tahun dari comdate
    :set month [:pick $comdate 0 3]
    :set year [:pick $comdate 7 11]
    # check tahun kabisat atau bukan
    :set yeardiv ($year / 4)
    :set yearmult ($yeardiv * 4)
    :if ([$yearmult] = $year) do={ :set leapyear true } else={ :set leapyear false }
    # set nilai lastday sesuai nama bulan dan tahun
    :if ([$month] = "jan") do={ :set lastday 31d }
    :if ([$month] = "feb") do={
    :if ($leapyear = true) do={ :set lastday 29d }
    :if ($leapyear = false) do={ :set lastday 28d }
    }
    :if ([$month] = "mar") do={ :set lastday 31d }
    :if ([$month] = "apr") do={ :set lastday 30d }
    :if ([$month] = "may") do={ :set lastday 31d }
    :if ([$month] = "jun") do={ :set lastday 30d }
    :if ([$month] = "jul") do={ :set lastday 31d }
    :if ([$month] = "aug") do={ :set lastday 31d }
    :if ([$month] = "sep") do={ :set lastday 30d }
    :if ([$month] = "oct") do={ :set lastday 31d }
    :if ([$month] = "nov") do={ :set lastday 30d }
    :if ([$month] = "dec") do={ :set lastday 31d }
    # cek nilai lastday
    #:log info ("$lastday")
    /system scheduler remove [find name="ppp-$user"]
    /system scheduler add interval=$lastday name="ppp-$user" on-event="/ppp active remove [find user=\"$user\"]\r\n/ppp secret disable [find name=\"$user\"]\r\n/system scheduler remove [find name=\"ppp-$user\"]" start-date=$comdate start-time=$comtime
    } :local profile [/ppp secret get [find name="$user"] profile]
    :local rateLimit [/ppp profile get [find name="$profile"] rate-limit]
    :local parent [/ppp profile get [find name="$profile"] parent]
    :local queue [/ppp profile get [find name="$profile"] queue]
    /queue simple remove [find name="$user-$remote"]
    /queue simple add max-limit="$rateLimit" name="$user-$remote" parent="$parent" queue="$queue/$queue" target="$remote"
    /queue simple remove [find where name~"-$user"]


    on-down
    ======
    :local remote
    :set remote $"remote-address"
    :log warning ("goodbye $user ( $remote )")
    :local bytes [/queue simple get [find name="$user-$remote"] bytes]
    :local totalbytes
    :local arraybytes [:toarray [:pick $bytes ([:find $bytes "/"]+1) [:len $bytes]]]
    :local upbytes [:pick $arraybytes 0]
    :local downbytes [:pick $arraybytes 1]
    :set totalbytes ($upbytes+$downbytes)
    :local zoky [/ppp secret get "$user" comment]
    :local zoky1 " $zoky"
    :local zoky2
    :for i from=0 to=([:len $zoky1] - 1) do={
    :local char [:pick $zoky1 $i]
    :if ($char = " ") do={
    :set $char "\\ "
    }
    :set zoky2 ($zoky2 . $char)
    }
    :local commentppp $zoky2
    :local arraycomment [:toarray [:pick $commentppp ([:find $commentppp " "]+1) [:len $commentppp]]]
    :local comdate [:pick $arraycomment 0]
    :local comtime [:pick $arraycomment 1]
    :local combytes [:pick $arraycomment 2]
    :if ($combytes = "") do={
    /ppp secret set "$user" comment="$comdate $comtime $totalbytes"
    } else={
    :local alltotalbytes
    :set alltotalbytes ($combytes+$totalbytes)
    /ppp secret set "$user" comment="$comdate $comtime $alltotalbytes"
    }
    /queue simple remove [find name="$user-$remote"]
    note
    ===
    profile harap di set max-limit, parent dan queue-typenya
    bikin scheduler di run perjam atau terserah anda intervalnya
    untuk update counter usagenya
    :local userppp
    :local usersimple
    :foreach i in=[/ppp secret find] do {
    :set userppp ( userppp [/ppp secret get $i name])
    :local zoky [/ppp secret get "$userppp" comment]
    :local zoky1 " $zoky"
    :local zoky2
    :for i from=0 to=([:len $zoky1] - 1) do={
    :local char [:pick $zoky1 $i]
    :if ($char = " ") do={
    :set $char "\\ "
    }
    :set zoky2 ($zoky2 . $char)
    }
    :local commentppp $zoky2
    :local arraycomment [:toarray [:pick $commentppp ([:find $commentppp " "]+1) [:len $commentppp]]]
    :local comdate [:pick $arraycomment 0]
    :local comtime [:pick $arraycomment 1]
    :local combytes [:pick $arraycomment 2]
    :if ([/ppp secret get [/ppp secret find name="$userppp"] profile] != "") do {
    :foreach j in=[/queue simple find where name~"$userppp"] do {
    :set usersimple ( usersimple [/queue simple get $j name])
    :local bytes [/queue simple get [/queue simple find name="$usersimple"] bytes]
    :local totalbytes
    :local arraybytes [:toarray [:pick $bytes ([:find $bytes "/"]+1) [:len $bytes]]]
    :local upbytes [:pick $arraybytes 0]
    :local downbytes [:pick $arraybytes 1]
    :set totalbytes ($upbytes+$downbytes)
    :if ($combytes < 0) do {
    :local alltotalbytes
    :if (($comtime < 0)&&($combytes < 0)) do {
    :set alltotalbytes ($comdate+$totalbytes)
    /ppp secret set "$userppp" comment="$alltotalbytes"
    } else {
    :set alltotalbytes ($combytes+$totalbytes)
    /ppp secret set "$userppp" comment="$comdate $comtime $alltotalbytes"
    }
    #:log warning "$userppp $comdate $comtime $combytes $usersimple $totalbytes $alltotalbytes"
    } else {
    :if ($totalbytes = $totalbytes) do {
    #:log warning "no update usage ppp"
    } else {
    :local alltotalbytes
    :if (($comtime < 0)&&($combytes < 0)) do {
    :set alltotalbytes ($comdate+$totalbytes)
    /ppp secret set "$userppp" comment="$alltotalbytes"
    } else {
    :set alltotalbytes ($combytes+$totalbytes)
    /ppp secret set "$userppp" comment="$comdate $comtime $alltotalbytes"
    }
    #:log warning "$userppp $comdate $comtime $combytes $usersimple $totalbytes $alltotalbytes"
    }
    }
    }
    }
    }

    credits : zoky raharjo (fb)