W. T. Tsai

12 papers A 1B 2C 1Journal 6Unranked 1
YearRankTypeTitle / Venue / Authors
2007 J jnl
Int. J. Simul. Process. Model.
W. T. Tsai
1995 C conf
SEKE
O. A. Al-Saadoon, W. T. Tsai, H. El-bedour
1994 ch.
The Impact of Case Technology on Software Processes
S. Chen, W. T. Tsai, X. P. Chen
1992 B conf
ICTAI
W. T. Tsai
1992 J jnl
IEEE Trans. Parallel Distributed Syst.
Zhijun Tong, Richard Y. Kain, W. T. Tsai
1991 B conf
ICTAI
Nikolaos G. Bourbakis, Robin Williams, Forouzan Golshani, Myron Flickner, Ted Laliotis, Sukhan Lee, José G. Delgado-Frias, Dan Hammerstrom, Cris Koutsougeras, Gerald G. Pechanek, Benjamin W. Wah, John Yen, Farokh B. Bastani, Tom Cooper, Karan Harbison-Briggs, Rudy Lauber, Alun D. Preece, Imran A. Zualkernan, W. T. Tsai, Daniel E. Cooke, Martin S. Feather, Stephen Fickas, N. Minsky, Peter G. Selfridge, Douglas Smith
1991 J jnl
Neural Networks
Xin Xu, W. T. Tsai
1989 conf
COMPCON
K. G. Heisler, W. T. Tsai, P. A. Powell
1988 J jnl
Neural Networks
Xin Xu, S. Chen, W. T. Tsai, N. K. Huang
1988 J jnl
Neural Networks
Xin Xu, W. T. Tsai, N. K. Huang
1988 J jnl
Neural Networks
Xin Xu, W. T. Tsai, N. K. Huang
1988 A conf
OOPSLA
Rao V. Mikkilineni, W. T. Tsai, Gordon Kotik, Mohammad A. Ketabchi, Gerhard Fischer
redb/extractors/decompiler/bninja/analysis/strings.py
← Index redb/extractors/decompiler/bninja/analysis/strings.py python
from collections import Counter
import math

class StringAnalysis:
    def __init__(self, bv, functions):
        self.bv = bv
        self.functions = functions

    def entropy(self, s: str) -> float:
        """Compute Shannon entropy of a string."""
        if not s:
            return 0.0
        freq = Counter(s)
        length = len(s)
        return -sum((count / length) * math.log2(count / length) for count in freq.values())

    def analyze(self):
        """
        Extract unique strings from the binary.

        Deduplicates by (string, encoding) within the same binary, keeping the
        first occurrence (lowest offset). Cross-binary deduplication and
        aggregation is handled by ClickHouse materialized views.
        """
        strings = {}

        # Sort strings by their starting address
        sorted_entries = sorted(self.bv.strings, key=lambda e: e.start)

        for entry in sorted_entries:
            # Key is the string and its encoding
            key = (entry.value, entry.type.name)

            # Skip if this string (value + encoding) was already added.
            # Because entries are sorted by address, the first one is always kept.
            if key in strings:
                continue

            # Store only the first occurrence with schema-matching field names
            # entry.length is the raw byte length, len(entry.value) is decoded string length
            string_entry = {
                "string": entry.value,
                "string_raw": entry.raw,
                "string_encoding": entry.type.name,
                "string_offset": entry.start,
                "string_length": len(entry.value),
                "string_raw_length": entry.length,
                "string_entropy": self.entropy(entry.value),
            }

            strings[key] = string_entry

        # Return as list for export compatibility
        return list(strings.values())