Carol Xiaojuan Ou

63 papers B 1C 5Journal 34Unranked 23
YearRankTypeTitle / Venue / Authors
2025 J jnl
Inf. Technol. People
Luminita Hurbean, Louie H. M. Wong, Carol Xiaojuan Ou, Robert M. Davison, Octavian Dospinescu
2025 J jnl
Electron. Commer. Res. Appl.
Yingxin Song, Yezheng Liu, Xiayu Chen, Muhammet Deveci, Carol Xiaojuan Ou, Lingfei Li, Weizhong Wang
2023 J jnl
Inf. Technol. People
Mengxi Xu, Wei Wang, Carol Xiaojuan Ou, Baoxiang Song
2023 J jnl
J. Manag. Inf. Syst.
Meihua Zuo, Spyros Angelopoulos, Carol Xiaojuan Ou, Hongwei Liu, Zhouyang Liang
2022 J jnl
Inf. Manag.
Yumeng Miao, Rong Du, Carol Xiaojuan Ou
2022 J jnl
Internet Res.
Xiayu Chen, Carol Xiaojuan Ou, Robert M. Davison
2022 J jnl
Int. J. Inf. Manag.
Carol Xiaojuan Ou, Xiaowei Zhang, Spyros Angelopoulos, Robert M. Davison, Noury Janse
2020 J jnl
Int. J. Inf. Manag.
Renee Rui Chen, Robert M. Davison, Carol Xiaojuan Ou
2020 J jnl
Inf. Syst. J.
Renee Rui Chen, Carol Xiaojuan Ou, Wei Wang, Zhuo Peng, Robert M. Davison
2019 J jnl
Comput. Hum. Behav.
Wei Wang, Renee Rui Chen, Carol Xiaojuan Ou, Steven Jifan Ren
2018 J jnl
IEEE Trans. Comput. Soc. Syst.
Pei-Yuan Zhou, Keith C. C. Chan, Carol Xiaojuan Ou
2018 J jnl
Inf. Manag.
Robert M. Davison, Carol Xiaojuan Ou, Maris G. Martinsons
2018 conf
AMCIS
Hongming Gao, Carol Xiaojuan Ou, Hongwei Liu, Paul A. Pavlou, Hui Zhu, Mingjun Zhan
2018 J jnl
Ind. Manag. Data Syst.
Robert M. Davison, Carol Xiaojuan Ou
2017 J jnl
Inf. Manag.
Robert M. Davison, Carol Xiaojuan Ou
2017 J jnl
Inf. Syst.
Bing Li, Keith C. C. Chan, Carol Xiaojuan Ou, Ruifeng Sun
2017 conf
AMCIS
Zherui Yang, Carol Xiaojuan Ou, Ziying Zhou
2017 J jnl
Inf. Manag.
Hui Zhu, Carol Xiaojuan Ou, W. J. A. M. van den Heuvel, Hongwei Liu
2017 J jnl
Inf. Syst.
Hui Zhu, Hongwei Liu, Carol Xiaojuan Ou, Robert M. Davison, Zherui Yang
2017 J jnl
Inf. Syst. J.
Qian Huang, Xiayu Chen, Carol Xiaojuan Ou, Robert M. Davison, Zhongsheng Hua
2016 conf
ECIS
Hui Zhu, Carol Xiaojuan Ou, Robert M. Davison, Paul A. Pavlou, Hongwei Liu
2016 J jnl
CoRR
Hui Zhu, Zherui Yang, Carol Xiaojuan Ou, Hongwei Liu, Robert M. Davison
2016 J jnl
J. Assoc. Inf. Sci. Technol.
Carol Xiaojuan Ou, Robert M. Davison
2016 C conf
ICIS
Qian Huang, Carol Xiaojuan Ou, Robert M. Davison
2016 conf
ACIS
Renee Rui Chen, Robert M. Davison, Carol Xiaojuan Ou
2016 J jnl
Inf. Manag.
Carol Xiaojuan Ou, Robert M. Davison, Louie Wong
2016 J jnl
IEEE Trans. Prof. Commun.
Louie Wong, Carol Xiaojuan Ou, Robert M. Davison, Hui Zhu, Cheng Zhang
2015 conf
PACIS
Jinbi Yang, Choon-Ling Sia, Carol Xiaojuan Ou
2015 conf
PACIS
Renee Rui Chen, Carol Xiaojuan Ou, Wei Wang
2015 conf
AMCIS
Robert M. Davison, Carol Xiaojuan Ou
2014 conf
AMCIS
Carol Xiaojuan Ou, Robert M. Davison, Louie Wong
2014 J jnl
Inf. Manag.
Carol Xiaojuan Ou, Keith C. C. Chan
2014 conf
ECIS
Robert M. Davison, Carol Xiaojuan Ou
2014 conf
ICEBE
Li Bing, Keith C. C. Chan, Carol Xiaojuan Ou
2014 J jnl
MIS Q.
Carol Xiaojuan Ou, Paul A. Pavlou, Robert M. Davison
2014 J jnl
J. Assoc. Inf. Sci. Technol.
Robert M. Davison, Carol Xiaojuan Ou, Maris G. Martinsons, Angela Y. Zhao, Rong Du
2013 J jnl
Inf. Technol. People
Carol Xiaojuan Ou, Choon-Ling Sia, Chun Kit Hui
2013 conf
PACIS
Wei Wang, Carol Xiaojuan Ou
2013 conf
ACIS
Wei Wang, Rui Chen, Carol Xiaojuan Ou, Fang Liu
2013 J jnl
Inf. Syst. J.
Robert M. Davison, Carol Xiaojuan Ou, Maris G. Martinsons
2013 conf
ECIS
Robert M. Davison, Carol Xiaojuan Ou
2012 J jnl
MIS Q.
Robert M. Davison, Maris G. Martinsons, Carol Xiaojuan Ou
2011 J jnl
Decis. Support Syst.
Carol Xiaojuan Ou, Robert M. Davison
2011 conf
ECIS
Robert M. Davison, Carol Xiaojuan Ou
2011 conf
ECIS
Robert M. Davison, Carol Xiaojuan Ou
2011 C conf
ICIS
Carol Xiaojuan Ou, Wing Sze Poon, Paul A. Pavlou, Robert M. Davison
2011 conf
Researching the Future in Information Systems
Carol Xiaojuan Ou, Darren W. L. Leung, Robert M. Davison
2011 conf
PACIS
Carol Xiaojuan Ou, Robert M. Davison, Nikki C. K. Cheng
2010 C conf
ICIS
Carol Xiaojuan Ou, Wing Po Wong, Robert M. Davison
2010 B conf
RCIS
Carol Xiaojuan Ou, Robert M. Davison, Xuepan Zhong, Yi Liang
2010 J jnl
Int. J. Hum. Comput. Stud.
Carol Xiaojuan Ou, Choon-Ling Sia
2010 J jnl
Inf. Technol. People
Carol Xiaojuan Ou, Robert M. Davison, Xuepan Zhong, Yi Liang
2010 conf
AMCIS
Carol Xiaojuan Ou
2009 conf
PACIS
Robert M. Davison, Carol Xiaojuan Ou, Maggie Y. Li, Johan Björkstén
2009 J jnl
Commun. ACM
Carol Xiaojuan Ou, Robert M. Davison
2009 J jnl
J. Assoc. Inf. Syst.
Robert M. Davison, Maris G. Martinsons, Carol Xiaojuan Ou, Kiyoshi Murata, Damon L. Drummond, Yuan Li, Henry W. H. Lo
2009 J jnl
Commun. ACM
Carol Xiaojuan Ou, Choon-Ling Sia
2008 C conf
ICIS
Carol Xiaojuan Ou, Robert M. Davison, Paul A. Pavlou, Maggie Y. Li
2008 C conf
ICIS
Robert M. Davison, Carol Xiaojuan Ou, Maggie Y. Li, Maris G. Martinsons, Johan Björkstén
2007 conf
PACIS
Carol Xiaojuan Ou, Robert M. Davison
2007 conf
PACIS
Robert M. Davison, Carol Xiaojuan Ou
2004 conf
AMCIS
Carol Xiaojuan Ou, Choon-Ling Sia
2003 conf
PACIS
Carol Xiaojuan Ou, Choon-Ling Sia
redb/extractors/decompiler/_archive/ghidra-test.py
← Index redb/extractors/decompiler/_archive/ghidra-test.py python
import subprocess
import json
import os
import tempfile
import uuid
import shutil
import sys
import time


def run_command(cmd, env=None):
    try:
        print(f"Starting command: {' '.join(cmd)}")
        start_time = time.time()
        process = subprocess.Popen(
            cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
        )

        while True:
            output = process.stdout.readline()
            if output:
                print(output.strip())
            if process.poll() is not None:
                break

        stdout, stderr = process.communicate()
        end_time = time.time()

        print(f"Command finished. Execution time: {end_time - start_time:.2f} seconds")
        print(f"Return code: {process.returncode}")

        if process.returncode != 0:
            print(f"Error output:\n{stderr}")
            return None
        return stdout
    except Exception as e:
        print(f"Error running command {' '.join(cmd)}: {e}")
        return None


def analyze_binary(ghidra_path, binary_path, java_script_path):
    print(f"Ghidra path: {ghidra_path}")
    print(f"Binary path: {binary_path}")
    print(f"Java script path: {java_script_path}")

    # Check if Java script exists
    if not os.path.exists(java_script_path):
        print(f"Error: Java script not found at {java_script_path}")
        return None

    # Set up environment variables
    env = os.environ.copy()
    java_home = "/usr/lib/jvm/java-17-openjdk-amd64"  # Adjust this path if needed
    env["JAVA_HOME"] = java_home
    env["PATH"] = f"{java_home}/bin:{env['PATH']}"
    env["LD_LIBRARY_PATH"] = f"{java_home}/lib:{env.get('LD_LIBRARY_PATH', '')}"

    # Print environment variables for debugging
    print(f"JAVA_HOME: {env['JAVA_HOME']}")
    print(f"PATH: {env['PATH']}")
    print(f"LD_LIBRARY_PATH: {env['LD_LIBRARY_PATH']}")

    # Check Ghidra installation
    analyzeHeadless_path = f"{ghidra_path}/support/analyzeHeadless"
    print(f"analyzeHeadless exists: {os.path.exists(analyzeHeadless_path)}")

    print(f"Binary file exists: {os.path.exists(binary_path)}")

    # Check Java
    java_version = run_command(["java", "-version"], env=env)
    print(f"Java version: {java_version}")

    # Create a temporary project directory
    project_path = tempfile.gettempdir() + "/ghidra_" + str(uuid.uuid4())
    os.makedirs(project_path, exist_ok=True)
    print(f"Created temporary project path: {project_path}")
    output_file = ""

    try:
        # Run Ghidra's headless analyzer
        analyze_cmd = [
            analyzeHeadless_path,
            project_path,
            "TempProject",
            "-import",
            binary_path,
            "-postScript",
            java_script_path,
            "-deleteProject",
        ]

        result = run_command(analyze_cmd, env=env)
        if result is None:
            return None

        # Read the output JSON file
        output_file = "ghidra_output.json"
        if os.path.exists(output_file):
            with open(output_file, "r") as f:
                functions = json.load(f)
            return functions
        else:
            print(
                f"Output file {output_file} not found. Ghidra analysis may have failed."
            )
            # List files in the current directory
            print("Files in the current directory:")
            print("\n".join(os.listdir(".")))
            return None
    finally:
        # Clean up
        if os.path.exists(output_file):
            os.remove(output_file)
        if os.path.exists(project_path):
            shutil.rmtree(project_path)


# Example usage
if __name__ == "__main__":
    # if len(sys.argv) != 4:
    #     print("Usage: python script.py <ghidra_path> <binary_path> <java_script_path>")
    #     sys.exit(1)

    # ghidra_path = sys.argv[1]
    # binary_path = sys.argv[2]
    # java_script_path = sys.argv[3]

    ghidra_path = "/opt/ghidra"
    binary_path = "/home/p4c0/dev/redb/test_files/hello"
    java_script_path = (
        "/opt/ghidra/Ghidra/Features/Base/ghidra_scripts/GhidraDecompilerScript.java"
    )

    functions = analyze_binary(ghidra_path, binary_path, java_script_path)

    if functions:
        print(f"Extracted functions from {binary_path}:")
        for func in functions:
            print(f"\nFunction: {func['name']}")
            print(f"Address: {func['address']}")
            print(f"Decompiled code:\n{func['decompiled']}")
    else:
        print("Failed to extract functions.")