taintable/utils/attrFinder.js
//calculate taintable attributes according to dynamic taint result
calculate taintable attributes according to dynamic taint result
calculate taintable attributes according to dynamic taint result
function cal_taintable_attr(domain, attr_lst){
    var taint_lst = {};
    for (const attr of attr_lst){
        for (const d of domain){
            if (attr == d) continue;
            if (attr.startsWith(d + '.')){
                if (!(d in taint_lst)) taint_lst[d] = [];
                if (taint_lst[d].indexOf(attr) === -1) taint_lst[d].push(attr);
            }
        }
    }
    return taint_lst;
}
function cal_taintable_attr ( domain , attr_lst ) { var taint_lst = { } ; for ( const attr of attr_lst ) { for ( const d of domain ) { if ( attr == d ) continue ; if ( attr . startsWith ( d + '.' ) ) { if ( ! ( d in taint_lst ) ) taint_lst [ d ] = [ ] ; if ( taint_lst [ d ] . indexOf ( attr ) === - 1 ) taint_lst [ d ] . push ( attr ) ; } } } return taint_lst ; }
calculate taintable attributes according to dynamic taint result
calculate taintable attributes according to dynamic taint result