Hai Dong

192 papers A* 4A 34B 7C 8Misc 3Journal 104Unranked 29
YearRankTypeTitle / Venue / Authors
2026 J jnl
J. Netw. Comput. Appl.
Zubaida Rehman, Iqbal Gondal, Hai Dong, Mengmeng Ge, Mark A. Gregory, Ikram Ul Haq
2026 J jnl
Expert Syst. Appl.
Changhong Tai, Huiying Jin, Qi Wang, Hai Dong, Pengcheng Zhang
2026 J jnl
Expert Syst. Appl.
Ben Wang, Yanxiang Tong, Guang Yang, Xiao Wang, Hai Dong, Yan Xiao, Pengcheng Zhang
2026 J jnl
IEEE Trans. Neural Networks Learn. Syst.
Chenhao Xu, Nasrin Sohrabi, Youyang Qu, Hai Dong, Zahir Tari, Xun Yi
2026 J jnl
IEEE Trans. Serv. Comput.
Qi Wang, Huiying Jin, Changhong Tai, Hai Dong, Pengcheng Zhang
2025 Misc conf
ITNAC
Zubaida Rehman, Mark A. Gregory, Iqbal Gondal, Hai Dong, Mengmeng Ge
2025 C conf
ISCC
Sandeep Ravikanti, Jay Dave, Hai Dong, Iqbal Gondal, Nikumani Choudhury, Tamoghna Ojha, Theofanis P. Raptis
2025 J jnl
CoRR
Ziru Niu, Hai Dong, A. K. Qin
2025 conf
VTC2025-Fall
Xue Tian, Qizhen Li, Hai Dong, Huimin Long
2025 A conf
ICWS
Changhong Tai, Huiying Jin, Qi Wang, Hai Dong, Pengcheng Zhang
2025 J jnl
CoRR
Prabath Abeysekara, Hai Dong
2025 J jnl
IEEE Trans. Reliab.
Hanting Chu, Pengcheng Zhang, Hai Dong, Yan Xiao, Shunhui Ji
2025 J jnl
J. Parallel Distributed Comput.
Fitrio Pakana, Nasrin Sohrabi, Hai Dong, Zahir Tari, Nour Moustafa
2025 J jnl
IEEE Access
Zubaida Rehman, Mark A. Gregory, Iqbal Gondal, Hai Dong, Mengmeng Ge
2025 conf
ESORICS (4)
Pengkun Ren, Hai Dong, Zahir Tari, Pengcheng Zhang
2025 J jnl
CoRR
Pengkun Ren, Hai Dong, Zahir Tari, Pengcheng Zhang
2025 J jnl
CoRR
Ziru Niu, Hai Dong, A. K. Qin, Tao Gu, Pengcheng Zhang
2025 J jnl
CoRR
Qi Xiong, Hai Dong, Nasrin Sohrabi, Zahir Tari
2025 A* conf
AAAI
Ziru Niu, Hai Dong, A. K. Qin
2025 J jnl
CoRR
Chanuka Wijayakoon, Hai Dong, H. M. N. Dilum Bandara, Zahir Tari, Anurag Soin
2025 C conf
ICBC
Chanuka Wijayakoon, Hai Dong, H. M. N. Dilum Bandara, Zahir Tari, Anurag Soin
2025 J jnl
CoRR
Yasaman Samadi, Hai Dong, Xiaoyu Xia
2025 J jnl
CoRR
Jiahui Bai, Hai Dong, A. K. Qin
2025 A conf
WACV
Xiaoyu Zhang, Ziwei Wang, Hai Dong, Zhifeng Bao, Jiajun Liu
2025 J jnl
CoRR
Xiaoyu Zhang, Ziwei Wang, Hai Dong, Zhifeng Bao, Jiajun Liu
2025 A conf
ICWS
Jie Zhang, Huiying Jin, Jingyi Zhao, Hai Dong, Pengcheng Zhang
2025 J jnl
CoRR
Pengkun Ren, Hai Dong, Nasrin Sohrabi, Zahir Tari, Pengcheng Zhang
2025 A* conf
ACM Multimedia
Xiaoyu Zhang, Zhifeng Bao, Hai Dong, Ziwei Wang, Jiajun Liu
2025 J jnl
CoRR
Xiaoyu Zhang, Zhifeng Bao, Hai Dong, Ziwei Wang, Jiajun Liu
2025 J jnl
CoRR
Ahmed Alharbi, Hai Dong, Xun Yi
2025 J jnl
CoRR
Minhao Qiao, Hai Dong, Iqbal Gondal
2024 B conf
COMPSAC
Mengyuan Zhang, Shunhui Ji, Hanbo Cai, Hai Dong, Pengcheng Zhang, Yunhe Li
2024 J jnl
CoRR
Ziming Zhao, Tiehua Zhang, Zhishu Shen, Hai Dong, Xingjun Ma, Xianhui Liu, Yun Yang
2024 J jnl
IEEE Trans. Serv. Comput.
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2024 J jnl
CoRR
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2024 J jnl
IEEE Trans. Serv. Comput.
Junna Zhang, Xinxin Wang, Peiyan Yuan, Hai Dong, Pengcheng Zhang, Zahir Tari
2024 J jnl
IEEE Trans. Serv. Comput.
Juncheng Pu, Xiaodong Fu, Hai Dong, Pengcheng Zhang, Li Liu
2024 conf
SSE
Jiajia Li, Shunhui Ji, Huiying Jin, Hai Dong, Zhiyuan Ge, Pengcheng Zhang
2024 J jnl
Future Gener. Comput. Syst.
Huiqing Wang, Yongrong Huang, Zhide Chen, Xu Yang, Xun Yi, Hai Dong, Xuechao Yang
2024 J jnl
CoRR
Jiahui Bai, Hai Dong, Athman Bouguettaya
2024 J jnl
IEEE Trans. Mob. Comput.
Ziru Niu, Hai Dong, A. Kai Qin, Tao Gu
2024 J jnl
CoRR
Ziru Niu, Hai Dong, A. K. Qin
2024 J jnl
Comput. Geosci.
Liang Ding, Bainian Chen, Yuelong Zhu, Hai Dong, Guiyang Chan, Pengcheng Zhang
2024 B conf
COMPSAC
Shunhui Ji, Yunhe Li, Hai Dong, Mingxuan Xiao, Pengcheng Zhang, Mengyuan Zhang
2024 J jnl
J. Softw. Evol. Process.
Shunhui Ji, Jiahao Gong, Hai Dong, Pengcheng Zhang, Shaoqing Zhu
2024 J jnl
Comput. Geosci.
Liang Ding, Bainian Chen, Yuelong Zhu, Hai Dong, Pengcheng Zhang
2024 J jnl
IEEE Trans. Mob. Comput.
Huiying Jin, Pengcheng Zhang, Hai Dong, Xinmiao Wei, Yuelong Zhu, Tao Gu
2024 J jnl
IEEE Trans. Serv. Comput.
Xiaoyu Zhang, Shixun Huang, Hai Dong, Zhifeng Bao, Jiajun Liu, Xun Yi
2024 J jnl
Comput. Secur.
Zubaida Rehman, Iqbal Gondal, Mengmeng Ge, Hai Dong, Mark A. Gregory, Zahir Tari
2024 A conf
ICWS
Zhiyuan Ge, Pengcheng Zhang, Huiying Jin, Hai Dong, Shunhui Ji, Jiajia Li, Qi Wang
2024 J jnl
CoRR
Mingxuan Xiao, Yan Xiao, Hai Dong, Shunhui Ji, Pengcheng Zhang
2024 A conf
ICWS
Shunhui Ji, Jiajia Li, Huiying Jin, Hai Dong, Zhiyuan Ge, Shuhan Yang, Pengcheng Zhang
2024 J jnl
IEEE Trans. Software Eng.
Pengcheng Zhang, Ben Wang, Xiapu Luo, Hai Dong
2024 A* conf
ICML
Guiyang Chan, Pengcheng Zhang, Hai Dong, Shunhui Ji, Bainian Chen
2024 J jnl
IEEE Trans. Netw. Serv. Manag.
Shunhui Ji, Jiajia Li, Huiying Jin, Ting Wei, Hai Dong, Pengcheng Zhang, Athman Bouguettaya
2024 J jnl
IEEE Trans. Serv. Comput.
Huiying Jin, Pengcheng Zhang, Hai Dong, Athman Bouguettaya, Albert Y. Zomaya
2024 J jnl
Comput. Biol. Medicine
Minliang Liu, Hai Dong, Adam Mazlout, Yuxuan Wu, Asanish Kalyanasundaram, John N. Oshinski, Wei Sun, John A. Elefteriades, Bradley G. Leshnower, Rudolph L. Gleason
2024 J jnl
IEEE Trans. Inf. Forensics Secur.
Hanbo Cai, Pengcheng Zhang, Hai Dong, Yan Xiao, Stefanos Koffas, Yiming Li
2023 J jnl
Inf. Softw. Technol.
Hanting Chu, Pengcheng Zhang, Hai Dong, Yan Xiao, Shunhui Ji, Wenrui Li
2023 J jnl
CoRR
Qi Xiong, Nasrin Sohrabi, Hai Dong, Chenhao Xu, Zahir Tari
2023 J jnl
Softw. Test. Verification Reliab.
Hanbo Cai, Pengcheng Zhang, Hai Dong, Lars Grunske, Shunhui Ji, Tianhao Yuan
2023 J jnl
IEEE Trans. Software Eng.
Pengcheng Zhang, Qifan Yu, Yan Xiao, Hai Dong, Xiapu Luo, Xiao Wang, Meng Zhang
2023 J jnl
IEEE Trans. Serv. Comput.
Prabath Abeysekara, Hai Dong, A. K. Qin
2023 J jnl
IEEE Trans. Serv. Comput.
Prabath Abeysekara, Hai Dong, A. K. Qin
2023 J jnl
CoRR
Ziru Niu, Hai Dong, A. K. Qin, Tao Gu
2023 A conf
ICWS
Jiahui Bai, Hai Dong
2023 A* conf
ASE
Mingxuan Xiao, Yan Xiao, Hai Dong, Shunhui Ji, Pengcheng Zhang
2023 J jnl
CoRR
Mingxuan Xiao, Yan Xiao, Hai Dong, Shunhui Ji, Pengcheng Zhang
2023 J jnl
Wirel. Pers. Commun.
Xiayun Hu, Mingyue Wang, Jiajia Yan, Jiajun Deng, Hai Dong
2023 A conf
ICWS
Shunhui Ji, Congxiong Huang, Pengcheng Zhang, Hai Dong, Yan Xiao
2023 J jnl
IEEE Trans. Serv. Comput.
Huiying Jin, Pengcheng Zhang, Hai Dong, Yuelong Zhu, Athman Bouguettaya
2023 J jnl
CoRR
Fitrio Pakana, Nasrin Sohrabi, Chenhao Xu, Zahir Tari, Hai Dong
2023 J jnl
IEEE Trans. Reliab.
Shunhui Ji, Shaoqing Zhu, Pengcheng Zhang, Hai Dong, Jianan Yu
2023 J jnl
CoRR
Hanbo Cai, Pengcheng Zhang, Hai Dong, Yan Xiao, Stefanos Koffas, Yiming Li
2022 conf
ICCIR
Hai Dong
2022 C conf
APSEC
Qifan Yu, Pengcheng Zhang, Hai Dong, Yan Xiao, Shunhui Ji
2022 J jnl
IEEE Trans. Software Eng.
Pengcheng Zhang, Bin Ren, Hai Dong, Qiyin Dai
2022 B conf
ICPR
Yalan Ye, Chunji Wang, Hai Dong, Li Lu, Qiang Zhao
2022 C conf
APSEC
Shunhui Ji, Shaoqing Zhu, Pengcheng Zhang, Hai Dong
2022 J jnl
CoRR
Prabath Abeysekara, Hai Dong, A. K. Qin
2022 J jnl
Robotica
Yongshun Zhang, Xu Liu, Zhenhu Liu, Zihao Zhao, Hai Dong, Dianlong Wang
2022 J jnl
IEEE Trans. Serv. Comput.
Pengcheng Zhang, Huiying Jin, Hai Dong, Wei Song
2022 A conf
ICSOC
Ting Wei, Pengcheng Zhang, Hai Dong, Huiying Jin, Athman Bouguettaya
2022 J jnl
IEEE Access
Liang Ding, Yuelong Zhu, Pengcheng Zhang, Hai Dong, Hao Chen
2022 J jnl
CoRR
Hanbo Cai, Pengcheng Zhang, Hai Dong, Yan Xiao, Shunhui Ji
2022 B conf
SERVICES
Huiying Jin, Pengcheng Zhang, Hai Dong, Yuelong Zhu, Athman Bouguettaya
2022 J jnl
IEEE Trans. Serv. Comput.
Pengcheng Zhang, Huiying Jin, Hai Dong, Wei Song, Athman Bouguettaya
2022 ed.
ICSOC Workshops
Hakim Hacid, Monther Aldwairi, Mohamed Reda Bouadjenek, Marinella Petrocchi, Noura Faci, Fatma Outay, Amin Beheshti, Lauritz Thamsen, Hai Dong
2022 J jnl
ACM Comput. Surv.
Ahmed Alharbi, Hai Dong, Xun Yi, Zahir Tari, Ibrahim Khalil
2022 B conf
SERVICES
Tooba Aamir, Hai Dong, Athman Bouguettaya
2022 J jnl
IEEE Trans. Serv. Comput.
Tooba Aamir, Hai Dong, Athman Bouguettaya
2022 J jnl
CoRR
Hanbo Cai, Pengcheng Zhang, Hai Dong, Yan Xiao, Shunhui Ji
2021 A conf
ICSOC
Mingwei Zhang, Jiayuan Liu, Weipu Zhang, Ke Deng, Hai Dong, Ying Liu
2021 J jnl
CoRR
Mingwei Zhang, Jiayuan Liu, Weipu Zhang, Ke Deng, Hai Dong, Ying Liu
2021 J jnl
Comput. Biol. Medicine
Minliang Liu, Liang Liang, Yasmeen Ismail, Hai Dong, Xiaoying Lou, Glen Iannucci, Edward P. Chen, Bradley G. Leshnower, John A. Elefteriades, Wei Sun
2021 A conf
ICWS
Bing Huang, Hai Dong, Athman Bouguettaya
2021 J jnl
CoRR
Bing Huang, Hai Dong, Athman Bouguettaya
2021 A conf
ICSOC
Xiaoyu Zhang, Shixun Huang, Hai Dong, Zhifeng Bao
2021 conf
AITest
Shijun Ye, Pengcheng Zhang, Hai Dong, Shunhui Ji
2021 J jnl
Intell. Autom. Soft Comput.
Zhe Wang, Yingying Zhao, Hai Dong, Yulong Xu, Yali Lv
2021 J jnl
IEEE Trans. Serv. Comput.
Pengcheng Zhang, Huiying Jin, Hai Dong, Wei Song, Liyan Wang
2021 J jnl
IEEE Trans. Cloud Comput.
Pengcheng Zhang, Yaling Zhang, Hai Dong, Huiying Jin
2021 A conf
ICWS
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2021 J jnl
CoRR
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2021 A conf
ICSOC
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2021 J jnl
CoRR
Ahmed Alharbi, Hai Dong, Xun Yi, Prabath Abeysekara
2021 J jnl
Comput. Intell. Neurosci.
Hai Dong, Xiuxiu Gao, Mingqi Wei
2021 J jnl
Trans. Data Sci.
Wenrui Li, Pengcheng Zhang, Hai Dong, Yangyang Jia, Wennan Cao
2021 C conf
APSEC
Ben Wang, Hanting Chu, Pengcheng Zhang, Hai Dong
2021 J jnl
CoRR
Ahmed Alharbi, Hai Dong, Xun Yi, Zahir Tari, Ibrahim Khalil
2020 A conf
ICSOC
Mingwei Zhang, Jiawei Zhao, Hai Dong, Ke Deng, Ying Liu
2020 J jnl
CoRR
Mingwei Zhang, Jiawei Zhao, Hai Dong, Ke Deng, Ying Liu
2020 B conf
IJCNN
Prabath Abeysekara, Hai Dong, A. K. Qin
2020 J jnl
CoRR
Prabath Abeysekara, Hai Dong, A. K. Qin
2020 J jnl
CoRR
Bing Huang, Athman Bouguettaya, Hai Dong
2020 conf
WISE (1)
Tooba Aamir, Hai Dong, Athman Bouguettaya
2020 J jnl
CoRR
Tooba Aamir, Hai Dong, Athman Bouguettaya
2020 A conf
ICWS
Pengcheng Zhang, Yaling Zhang, Hai Dong, Huiying Jin
2020 A conf
ICWS
Huiying Jin, Pengcheng Zhang, Hai Dong
2020 J jnl
CoRR
Tooba Aamir, Hai Dong, Athman Bouguettaya
2020 conf
WISE (1)
Ahmed Alharbi, Hai Dong
2020 J jnl
CoRR
Ahmed Alharbi, Hai Dong
2019 J jnl
Future Gener. Comput. Syst.
Le Sun, Hai Dong, Omar Khadeer Hussain, Farookh Khadeer Hussain, Alex X. Liu
2019 J jnl
Aust. J. Intell. Inf. Process. Syst.
Hai Dong
2019 A conf
ICWS
Prabath Abeysekara, Hai Dong, A. K. Qin
2018 J jnl
IEEE Access
Le Sun, Hai Dong, Alex X. Liu
2018 book
Sajib Mistry, Athman Bouguettaya, Hai Dong
2018 J jnl
IEEE Trans. Serv. Comput.
Sajib Mistry, Athman Bouguettaya, Hai Dong, A. K. Qin
2018 ed.
ASSRI
Amin Beheshti, Mustafa Hashmi, Hai Dong, Wei Emma Zhang
2018 A conf
ICSOC
Tooba Aamir, Hai Dong, Athman Bouguettaya
2018 conf
WISE (2)
Tooba Aamir, Hai Dong, Athman Bouguettaya
2018 A conf
ICWS
Tooba Aamir, Hai Dong, Athman Bouguettaya
2017 J jnl
Commun. ACM
Athman Bouguettaya, Munindar P. Singh, Michael N. Huhns, Quan Z. Sheng, Hai Dong, Qi Yu, Azadeh Ghari Neiat, Sajib Mistry, Boualem Benatallah, Brahim Medjahed, Mourad Ouzzani, Fabio Casati, Xumin Liu, HongBing Wang, Dimitrios Georgakopoulos, Liang Chen, Surya Nepal, Zaki Malik, Abdelkarim Erradi, Yan Wang, M. Brian Blake, Schahram Dustdar, Frank Leymann, Michael P. Papazoglou
2017 conf
PACIS
Mohammad Saidur Rahman, Ibrahim Khalil, Xun Yi, Hai Dong
2017 A conf
ICSOC
Sajib Mistry, Athman Bouguettaya, Hai Dong, Abdelkarim Erradi
2017 A conf
ICWS
Kashif Ali, Hai Dong, Athman Bouguettaya, Abdelkarim Erradi, Rachid Hadjidj
2017 A conf
ICWS
Tooba Aamir, Athman Bouguettaya, Hai Dong, Abdelkarim Erradi, Rachid Hadjidj
2017 A conf
ICSOC
Tooba Aamir, Athman Bouguettaya, Hai Dong, Sajib Mistry, Abdelkarim Erradi
2017 A conf
ICWS
Malagalage Sameera Hemangi Jayaratna, Athman Bouguettaya, Hai Dong, A. Kai Qin, Abdelkarim Erradi
2016 J jnl
Future Gener. Comput. Syst.
Le Sun, Jiangang Ma, Yanchun Zhang, Hai Dong, Farookh Khadeer Hussain
2016 J jnl
IEEE Trans. Serv. Comput.
Zhen Ye, Sajib Mistry, Athman Bouguettaya, Hai Dong
2016 A conf
ICSOC
Tingting Liang, Liang Chen, Jian Wu, Hai Dong, Athman Bouguettaya
2016 A conf
ICSOC
Wei Gao, Liang Chen, Jian Wu, Hai Dong, Athman Bouguettaya
2016 A conf
ICSOC
Sajib Mistry, Athman Bouguettaya, Hai Dong, Abdelkarim Erradi
2016 A conf
ICSOC
Bing Huang, Athman Bouguettaya, Hai Dong, Liang Chen
2016 conf
WISE (2)
Liang Chen, Haochao Ying, Qibo Qiu, Jian Wu, Hai Dong, Athman Bouguettaya
2015 conf
ICONIP (2)
Supannada Chotipant, Farookh Khadeer Hussain, Hai Dong, Omar Khadeer Hussain
2015 A conf
ICWS
Chii Chang, Seng W. Loke, Hai Dong, Flora D. Salim, Satish Narayana Srirama, Mohan Liyanage, Sea Ling
2015 A conf
ICSOC
Sajib Mistry, Athman Bouguettaya, Hai Dong, A. K. Qin
2015 A conf
ICWS
Sajib Mistry, Athman Bouguettaya, Hai Dong, A. K. Qin
2015 J jnl
Computing
Hai Dong, Farookh Khadeer Hussain
2014 conf
ICONIP (3)
Supannada Chotipant, Farookh Khadeer Hussain, Hai Dong, Omar Khadeer Hussain
2014 A conf
ICWS
Le Sun, Hai Dong, Farookh Khadeer Hussain, Omar Khadeer Hussain, Jiangang Ma, Yanchun Zhang
2014 J jnl
J. Netw. Comput. Appl.
Le Sun, Hai Dong, Farookh Khadeer Hussain, Omar Khadeer Hussain, Elizabeth Chang
2014 conf
ICONIP (3)
Hai Dong, Farookh Khadeer Hussain, Athman Bouguettaya
2014 A conf
ICSOC
Azadeh Ghari Neiat, Athman Bouguettaya, Timos K. Sellis, Hai Dong
2014 conf
I2MTC
Xiaolu Xi, Haicheng Yang, Xuefeng Zhao, Hongchun Yao, Jieting Qiu, Hai Dong, Fabao Yan, Shenglong Tan, Ruijie Shen, Hong Wu, Xing He, Rujun Chen
2014 B conf
FUZZ-IEEE
Le Sun, Hai Dong, Farookh Khadeer Hussain, Omar Khadeer Hussain, Jiangang Ma, Yanchun Zhang
2014 J jnl
IEEE Trans. Ind. Informatics
Hai Dong, Farookh Khadeer Hussain
2013 J jnl
Concurr. Comput. Pract. Exp.
Hai Dong, Farookh Khadeer Hussain
2013 J jnl
Concurr. Comput. Pract. Exp.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2013 Misc conf
CISIS
Saeideh Shahheidari, Hai Dong, Md Nor Ridzuan Bin Daud
2013 conf
WISE (1)
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2012 A conf
ICSOC
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2012 conf
SKG
Le Sun, Hai Dong, Jamshaid Ashraf
2011 J jnl
IEEE Trans. Ind. Electron.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2011 J jnl
Concurr. Comput. Pract. Exp.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2011 J jnl
J. Comput. Syst. Sci.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2011 J jnl
J. Netw. Comput. Appl.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2011 J jnl
IEEE Trans. Ind. Electron.
Hai Dong, Farookh Khadeer Hussain
2011 J jnl
J. Univers. Comput. Sci.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2011 J jnl
Knowl. Based Syst.
Hai Dong, Farookh Khadeer Hussain
2010 conf
SKG
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2010 J jnl
World Wide Web
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2010 Misc conf
CISIS
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2010 conf
OTM Conferences (2)
Omar Khadeer Hussain, Hai Dong, Jaipal Singh
2009 conf
OTM Workshops
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2009 conf
AINA Workshops
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2009 J jnl
Int. J. Web Grid Serv.
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2009 conf
SKG
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2009 conf
ICCSA (2)
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 conf
OTM Workshops
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 conf
SKG
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 conf
ICDIM
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 conf
IT Revolutions
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 C conf
MoMM
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2008 conf
IT Revolutions
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2007 conf
ICNS
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2007 conf
ICSNC
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2007 C conf
ETFA
Hai Dong, Farookh Khadeer Hussain
2007 C conf
ICIW
Hai Dong, Farookh Khadeer Hussain, Elizabeth Chang
2001 J jnl
CoRR
Hai Dong, Roger Flood, C. Hovater, J. Musson
redb/extractors/js_extractors/js_context.py
← Index redb/extractors/js_extractors/js_context.py python
"""Per-sample shared state for the JavaScript extractor pipeline.

A `JSContext` is built exactly once per JS sample (in `workers.py`) and threaded
into every extractor that runs against that sample. It owns the disk read, the
decoded source text, the line-split cache, the Shannon text-entropy figure, the
shared `scan_source()` results, and the pyjsparser AST. Each of those is
computed lazily through `cached_property` so an extractor that doesn't need a
particular artefact does not pay for it.

Without this object, every JS extractor instance redoes the same disk read,
decode, scan, and (for any consumer) AST parse. With it, every extractor
shares one set of results.

`JSExtractor.__init__` accepts the context via a `context=` kwarg; if absent
(e.g. unit tests instantiating an extractor directly with `source=...`) it
builds a fresh context from the constructor arguments. Either path produces a
fully-populated context, so extractor code can always rely on
`self._context.scan` / `self._context.ast` / etc.
"""

from __future__ import annotations

import math
from collections import Counter
from dataclasses import dataclass
from functools import cached_property
from typing import Any, Dict, List, Optional

import chardet

from redb.extractors.js_extractors.js_patterns import scan_source


def decode_source(raw_bytes: bytes) -> str:
    """Decode raw JS bytes to text, honouring BOMs and falling back to chardet.

    Mirrors the historical `JSExtractor._decode_source` logic so existing tests
    continue to round-trip identically.
    """
    if not raw_bytes:
        return ""

    if raw_bytes[:3] == b"\xef\xbb\xbf":
        return raw_bytes[3:].decode("utf-8", errors="replace")
    if raw_bytes[:2] in (b"\xff\xfe", b"\xfe\xff"):
        return raw_bytes.decode("utf-16", errors="replace")

    try:
        return raw_bytes.decode("utf-8")
    except UnicodeDecodeError:
        pass

    try:
        detected = chardet.detect(raw_bytes)
        if detected and detected.get("encoding"):
            return raw_bytes.decode(detected["encoding"], errors="replace")
    except Exception:
        pass

    return raw_bytes.decode("latin-1", errors="replace")


def _text_entropy(text: str) -> float:
    """Shannon entropy of the character distribution of `text`, rounded to 4dp."""
    if not text:
        return 0.0
    counter = Counter(text)
    length = len(text)
    entropy = 0.0
    for count in counter.values():
        p = count / length
        if p > 0:
            entropy -= p * math.log2(p)
    return round(entropy, 4)


@dataclass
class JSContext:
    """Shared raw materials for one JS sample, consumed by every JS extractor.

    Cheap attributes (raw_bytes, source) are populated eagerly by the factory.
    Expensive ones (scan, ast) are cached_property — computed on first access
    and reused across every extractor that holds the same context.

    `content_type` is the magika label (e.g. `"javascript"`) carried alongside
    the source so the new code_text_content writer (and any future generic
    text-content writer) can record it without re-running magika. Defaults to
    `"javascript"` because by construction this context type is JS-specific;
    workers.py supplies the actual magika value when it builds the context.
    """

    filepath: str
    raw_bytes: bytes
    source: str
    log: Any = None
    content_type: str = "javascript"
    # Populated by JSStringsExtractor.extract() (the decoded/reconstructed
    # strings — hex/unicode/charcode/base64/concat unpacked into plaintext).
    # Read post-loop by the IOC plumbing in workers.py so any IOCs hidden
    # behind those encodings get scraped from the decoded form. Stays None
    # if JSStringsExtractor didn't run for this sample.
    decoded_strings: Optional[list] = None

    @cached_property
    def lines(self) -> List[str]:
        return self.source.splitlines() if self.source else []

    @cached_property
    def text_entropy(self) -> float:
        return _text_entropy(self.source)

    @cached_property
    def scan(self) -> Dict[str, Dict[str, object]]:
        """Result of running scan_source() exactly once over self.source."""
        return scan_source(self.source) if self.source else {}

    @cached_property
    def ast(self) -> Optional[Any]:
        """Lazy pyjsparser AST. Returns None if the parser is missing or fails.

        Extractors should treat None AST as "fall back to regex" — every
        AST-consuming extractor already handles that path.
        """
        if not self.source:
            return None
        try:
            import pyjsparser
            return pyjsparser.parse(self.source)
        except ImportError:
            if self.log is not None:
                self.log.debug("pyjsparser not installed, AST analysis skipped")
        except Exception as e:
            if self.log is not None:
                self.log.warning(f"AST parsing failed for {self.filepath}: {e}")
        return None

    @cached_property
    def deobfuscated(self) -> "tuple[Optional[str], Optional[str]]":
        """Run the configured JS deobfuscator (with jsbeautifier fallback) once
        per sample and cache the result. Returns `(text, normalizer_used)` or
        `(None, None)` if neither path produced output.

        Computed lazily on first access — samples whose pipeline never reads
        this don't pay the subprocess cost.
        """
        from redb.extractors.js_extractors.js_deobfuscator import deobfuscate
        return deobfuscate(self.source, self.log)

    @cached_property
    def scan_deobfuscated(self) -> Dict[str, Dict[str, object]]:
        """Result of running scan_source() exactly once over the deobfuscated
        text, keyed by PATTERNS only (FEATURE_PATTERNS are not consulted by
        the dual-pass consumers). Empty dict when there is no deobfuscated
        text or it equals the raw source.

        Two extractors consume the post-deobf API surface:
        `JSSuspiciousAPIsExtractor` (for revealed_by_deobf rows) and
        `JSDeobfuscationExtractor` (for the new_apis_found diff). Caching here
        means we scan the deobfuscated text once instead of twice per sample.
        """
        from redb.extractors.js_extractors.js_patterns import PATTERNS
        deobf_text, _ = self.deobfuscated
        if not deobf_text or deobf_text == self.source:
            return {}
        return scan_source(deobf_text, patterns=(PATTERNS,))

    @cached_property
    def xray(self):
        """Run @nodesecure/js-x-ray once per sample and cache the result.

        Returns an `XRayResult` (always — the function collapses every failure
        path to an empty result so callers don't have to special-case missing
        Node, missing package, timeouts, or parse errors). The
        `JSFeaturesExtractor` reads it for the obfuscator family name and for
        corroborating warning kinds; the heuristic falls back cleanly when
        `xray.obfuscator is None`.
        """
        from redb.extractors.js_extractors.js_xray import run
        return run(self.source, self.log)

    @classmethod
    def from_path(
        cls,
        filepath: str,
        log: Any = None,
        source: Optional[str] = None,
        raw_bytes: Optional[bytes] = None,
        content_type: str = "javascript",
    ) -> "JSContext":
        """Build a context from disk. `raw_bytes` and `source` are optional
        overrides — useful when the caller has already read or decoded the file.
        `content_type` is the magika label workers.py dispatched on; it lands
        on the context for the code_text_content writer to record.
        """
        if raw_bytes is None:
            with open(filepath, "rb") as f:
                raw_bytes = f.read()
        if source is None:
            source = decode_source(raw_bytes)
        return cls(
            filepath=filepath,
            raw_bytes=raw_bytes,
            source=source,
            log=log,
            content_type=content_type,
        )