SearchProtectToolbar_pcap_0979c793e5

by malwarelabrobot on July 9th, 2017 in Malware Descriptions.

not-a-virus:HEUR:AdWare.Win32.Generic (Kaspersky), Trojan.Win32.Swrort.3.FD, SearchProtectToolbar_pcap.YR, mzpefinder_pcap_file.YR (Lavasoft MAS)
Behaviour: Trojan, Adware


The description has been automatically generated by Lavasoft Malware Analysis System and it may contain incomplete or inaccurate information.

Requires JavaScript enabled!

Summary
Dynamic Analysis
Static Analysis
Network Activity
Map
Strings from Dumps
Removals

MD5: 0979c793e54d24463e69c2e537690cab
SHA1: d11cc1258b468940caf32434c5419541e8ef6bf7
SHA256: 584051022cc2a041b350fad866671e7e54bee2d6e7c1a5bea54f97066b09a02f
SSDeep: 196608:ITmCQ5ipZAIPKsWskAazgSthnmM 7vAy M2YoB1XTB1oJ1crCfbZe9Ik2wXgk5Ll: 1zPKsWSazHCAyjo3TB1o6OwIk2wp5R
Size: 10889752 bytes
File type: EXE
Platform: WIN32
Entropy: Packed
PEID: UPolyXv05_v6
Company: Client Connect Ltd.
Created at: 2011-09-26 16:21:33
Analyzed on: Windows7 SP1 32-bit


Summary:

Trojan. A program that appears to do one thing but actually does another (a.k.a. Trojan Horse).

Payload

No specific payload has been found.

Process activity

The Trojan creates the following process(es):

sdbinst.exe:1936
nsd21BA.exe:1660
nsy4680.exe:1640
%original file name%.exe:1024
nsi1D46.exe:3476
nsn18D2.exe:308
cltmng.exe:2860
nsy4B61.exe:1564
cltmngui.exe:2968
guardboxapp.exe:1676
nsn41AE.exe:3948
CltMngSvc.exe:1904
CltMngSvc.exe:2220
spsetup.exe:3828

The Trojan injects its code into the following process(es):

node.exe:3488

Mutexes

The following mutexes were created/opened:
No objects were found.

File activity

The process sdbinst.exe:1936 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Windows\AppPatch\Custom\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb (1 bytes)

The process nsd21BA.exe:1660 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss22AC.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\inetc.dll (0 bytes)

The process nsy4680.exe:1640 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4680.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd472D.tmp (0 bytes)

The process %original file name%.exe:1024 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\apiCommons.js (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_FF_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\GbTrayIcon.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler64.dll (30344 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_off_small.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_FF.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\selected_frame_alt.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\APIHandler.node (33295 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\browser.tabs.js (543 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native.proxy.js (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top_fill.gif (802 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader.dll (11048 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.omnibox.js (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\Uninstaller.exe (9608 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\logo_small.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\view.js (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_CH_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\rsx\gb_triangle.gif (873 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\bll.js (1552 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\spsetup.exe (234095 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_CH.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top-left_corner.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_FF.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_off_small.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\gb_triangle.gif (873 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardbox.ico (9 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_CH.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\sensore_icon_on.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\api.js (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\view.html (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.tray.js (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-start_hover.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\general.js (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-body.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\app.js (666 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.js (454 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\network.js (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-body_hover.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler.dll (22192 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.screen.js (562 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom_filler.gif (819 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\node.exe (99633 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_IE.ico (846 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_large.gif (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_IE_Small.ico (738 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\view.js (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_large.gif (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\icon_sprite.png (784 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.js (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.html (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom_logo.png (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_large_alt.gif (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_large_alt.gif (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\about_icon_on.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top-right_corner.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\asapsdk.dll (114695 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-start.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_IE.ico (846 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\controls_sprite.png (392 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\framework.js (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_CH_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.css (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom-left_corner.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\icons_sprite.gif (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\GuardboxApp.exe (16903 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_FF_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\content_bg.gif (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_small.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\content_bg.rtl.gif (6 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\services.js (784 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\header.rtl.gif (11 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\btn_close.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\sensore_icon_off.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\Languages\Languages.json (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.js (7 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_CH.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_small.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_CH_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\selected_frame.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\right_fill.gif (811 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\dialog.api.js (8 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE2.tmp (507231 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_IE_Small.ico (738 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_CH.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_IE_Small.ico (738 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_off_large.gif (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_FF_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_off_large.gif (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\btn_close_hover.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\application.js (773 bytes)
C:\ProgramData\GuardboxData\gid.json (35 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\header.gif (11 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\style.css (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.css (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\system.js (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\footer.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\style.css (5 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom-right_corner.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_FF.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\browser_sensor_tab_icon.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\left_fill.gif (811 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.html (519 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\header.rtl.gif (11 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\btn_close_hover.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\header.gif (11 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.dialog.js (7 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsGBUtils.dll (20173 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader64.dll (11048 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\lib.js (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\storage.js (13 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_FF.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\GbMgr64.exe (4992 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\view.html (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\security.url.js (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsJSON.dll (3402 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_CH_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\uid.json (107 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_FF_R2L.ico (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_IE_Small.ico (738 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_IE.ico (846 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\btn_close.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\footer.gif (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\about_icon_off.gif (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_IE.ico (846 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsJSON.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsGBUtils.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFF93.tmp (0 bytes)

The process nsi1D46.exe:3476 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1E2A.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp (0 bytes)

The process nsn18D2.exe:308 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn1A05.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.tmp (0 bytes)

The process cltmng.exe:2860 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\rep\UserSettings.dat (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\rep\UserRepository.dat (4585 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\STG\Init_2A06.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\STG\Init_2B50.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\STG\Init_2A75.tmp (0 bytes)

The process nsy4B61.exe:1564 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4B61.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4BCE.tmp (0 bytes)

The process cltmngui.exe:2968 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\UI\rep\UIRepository.dat (1067 bytes)

The process node.exe:3488 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\GbMgr64.exe (118 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader.dll (303 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler.dll (655 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\ip2LocationCacheFile.txt (180 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\translationCacheFile.txt (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\serviceMapCacheFile.txt (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\GeoURFTimeoutsCacheFile.txt (359 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\APIHandler.node (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\settingCacheFile.txt (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\localization.js (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\asapsdk.dll (291 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\cteng_test.tmp (0 bytes)

The process guardboxapp.exe:1676 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\GB_1331749\Guardbox.exe (339219 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\4ZZNMJGQ\Guardbox[1].exe (575943 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\node.exe (291 bytes)

The process nsn41AE.exe:3948 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\inetc.dll (62 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi426C.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\a.txt (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp (0 bytes)

The process CltMngSvc.exe:1904 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC32Loader.dll (184 bytes)

The process CltMngSvc.exe:2220 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Windows\System32\drivers\SPPD.sys (19 bytes)
%Program Files%\GuardboxEngine\UI\bin\cltmngui.exe (146 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\cltmng.exe (727 bytes)
%Program Files%\GuardboxEngine\Main\rep\SystemRepository.dat (25 bytes)

The Trojan deletes the following file(s):

C:\Windows\System32\drivers\SPPD.sys (0 bytes)

The process spsetup.exe:3828 makes changes in the file system.
The Trojan creates and/or writes to the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe (5114 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC32.dll (246690 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bgSettingsDS.png (9 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns2860.tmp (14 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPTool64.exe (48928 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\browsers32.sdb (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2B50.tmp (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox_checked.png (360 bytes)
%Program Files%\GuardboxEngine\Main\bin\CltMngSvc.exe (96792 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-Rollover.png (2 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\8D93UTC3\CARRIER_ID[1] (891 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button.png (859 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protection\protection.html (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\info-icon.png (424 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\json2.min.js (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\style.css (7 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.exe (5114 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\hez-selected.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\jquery.1.7.1.min.js (3312 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\button-bg.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\x.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsiF8D.tmp (891 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\v.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\inetc.dll (816 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4B61.exe (5114 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\menu-rollover.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\System.dll (23 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bg-with-logo.png (1552 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\settings.html (8 bytes)
%Program Files%\GuardboxEngine\Main\bin\SPTool.dll (81732 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC64.dll (153889 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.html (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bg-uninstall.png (11 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\gray-bg.png (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protection\protection.js (7 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC32Loader.dll (6584 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\close-win-def.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox.png (378 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bgNotif.png (6 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\btnBlue.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\defaults.js (971 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-default.png (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button-def.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button-selected.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\rep\UserRepository.dat (1434 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\SPDialogAPI.js (6 bytes)
%Program Files%\GuardboxEngine\Main\bin\uninstall.exe (33633 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.js (7 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\hez.png (256 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\cltmng.exe (172202 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\btnSilver.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\nsExec.dll (14 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\hez-def.png (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2A75.tmp (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protectionDS\defaults.js (1 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4680.exe (5114 bytes)
%Program Files%\GuardboxEngine\Main\rep\SystemRepository.dat (2290 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsnB18.tmp (699386 bytes)
%Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC64Loader.dll (8184 bytes)
%Program Files%\GuardboxEngine\UI\bin\cltmngui.exe (99214 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns27E2.tmp (14 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button2.png (886 bytes)
%Program Files%\GuardboxEngine\EULA.txt (784 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bgSettings.png (7 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe (5114 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox_def.png (274 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe (5114 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bgUninstall.png (784 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\main.js (10 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protection\protection.css (4 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\bg.png (784 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss1124.tmp (891 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\menu-selected.png (3 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\SPtool.dll (81878 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\btnClose.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-onclick.png (2 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\Settings-icon.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\icon-win.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\libs\dialogUtils.js (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protection\defaults.js (985 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\text-field.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\Images\close-win-over-click.png (1 bytes)
%Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.css (4 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\JYNOWECL\CT3331172[1] (891 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2A06.tmp (1 bytes)

The Trojan deletes the following file(s):

C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsiF8D.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns2860.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\browsers32.sdb (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss1124.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\SPtool.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\inetc.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsyB08.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\System.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\nsExec.dll (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns27E2.tmp (0 bytes)
C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp (0 bytes)

Registry activity

The process sdbinst.exe:1936 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\chrome.exe]
"{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb" = "Type: REG_QWORD, Length: 8"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\Layers\SPVC32Ldr]
"{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb" = "Type: REG_QWORD, Length: 8"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\firefox.exe]
"{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb" = "Type: REG_QWORD, Length: 8"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\explorer.xxx]
"{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb" = "Type: REG_QWORD, Length: 8"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\iexplore.exe]
"{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb" = "Type: REG_QWORD, Length: 8"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}]
"DatabaseType" = "65536"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb]
"UninstallString" = "%windir%\system32\sdbinst.exe -u C:\Windows\AppPatch\Custom\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}]
"DatabaseDescription" = "Apps32"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb]
"DisplayName" = "Apps32"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}]
"DataBasePath" = "C:\Windows\AppPatch\Custom\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb"
"DatabaseInstallTimeStamp" = "Type: REG_QWORD, Length: 8"

The process nsd21BA.exe:1660 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASMANCS]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASAPI32]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASMANCS]
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASAPI32]
"EnableConsoleTracing" = "0"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\,"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASAPI32]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASMANCS]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASAPI32]
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"
"UNCAsIntranet" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 41 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsd21BA_RASMANCS]
"ConsoleTracingMask" = "4294901760"
"FileDirectory" = "%windir%\tracing"
"FileTracingMask" = "4294901760"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process nsy4680.exe:1640 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASMANCS]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASAPI32]
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASMANCS]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASAPI32]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASMANCS]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASAPI32]
"EnableConsoleTracing" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASAPI32]
"MaxFileSize" = "1048576"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 45 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASAPI32]
"ConsoleTracingMask" = "4294901760"
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4680_RASMANCS]
"FileTracingMask" = "4294901760"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\SPtool.dll, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\System.dll, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\,"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process %original file name%.exe:1024 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Guardbox]
"EstimatedSize" = "11739"

[HKCU\Software\AppDataLow\Software\Guardbox]
"Version" = "1.1.1.14"
"InstallationSessionID" = "93830505-E92D-4060-B978-E49A9BFE56BC"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Guardbox]
"DisplayName" = "Guardbox"

[HKLM\SOFTWARE\Guardbox]
"UserCount" = "1"

[HKCU\Software\AppDataLow\Software\Guardbox]
"UID" = "52B07ADE-E9AB-4C1C-810C-E494260254B4"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Guardbox]
"UninstallString" = "C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\Uninstaller.exe"

[HKLM\SOFTWARE\Guardbox]
"Gid" = ""

[HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Guardbox]
"DisplayVersion" = "1.1.1.14"
"Publisher" = "Client Connect Ltd."
"DisplayIcon" = "C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardbox.ico"

[HKCU\Software\AppDataLow\Software\Guardbox]
"installerShouldRevert" = "true"

The process nsi1D46.exe:3476 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASAPI32]
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASMANCS]
"EnableFileTracing" = "0"
"FileDirectory" = "%windir%\tracing"
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 40 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASMANCS]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASAPI32]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASMANCS]
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASAPI32]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASMANCS]
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsi1D46_RASAPI32]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\,"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process nsn18D2.exe:308 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASAPI32]
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASMANCS]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASAPI32]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASMANCS]
"EnableFileTracing" = "0"
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASAPI32]
"EnableConsoleTracing" = "0"
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASMANCS]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASAPI32]
"FileDirectory" = "%windir%\tracing"
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 3F 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn18D2_RASMANCS]
"FileTracingMask" = "4294901760"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\,"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process cltmng.exe:2860 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASMANCS]
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}]
"ShowSearchSuggestions" = "1"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}]
"SuggestionsURL_JSON" = "http://suggest.seccint.com/CSuggestJson.ashx?prefix={searchTerms}"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASMANCS]
"ConsoleTracingMask" = "4294901760"

"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASAPI32]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASMANCS]
"EnableFileTracing" = "0"
"FileDirectory" = "%windir%\tracing"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes]
"DefaultScope" = "{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}"

[HKCU\Software\Microsoft\Internet Explorer\User Preferences]
"88D7D0879DAB32E14DE5B3A805A34F98AFF34F5977" = "01 00 00 00 D0 8C 9D DF 01 15 D1 11 8C 7A 00 C0"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}]
"Deleted" = "0"

[HKCU\Software\Classes\Local Settings\MuiCache\2D\52C64B7E]
"LanguageList" = "en-US, en"

[HKCU\Software\Microsoft\Internet Explorer\TabbedBrowsing]
"NewTabPageShow" = "0"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}]
"DisplayName" = "Guardbox Search"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 42 00 00 00 09 00 00 00 00 00 00 00"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes]
"ShowSearchSuggestionsInAddressGlobal" = "1"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASAPI32]
"ConsoleTracingMask" = "4294901760"
"FileDirectory" = "%windir%\tracing"

[HKCU\Software\Microsoft\Internet Explorer\Main]
"Start Page" = "http://www.trovi.com/?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=55&CUI=&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&D=IN_DA&SSPV="

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASAPI32]
"EnableFileTracing" = "0"
"MaxFileSize" = "1048576"
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmng_RASMANCS]
"MaxFileSize" = "1048576"

[HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{014DB5FA-EAFB-4592-A95B-F44D3EE87FA9}]
"URL" = "http://www.trovi.com/Results.aspx?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=58&CUI=&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&D=IN_DA&q={searchTerms}&SSPV="

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process nsy4B61.exe:1564 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASAPI32]
"EnableConsoleTracing" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASAPI32]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\SPtool.dll, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\System.dll, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4680.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp\,"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASMANCS]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASMANCS]
"EnableConsoleTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASAPI32]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASMANCS]
"MaxFileSize" = "1048576"
"FileDirectory" = "%windir%\tracing"
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 46 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASAPI32]
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsy4B61_RASMANCS]
"ConsoleTracingMask" = "4294901760"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process cltmngui.exe:2968 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASMANCS]
"EnableFileTracing" = "0"
"ConsoleTracingMask" = "4294901760"
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASAPI32]
"EnableConsoleTracing" = "0"

[HKCU\Software\Classes\Local Settings\MuiCache\2D\52C64B7E]
"LanguageList" = "en-US, en"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASAPI32]
"MaxFileSize" = "1048576"
"ConsoleTracingMask" = "4294901760"
"EnableFileTracing" = "0"
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASMANCS]
"FileDirectory" = "%windir%\tracing"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 43 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\cltmngui_RASMANCS]
"EnableConsoleTracing" = "0"
"FileTracingMask" = "4294901760"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process node.exe:3488 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKCU\Software\AppDataLow\Software\Guardbox]
"GeoURFTimeoutsLastCheckTime" = "1499503315606"
"ip2LocationLastCheckTime" = "1499503315294"
"MachineID" = "QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW"

[HKCU\Software\AppDataLow\Software\Guardbox\Settings]
"XPOrClassic" = "TRUE"

[HKCU\Software\AppDataLow\Software\Guardbox]
"keepAliveLastCheckTimeVer1.1.1.14" = "1499503315621"
"translationLastCheckTime" = "1499503315512"
"serviceMapLastCheckTime" = "1499503315060"
"settingLastCheckTime" = "1499503315590"

[HKCU\Software\AppDataLow\Software\Guardbox\Settings\CYREN]
"CacheSize" = "10000"

The process guardboxapp.exe:1676 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASAPI32]
"EnableConsoleTracing" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASMANCS]
"EnableConsoleTracing" = "0"

[HKCU\Software\Classes\Local Settings\MuiCache\2D\52C64B7E]
"LanguageList" = "en-US, en"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASAPI32]
"MaxFileSize" = "1048576"
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASMANCS]
"MaxFileSize" = "1048576"
"EnableFileTracing" = "0"

[HKCU\Software\AppDataLow\Software\Guardbox]
"LastAutoUpdateTime" = "1499503306"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASMANCS]
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASAPI32]
"ConsoleTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 47 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASAPI32]
"FileTracingMask" = "4294901760"
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\guardboxapp_RASMANCS]
"FileTracingMask" = "4294901760"

"FileDirectory" = "%windir%\tracing"

To automatically run itself each time Windows is booted, the Trojan adds the following link to its file to the system registry autorun key:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Run]
"Guardbox" = "C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardboxapp.exe"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process nsn41AE.exe:3948 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASAPI32]
"EnableFileTracing" = "0"
"FileTracingMask" = "4294901760"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASMANCS]
"FileTracingMask" = "4294901760"
"EnableFileTracing" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 44 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASAPI32]
"MaxFileSize" = "1048576"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASMANCS]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASAPI32]
"EnableConsoleTracing" = "0"
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASMANCS]
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\,"

[HKLM\SOFTWARE\Microsoft\Tracing\nsn41AE_RASMANCS]
"MaxFileSize" = "1048576"

"EnableConsoleTracing" = "0"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The process CltMngSvc.exe:2220 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 03 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASMANCS]
"FileDirectory" = "%windir%\tracing"
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"DefaultConnectionSettings" = "46 00 00 00 03 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASMANCS]
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASAPI32]
"EnableFileTracing" = "0"
"FileTracingMask" = "4294901760"

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASMANCS]
"EnableConsoleTracing" = "0"
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASAPI32]
"EnableConsoleTracing" = "0"
"ConsoleTracingMask" = "4294901760"

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\SPPDCOM]
"TS" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASMANCS]
"ConsoleTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Tracing\CltMngSvc_RASAPI32]
"MaxFileSize" = "1048576"

Proxy settings are disabled:

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following value(s) in system registry:

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"
"ProxyBypass"

[HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"AutoConfigURL"
"ProxyServer"
"ProxyOverride"

The process spsetup.exe:3828 makes changes in the system registry.
The Trojan creates and/or sets the following values in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"AutoDetect" = "1"

[HKLM\SOFTWARE\GuardboxEngine]
"Environment" = ""

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASMANCS]
"EnableConsoleTracing" = "0"
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows]
"LoadAppInit_DLLs" = "1"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"UNCAsIntranet" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASAPI32]
"FileTracingMask" = "4294901760"

[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows]
"AppInit_DLLs" = "C:\PROGRA~1\GuardboxEngine\GuardboxEngine\bin\SPVC32Loader.dll"

[HKLM\SOFTWARE\GuardboxEngine]
"InstallDir" = "C:\PROGRA~1\GuardboxEngine"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASAPI32]
"FileDirectory" = "%windir%\tracing"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASMANCS]
"FileDirectory" = "%windir%\tracing"
"EnableFileTracing" = "0"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASAPI32]
"EnableConsoleTracing" = "0"

[HKCU\Software\Classes\Local Settings\MuiCache\2D\52C64B7E]
"LanguageList" = "en-US, en"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASAPI32]
"ConsoleTracingMask" = "4294901760"
"EnableFileTracing" = "0"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings" = "46 00 00 00 3E 00 00 00 09 00 00 00 00 00 00 00"

[HKLM\System\CurrentControlSet\Control\Session Manager]
"PendingFileRenameOperations" = "\??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe, , \??\C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\,"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASAPI32]
"MaxFileSize" = "1048576"

[HKLM\SOFTWARE\Microsoft\Tracing\SpSetup_RASMANCS]
"ConsoleTracingMask" = "4294901760"
"FileTracingMask" = "4294901760"

Proxy settings are disabled:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable" = "0"

The Trojan deletes the following registry key(s):

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb]

The Trojan deletes the following value(s) in system registry:

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"ProxyBypass"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyOverride"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap]
"IntranetName"

[HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"
"AutoConfigURL"

The Trojan disables automatic startup of the application by deleting the following autorun value:

[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"SpUninstallCleanUp"

Dropped PE files

MD5 File path
9f092f656ca3a99b5dfb9829d353f28c c:\Program Files\GuardboxEngine\GuardboxEngine\bin\SPTool64.exe
91b6a59c4dad961fd8dc97314f159b9f c:\Program Files\GuardboxEngine\GuardboxEngine\bin\SPVC32.dll
9a7f4986bb9e07be54ea2b0da9b43032 c:\Program Files\GuardboxEngine\GuardboxEngine\bin\SPVC32Loader.dll
8e723a7c4daabd234e86f85130f7b34f c:\Program Files\GuardboxEngine\GuardboxEngine\bin\SPVC64.dll
a633bf531a7ae1baedaa12754bb02a26 c:\Program Files\GuardboxEngine\GuardboxEngine\bin\SPVC64Loader.dll
64be0193f3af5a219b262ac274bbe349 c:\Program Files\GuardboxEngine\GuardboxEngine\bin\cltmng.exe
76500dca9340d4c4b0b30f0dcec09aa8 c:\Program Files\GuardboxEngine\Main\bin\CltMngSvc.exe
5099094847d3eba3df31a3e8c3949ecb c:\Program Files\GuardboxEngine\Main\bin\SPTool.dll
679d87ccf97b774b73e447a6145418b8 c:\Program Files\GuardboxEngine\Main\bin\uninstall.exe
023d2fb7e29aa589a0e61f3185923f2e c:\Program Files\GuardboxEngine\UI\bin\cltmngui.exe
34e1ff1e9e36e71da2b7c90e717d68fa c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\GuardboxApp.exe
7e36ba0664dabafbc8a410f3e3cf66cd c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\Uninstaller.exe
8f8cc151059f02a8842378e5845c6fec c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\APIHandler.node
cdf7f038f0b43695c01beaa9da70b6a2 c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\GbMgr64.exe
d70849f8a65b00d45af53b8ca90a108c c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler.dll
04068707d50d73f1969f16606a511d8d c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler64.dll
21c51ab4bc4a02de264f41391e41f935 c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader.dll
0bd72975931d5fbcc467e4c841d1228c c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader64.dll
2a3fb6d57527ae5d82ef609ecc377c16 c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\asapsdk.dll
37c5c08360795b97a9acce86caba4ba0 c:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\node.exe
7851164d0a8b50e09231fb22362162ca c:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\4ZZNMJGQ\Guardbox[1].exe
7851164d0a8b50e09231fb22362162ca c:\Users\"%CurrentUserName%"\AppData\Local\Temp\GB_1331749\Guardbox.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4680.exe
a92a9205a35d5a7fd2b3cb6d2b26dea0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4B61.exe
c9437bdd909d0a040caf872d38f039c0 c:\Users\"%CurrentUserName%"\AppData\Local\Temp\spsetup.exe
9f092f656ca3a99b5dfb9829d353f28c c:\Windows\AppPatch\spbin\SPTool64.exe
91b6a59c4dad961fd8dc97314f159b9f c:\Windows\AppPatch\spbin\SPVC32.dll
9a7f4986bb9e07be54ea2b0da9b43032 c:\Windows\AppPatch\spbin\SPVC32Loader.dll
8e723a7c4daabd234e86f85130f7b34f c:\Windows\AppPatch\spbin\SPVC64.dll
a633bf531a7ae1baedaa12754bb02a26 c:\Windows\AppPatch\spbin\SPVC64Loader.dll
64be0193f3af5a219b262ac274bbe349 c:\Windows\AppPatch\spbin\cltmng.exe

HOSTS file anomalies

No changes have been detected.

Rootkit activity

No anomalies have been detected.

Propagation

VersionInfo

Company Name: Client Connect Ltd.
Product Name: Guardbox
Product Version: 1.1.1.14
Legal Copyright: (c) 2014 ClientConnect Ltd.
Legal Trademarks:
Original Filename: Guardbox
Internal Name:
File Version: 1.1.1.14
File Description: Guardbox
Comments:
Language: English (United States)

PE Sections

Name Virtual Address Virtual Size Raw Size Entropy Section MD5
.text 4096 28432 28672 4.50399 f569e353af0ed51bf4c216faa9bed4e7
.rdata 32768 10898 11264 3.04561 91eee43954e068e650f7b73a8b0e6915
.data 45056 425660 512 1.02085 db9f7acbf1c3ddfe255077b699955dfa
.ndata 471040 1888256 0 0 d41d8cd98f00b204e9800998ecf8427e
.rsrc 2359296 3668 4096 3.42007 2f4f2099e168e393a723e2143259c2c9
.reloc 2363392 3978 4096 5.51184 ab666a0b6fa8429321c28eb8cfcb8350

Dropped from:

Downloaded by:

Similar by SSDeep:

Similar by Lavasoft Polymorphic Checker:

URLs

URL IP
hxxp://Jazz-1846647836.us-east-1.elb.amazonaws.com/
hxxp://e3937.g.akamaiedge.net/spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CARRIER_ID
hxxp://e3937.g.akamaiedge.net/spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CT3331172
hxxp://sp-ip2location.ams.spccint.com/ip/?client=sp
hxxp://a1015.g1.akamai.net/UP/settings/?ctid=CT3331172&UM=&c=UA&DUM=2
hxxp://autoupdate.ams.gbccint.com/guardbox
hxxp://e6652.e8.akamaiedge.net/AutoUpdate/1.12.0.41/Guardbox.exe
hxxp://a1737.g1.akamai.net/guardbox
hxxp://ip2location.ams.gbccint.com/ip
hxxp://a1737.g1.akamai.net/GeoTimeouts
hxxp://translation.ams.gbccint.com/GuardBox/uk
hxxp://webres.1.geo.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest
hxxp://webres.2.geo.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest
hxxp://webres.3.geo.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest
hxxp://webres.4.geo.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest
hxxp://webres.5.geo.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest
hxxp://webres1.t.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest 84.39.152.33
hxxp://sp-ip2location.spccint.com/ip/?client=sp 195.78.120.183
hxxp://setting.gbccint.com/GeoTimeouts 62.140.236.168
hxxp://gb-alive-msg.gbox-data.net/ 54.225.182.66
hxxp://sp-installer.databssint.com/ 23.23.99.139
hxxp://setting.gbccint.com/guardbox 62.140.236.168
hxxp://autoupdate.gbccint.com/guardbox 195.78.120.184
hxxp://webres4.t.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest 103.5.198.219
hxxp://translation.gbccint.com/GuardBox/uk 195.78.121.52
hxxp://gb-installer.databssint.com/ 54.225.182.66
hxxp://sp-alive-msg.databssint.com/ 23.23.99.139
hxxp://sp-usage.databssint.com/ 54.225.182.66
hxxp://gbstorage.stgbssint.com/AutoUpdate/1.12.0.41/Guardbox.exe
hxxp://webres5.t.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest 103.243.111.219
hxxp://ip2location.gbccint.com/ip 195.78.121.60
hxxp://sp-settings.spccint.com/spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CT3331172
hxxp://webres2.t.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest 84.39.153.33
hxxp://servicemap.gbccint.com/guardbox 62.140.236.146
hxxp://sp-settings.spccint.com/spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CARRIER_ID
hxxp://c.api.seccint.com/UP/settings/?ctid=CT3331172&UM=&c=UA&DUM=2 62.140.236.147
hxxp://webres3.t.ctmail.com/SpamResolverNG/SpamResolverNG.dll?DoNewRequest 216.163.176.37


IDS verdicts (Suricata alerts: Emerging Threats ET ruleset)

ET POLICY User-Agent (NSIS_Inetc (Mozilla)) - Sometimes used by hostile installers
ET MALWARE SearchProtect PUA User-Agent Observed
ET POLICY PE EXE or DLL Windows file download HTTP

Traffic

POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres2.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:56 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:56 GMT..Connection:
Keep-Alive.....................................@......................
@..@...............


GET /guardbox HTTP/1.1
Host: setting.gbccint.com
Connection: keep-alive


HTTP/1.1 201 Created
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 4250
Cache-Control: max-age=3600
Date: Sat, 08 Jul 2017 08:41:55 GMT
Connection: keep-alive
{"generalConfig":{"autoUpdateUrl":"hXXp://storage.gbccint.com","downlo
adUrl":"hXXp://download.gbccint.com","Test":"123","trackingUrl":"http:
//tracking.gbccint.com/Tracking/TrackingInfo?gid=WS_GID"},"modules":{"
urlFiltering":{"id":"1","displayName":"Url Filtering","displayIcon":""
,"enable":"True","visable":"True","general":{"impressionUsagePercent":
"50"},"providersConfig":{"cyren":{"general":{"cacheInterval":"3600","c
acheSize":"10000"},"categoryMapping":{"0":{"from":"Unknown","to":"Unde
termined","depth":"5"},"1":{"from":"Advertisements & Pop-Ups","to":"Sa
fe","depth":"5"},"10":{"from":"Compromised","to":"Warning","depth":"5"
},"11":{"from":"Computers & Technology","to":"Safe","depth":"5"},"12":
{"from":"Criminal Activity","to":"Safe","depth":"5"},"13":{"from":"Dat
ing & Personals","to":"Safe","depth":"5"},"14":{"from":"Download Sites
","to":"Safe","depth":"5"},"15":{"from":"Education","to":"Safe","depth
":"5"},"16":{"from":"Entertainment","to":"Safe","depth":"5"},"17":{"fr
om":"Finance","to":"Safe","depth":"5"},"18":{"from":"Gambling","to":"S
afe","depth":"5"},"19":{"from":"Games","to":"Safe","depth":"5"},"2":{"
from":"Alcohol & Tobacco","to":"Safe","depth":"5"},"20":{"from":"Gover
nment","to":"Safe","depth":"5"},"21":{"from":"Hate & Intolerance","to"
:"Safe","depth":"5"},"22":{"from":"Health & Medicine","to":"Safe","dep
th":"5"},"23":{"from":"Illegal Drug","to":"Safe","depth":"5"},"24":{"f
rom":"Job Search","to":"Safe","depth":"5"},"26":{"from":"Streaming Med
ia & Downloads","to":"Safe","depth":"5"},"27":{"from":"News","to":

<<< skipped >>>

GET /ip HTTP/1.1
Host: ip2location.gbccint.com
Connection: keep-alive


HTTP/1.1 201 Created
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Sat, 08 Jul 2017 08:41:55 GMT
Content-Length: 180
{"location":{"city":"Kharkiv","country":"Ukraine","countryCode":"UA","
ip":"194.242.96.218","latitude":49.98081,"longitude":36.25272,"region"
:"Kharkivs'ka Oblast'"},"language":"uk"}..


POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 1086
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_completed","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"Firefox","browser_version":"49.0.1","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503303905","profile_number":"1","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "success", "reason": "0","v_env_tests":{"10_ProcessesExists":"0","10_ModuleInjected":"0","10_FakeSPServiceParent":"0","12_ProcessesExists":"0","12_StatusKeyExists":"0"},"v_env_codes":{"10":"0","12":"0"},"channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"cleanmachine","extra_info":"","seed":"17981","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:44 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST / HTTP/1.1
Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-usage.databssint.com
Content-Length: 879
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","oslocale":"en-US","install_date":"20170708","environment":"","owner_type":"CTID","action_type":"takeover","competitor":"about:blank","brand":"GB","sequence_timestamp":"1499503301300","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","owner_ID":"CT3331172","owner_userid":"","owner_version":"","browser_version":"9.0.8112.16421","browser":"InternetExplorer","asset":"homepage","result":"success","takeover_domain":"http:\/\/VVV.trovi.com\/?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=55&CUI=&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&D=IN_DA&SSPV=","Experiment":"","Variant":"","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC"}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:41 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
....



POST / HTTP/1.1

Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-usage.databssint.com
Content-Length: 872
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","oslocale":"en-US","install_date":"20170708","environment":"","owner_type":"CTID","action_type":"takeover","competitor":"","brand":"GB","sequence_timestamp":"1499503301456","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","owner_ID":"CT3331172","owner_userid":"","owner_version":"","browser_version":"9.0.8112.16421","browser":"InternetExplorer","asset":"newTab","result":"success","takeover_domain":"http:\/\/VVV.trovi.com\/?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=69&CUI=&SSPV=&Lay=1&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&D=IN_DA","Experiment":"","Variant":"","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC"}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:41 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Access-Control-Allow-Methods: GET,POST,HEAD,OPT
IONS,PUT..Access-Control-Allow-Origin: *..Date: Sat, 08 Jul 2017 08:41
:41 GMT..P3P: CP="NOI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/
1.1..Content-Length: 0..Connection: keep-alive..


GET /GeoTimeouts HTTP/1.1
Host: setting.gbccint.com
Connection: keep-alive


HTTP/1.1 201 Created
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 359
Cache-Control: max-age=3600
Date: Sat, 08 Jul 2017 08:41:55 GMT
Connection: keep-alive
{"GeoTimeouts":{"IL":"2000","US":"2000","CA":"2000","PT":"500","DE":"2
000","FR":"2000","RU":"500","ES":"500","IT":"500","NL":"5000","TR":"50
0","PL":"500","EL":"500","HU":"2000","RO":"2000","NO":"500","SV":"500"
,"FI":"500","zh-chs":"500","JA":"500","KO":"500","TH":"500","VN":"500"
,"GB":"2000","default":"2000","BR":"2000","GR":"2000","AU":"2000","BG"
:"2000"}}..


POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:55 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:55 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:55 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:56 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:56 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres5.t.ctmail.com
Content-Length: 16
Content-Type: application/x-www-form-urlencoded

...eC!..........
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 15
Date: Sat, 08 Jul 2017 08:41:58 GMT
Connection: Keep-Alive
...............HTTP/1.1 200 OK..Cache-Control: private..Content-Type: 
text/html..Content-Length: 15..Date: Sat, 08 Jul 2017 08:41:58 GMT..Co
nnection: Keep-Alive.................
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:00 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!...
.......```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:00 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:00 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:05 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!...........```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:06 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:06 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 16
Content-Type: application/x-www-form-urlencoded

...eC!....
.....
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 15
Date: Sat, 08 Jul 2017 08:42:08 GMT
Connection: Keep-Alive
...............HTTP/1.1 200 OK..Cache-Control: private..Content-Type: 
text/html..Content-Length: 15..Date: Sat, 08 Jul 2017 08:42:08 GMT..Co
nnection: Keep-Alive.................
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:11 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:11 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:11 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:16 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:16 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:16 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 16
Content-Type: application/x-www-form-urlencoded

...eC!..........
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 15
Date: Sat, 08 Jul 2017 08:42:18 GMT
Connection: Keep-Alive
...............HTTP/1.1 200 OK..Cache-Control: private..Content-Type: 
text/html..Content-Length: 15..Date: Sat, 08 Jul 2017 08:42:18 GMT..Co
nnection: Keep-Alive.................
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:21 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:21 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:21 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:26 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:26 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:42:26 GMT..Connection:
Keep-Alive.....................................@......................
@..@.............
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 16
Content-Type: application/x-www-form-urlencoded

...eC!..........
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 15
Date: Sat, 08 Jul 2017 08:42:29 GMT
Connection: Keep-Alive
...............HTTP/1.1 200 OK..Cache-Control: private..Content-Type: 
text/html..Content-Length: 15..Date: Sat, 08 Jul 2017 08:42:29 GMT..Co
nnection: Keep-Alive.................
....



POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres1.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:42:31 GMT
Connection: Keep-Alive
......................


POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres3.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:57 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:57 GMT..Connection:
Keep-Alive.....................................@......................
@..@...............


GET /UP/settings/?ctid=CT3331172&UM=&c=UA&DUM=2 HTTP/1.1
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Accept: */*
Host: c.api.seccint.com


HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 4787
Cache-Control: private, max-age=3600
Expires: Sat, 08 Jul 2017 09:41:39 GMT
Date: Sat, 08 Jul 2017 08:41:39 GMT
Connection: keep-alive
{"GeneralId":null,"Ctid":"CT3331172","ProviderId":2,"ProviderName":"Bi
ng","UserIP":"194.242.96.218","UserLanguage":"ru","ToolbarLanguage":"e
n","EntityLanguage":"en","CountryShortCode":"UA","IsUserRTL":false,"Is
ToolbarRTL":false,"IsEntityRTL":false,"ShowClientDialog":true,"HomePag
eUrl":"hXXp://VVV.trovi.com/?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID
&ISID=ISID_ID&SearchSource=55&CUI=SB_CUI&UM=8&UP=UP_ID&D=IN_DA","IsCus
tomizedHomepage":false,"HomePageButtonUrl":"hXXp://VVV.trovi.com/?gd=&
ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=ISID_ID&SearchSource=55&CUI
=SB_CUI&UM=8&UP=UP_ID&SAT=HPB&D=IN_DA","UM":"","InstallDate":null,"Sea
rchDomain":"VVV.trovi.com","ToolbarSearchBox":{"History":{"IsEnabled":
true,"Position":1,"MaxAmount":5,"Label":{"Text":"History"}},"Verticals
":[{"Name":"SearchImages","SearchUrl":"hXXp://VVV.trovi.com/?gd=&ctid=
CT3331172&octid=EB_ORIGINAL_CTID&ISID=ISID_ID&SearchSource=67&SearchTy
pe=SearchImages&CUI=SB_CUI&UM=8&UP=UP_ID&D=IN_DA&q=UCM_SEARCH_TERM","E
mptySearchUrl":"hXXp://VVV.trovi.com/?gd=&ctid=CT3331172&octid=EB_ORIG
INAL_CTID&ISID=ISID_ID&SearchSource=67&SearchType=SearchImages&CUI=SB_
CUI&UM=8&UP=UP_ID&D=IN_DA"}],"EmptySearchUrl":"hXXp://VVV.trovi.com/?g
d=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=ISID_ID&SearchSource=67&
CUI=SB_CUI&UM=8&UP=UP_ID&D=IN_DA","SearchUrl":"hXXp://VVV.trovi.com/Re
sults.aspx?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=ISID_ID&Sear
chSource=67&CUI=SB_CUI&UM=8&UP=UP_ID&D=IN_DA&q=UCM_SEARCH_TERM","Sugge
st":{"SearchResultsUrl":"hXXp://VVV.trovi.com/Results.aspx?gd=&cti

<<< skipped >>>

POST / HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */ *
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 653
Host: gb-installer.databssint.com

{"action_type":"before_autoupdate","error_code":6003,"error_description":"After URLDownloadToFile. Error ValidateDllSignature of C:\\Users\\"%CurrentUserName%"\\AppData\\Local\\Temp\\GB_1331749\\Guardbox.exe File Size: 4956680","gb_previous_version":"1.1.1.14","gb_current_version":"1.12.0.41","sp_id_installed":"NULL","gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","machine_id":"QSRI\/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_bit":"32Bit","os_edition":"Ultimate","os_name":"Windows","os_service_pack":"1","os_locale":"en-US","os_version":"6.1"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:52 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
....



POST / HTTP/1.1

Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */ *
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 478
Host: gb-installer.databssint.com

{"action_type":"GuardBoxApp_IsUp","error_code":0,"error_description":"Success","gb_version":"1.1.1.14","sp_id_installed":"NULL","gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","machine_id":"QSRI\/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_bit":"32Bit","os_edition":"Ultimate","os_name":"Windows","os_service_pack":"1","os_locale":"en-US","os_version":"6.1"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:52 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Date: Sat, 08 Jul 2017 08:41:52 GMT..P3P: CP="N
OI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/1.1..Content-Length
: 0..Connection: keep-alive..
....



POST / HTTP/1.1

Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */ *
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 470
Host: gb-installer.databssint.com

{"action_type":"run_node","error_code":0,"error_description":"Success","gb_version":"1.1.1.14","sp_id_installed":"NULL","gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","machine_id":"QSRI\/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_bit":"32Bit","os_edition":"Ultimate","os_name":"Windows","os_service_pack":"1","os_locale":"en-US","os_version":"6.1"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:53 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Date: Sat, 08 Jul 2017 08:41:53 GMT..P3P: CP="N
OI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/1.1..Content-Length
: 0..Connection: keep-alive..


POST / HTTP/1.1
Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-alive-msg.databssint.com
Content-Length: 442
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","install_date":"20170708","environment":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","Experiment":"","Variant":"","action_type":"alive","type":"","brand":"GB","carrier_ID":"CT3331172","driver_enabled":"false","browser":"Firefox","browser_version":"49.0.1"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:38 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Date: Sat, 08 Jul 2017 08:41:38 GMT..P3P: CP="N
OI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/1.1..Content-Length
: 0..Connection: keep-alive..


POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres5.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:58 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:58 GMT..Connection:
Keep-Alive.....................................@......................
@..@...............


GET /GuardBox/uk HTTP/1.1
Host: translation.gbccint.com
Connection: keep-alive


HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Sat, 08 Jul 2017 08:41:55 GMT
Content-Length: 4144
{"lastUpdateTime":"03/29/2017 11:26:01","locale":"uk","direction":"ltr
","protocolVersion":"2.0.0","numberOfKeys":60,"isValid":true,"translat
edKeys":{"DLG_ACTION_CANCEL":"Cancel","DLG_ACTION_NO":"No","DLG_ACTION
_OK":"OK","DLG_ACTION_REVERT_INFO":"To revert your homepage and search
settings, you may need to remove the Guardbox extension. <a id='ac
tion-learn-more'>Learn how.</a>","DLG_ACTION_REVERT_SEARCH_SE
TTINGS":"Revert to my original search settings","DLG_ACTION_YES":"Yes"
,"DLG_COMMON_TITLE":"GUARDBOX - Online. On Guard.","DLG_COPYRIGHT":"&c
opy; 2014 Client Connect. All rights reserved.","DLG_DISABLED":"Disabl
ed","DLG_ENABLED":"Enabled","DLG_HELP":"Help","DLG_LEARN_MORE":"Learn
more »","DLG_MENU_DISABLE_BROWSER_SENSOR":"Disable Browser Senso
r","DLG_OPTIONS":"Options...","DLG_OPTIONS_ABOUT_CONTENT_TEXT":"Visit
<a id=\"action-home\">guardbox.net</a> for more informatio
n and support.","DLG_OPTIONS_ABOUT_CONTENT_VERSION":"Version","DLG_OPT
IONS_ABOUT_TAB_TITLE":"About","DLG_OPTIONS_BROWSER_SENSOR_CONTENT_DISA
BLED_WARNING_TEXT":"<span class=\"text-color-warn\">WARNING!<
/span> - You are exposed to online threats. Enable Browser Sensor f
or safe browsing.","DLG_OPTIONS_BROWSER_SENSOR_TAB_SUBTITLE":"Learn ab
out site safety as you browse.","DLG_OPTIONS_BROWSER_SENSOR_TAB_TITLE"
:"Browser Sensor","DLG_OPTIONS_SPO_CONTENT_BRAND":"Guardbox recommende
d","DLG_OPTIONS_SPO_CONTENT_BROWSER_DEFAULT":"Browser Default","DLG_OP
TIONS_SPO_CONTENT_TAB_DEFAULT_SEARCH":"Default Search","DLG_OPTION

<<< skipped >>>

POST / HTTP/1.1
Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-usage.databssint.com
Content-Length: 441
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","oslocale":"en-US","install_date":"20170708","environment":"","action_type":"spm_post_install","brand":"GB","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","owner_ID":"CT3331172","carrier_UM":"8"}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:40 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
....



POST / HTTP/1.1

Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-usage.databssint.com
Content-Length: 975
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","oslocale":"en-US","install_date":"20170708","environment":"","owner_type":"CTID","action_type":"takeover","competitor":"http:\/\/VVV.bing.com\/search?q={searchTerms}&src=IE-SearchBox&FORM=IE8SRC","brand":"GB","sequence_timestamp":"1499503301456","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","owner_ID":"CT3331172","owner_userid":"","owner_version":"","browser_version":"9.0.8112.16421","browser":"InternetExplorer","asset":"defaultSearch","result":"success","takeover_domain":"http:\/\/VVV.trovi.com\/Results.aspx?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=58&CUI=&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&D=IN_DA&q={searchTerms}&SSPV=","Experiment":"","Variant":"","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC"}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:42 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
....



POST / HTTP/1.1

Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-usage.databssint.com
Content-Length: 909
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","oslocale":"en-US","install_date":"20170708","environment":"","owner_type":"CTID","action_type":"takeover","competitor":"","brand":"GB","sequence_timestamp":"1499503301456","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","owner_ID":"CT3331172","owner_userid":"","owner_version":"","browser_version":"9.0.8112.16421","browser":"InternetExplorer","asset":"errorPage","result":"success","takeover_domain":"http:\/\/VVV.trovi.com\/corse\/?gd=&ctid=CT3331172&octid=EB_ORIGINAL_CTID&ISID=93830505-E92D-4060-B978-E49A9BFE56BC&SearchSource=70&CUI=&SSPV=&Lay=LAY_ID&UM=8&UP=SPCC5CBB48-B6AA-4766-84B5-49497200A135&fq=FQ_TERM&SAT=SAT_ID&D=IN_DA","Experiment":"","Variant":"","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC"}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:42 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Access-Control-Allow-Methods: GET,POST,HEAD,OPT
IONS,PUT..Access-Control-Allow-Origin: *..Date: Sat, 08 Jul 2017 08:41
:42 GMT..P3P: CP="NOI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/
1.1..Content-Length: 0..Connection: keep-alive..


GET /spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CARRIER_ID HTTP/1.1
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-settings.spccint.com
Connection: Keep-Alive
Cache-Control: no-cache


HTTP/1.1 200 OK
Content-Type: application/json; charset=text/plain
Last-Modified: Sat, 08 Jul 2017 08:41:30 GMT
ETag: "a473677263158e1ce7a5817a1b410278"
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 891
Cache-Control: private, max-age=900
Expires: Sat, 08 Jul 2017 08:56:30 GMT
Date: Sat, 08 Jul 2017 08:41:30 GMT
Connection: keep-alive
{"InstallerSettings":{"CHExtension_Id":null,"CHExtension_LandingPage":
null,"CHExtension_Name":null,"DEFAULT_CMD":"-carrier_type=CTID -carrie
r_id=CT3331172 -Platform=all -startpage=true -defaultsearch=true -inst
all_time_revert=true","DUM":"2","InstallSPPDriver":null,"IsAUAllowedno
TB":"true","LOST_USERS":"false","ObeyGoogleGuildlinesProviders":null,"
PING":"false","ProtectionEnabled":null,"SERVICE_LOST_USERS":null,"SERV
ICE_NAMES":"[\"Cltmngsvc\",\"NSCltmngsvc\"]","TbExternalAssetsEnable":
"true","UNINSTALL_PING":null},"AbTestSettings":{"Experiment":"","Varia
nt":"","TestParameter":""},"CarrierSettings":{"CHExtensionMode":"false
","RBuilder":"false","v_env":"true","v_env_10":"true","v_env_12":"fals
e"},"signature":"kkBmG0VH4k7FhR27B1yNhA/7bBd6ar/7kAsgQG2oyxLUeJlVNUH/I
FSoY1TrNha5PLghSOrAm1OLXGk8Oc9uoQpOcI4lxlDTrMeShrLueDYvUDIIFJS74h1C/fA
gHtm82HWBpDasYysJrcvEy6Swf tmOXF9gdOhAipdv/IwDQg="}HTTP/1.1 200 OK..Co
ntent-Type: application/json; charset=text/plain..Last-Modified: Sat,
08 Jul 2017 08:41:30 GMT..ETag: "a473677263158e1ce7a5817a1b410278"..Se
rver: Microsoft-IIS/7.5..X-AspNet-Version: 4.0.30319..X-Powered-By: AS
P.NET..P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NA
V INT"..Content-Length: 891..Cache-Control: private, max-age=900..Expi
res: Sat, 08 Jul 2017 08:56:30 GMT..Date: Sat, 08 Jul 2017 08:41:30 GM
T..Connection: keep-alive..{"InstallerSettings":{"CHExtension_Id":null
,"CHExtension_LandingPage":null,"CHExtension_Name":null,"DEFAULT_CMD":
"-carrier_type=CTID -carrier_id=CT3331172 -Platform=all -startpage

<<< skipped >>>

GET /spinstallersettings/2.17.26.43/test/ABTEST_SETTINGS_ID/carrierId/CT3331172 HTTP/1.1

User-Agent: NSIS_Inetc (Mozilla)
Host: sp-settings.spccint.com
Connection: Keep-Alive
Cache-Control: no-cache


HTTP/1.1 200 OK
Content-Type: application/json; charset=text/plain
Last-Modified: Sat, 08 Jul 2017 08:41:30 GMT
ETag: "a473677263158e1ce7a5817a1b410278"
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 891
Cache-Control: private, max-age=900
Expires: Sat, 08 Jul 2017 08:56:30 GMT
Date: Sat, 08 Jul 2017 08:41:30 GMT
Connection: keep-alive
{"InstallerSettings":{"CHExtension_Id":null,"CHExtension_LandingPage":
null,"CHExtension_Name":null,"DEFAULT_CMD":"-carrier_type=CTID -carrie
r_id=CT3331172 -Platform=all -startpage=true -defaultsearch=true -inst
all_time_revert=true","DUM":"2","InstallSPPDriver":null,"IsAUAllowedno
TB":"true","LOST_USERS":"false","ObeyGoogleGuildlinesProviders":null,"
PING":"false","ProtectionEnabled":null,"SERVICE_LOST_USERS":null,"SERV
ICE_NAMES":"[\"Cltmngsvc\",\"NSCltmngsvc\"]","TbExternalAssetsEnable":
"true","UNINSTALL_PING":null},"AbTestSettings":{"Experiment":"","Varia
nt":"","TestParameter":""},"CarrierSettings":{"CHExtensionMode":"false
","RBuilder":"false","v_env":"true","v_env_10":"true","v_env_12":"fals
e"},"signature":"kkBmG0VH4k7FhR27B1yNhA/7bBd6ar/7kAsgQG2oyxLUeJlVNUH/I
FSoY1TrNha5PLghSOrAm1OLXGk8Oc9uoQpOcI4lxlDTrMeShrLueDYvUDIIFJS74h1C/fA
gHtm82HWBpDasYysJrcvEy6Swf tmOXF9gdOhAipdv/IwDQg="}HTTP/1.1 200 OK..Co
ntent-Type: application/json; charset=text/plain..Last-Modified: Sat,
08 Jul 2017 08:41:30 GMT..ETag: "a473677263158e1ce7a5817a1b410278"..Se
rver: Microsoft-IIS/7.5..X-AspNet-Version: 4.0.30319..X-Powered-By: AS
P.NET..P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NA
V INT"..Content-Length: 891..Cache-Control: private, max-age=900..Expi
res: Sat, 08 Jul 2017 08:56:30 GMT..Date: Sat, 08 Jul 2017 08:41:30 GM
T..Connection: keep-alive..{"InstallerSettings":{"CHExtension_Id":null
,"CHExtension_LandingPage":null,"CHExtension_Name":null,"DEFAULT_CMD":
"-carrier_type=CTID -carrier_id=CT3331172 -Platform=all -startpage

<<< skipped >>>

POST /SpamResolverNG/SpamResolverNG.dll?DoNewRequest HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Win32; Commtouch Http Client (curl))
Accept: */*
Host: webres4.t.ctmail.com
Content-Length: 240
Content-Type: application/x-www-form-urlencoded

...eC!............```b.hf`fd`pf.`l`.b.t...........zp\``\``lft............z.......Z...fdt..............z.............z......J.\.\......\...v..........z```b.hf`fd`pf.`l`.b.v.....................z`v.....................zb````..brd\blp\bb\bfd..
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Content-Length: 75
Date: Sat, 08 Jul 2017 08:41:57 GMT
Connection: Keep-Alive
...................................@......................@..@........
.....HTTP/1.1 200 OK..Cache-Control: private..Content-Type: text/html.
.Content-Length: 75..Date: Sat, 08 Jul 2017 08:41:57 GMT..Connection:
Keep-Alive.....................................@......................
@..@...............


POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 1103
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_completed","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"InternetExplorer","browser_version":"9.0.8112.16421","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503302657","profile_number":"1","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "success", "reason": "0","v_env_tests":{"10_ProcessesExists":"0","10_ModuleInjected":"0","10_FakeSPServiceParent":"0","12_ProcessesExists":"0","12_StatusKeyExists":"0"},"v_env_codes":{"10":"0","12":"0"},"channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"cleanmachine","extra_info":"","seed":"17981","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:43 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST / HTTP/1.1
Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-alive-msg.databssint.com
Content-Length: 459
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","install_date":"20170708","environment":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","Experiment":"","Variant":"","action_type":"alive","type":"","brand":"GB","carrier_ID":"CT3331172","driver_enabled":"false","browser":"InternetExplorer","browser_version":"9.0.8112.16421"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:38 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
....



POST / HTTP/1.1

Content-Type: application/json
Accept: */*
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Host: sp-alive-msg.databssint.com
Content-Length: 447
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Windows 7 Ultimate","OS_version":"6.1","install_date":"20170708","environment":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","Experiment":"","Variant":"","action_type":"alive","type":"","brand":"GB","carrier_ID":"CT3331172","driver_enabled":"false","browser":"Chrome","browser_version":"54.0.2840.59"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:38 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Date: Sat, 08 Jul 2017 08:41:38 GMT..P3P: CP="N
OI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/1.1..Content-Length
: 0..Connection: keep-alive..


POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 974
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_start","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"Chrome","browser_version":"54.0.2840.59","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503294498","profile_number":"","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "SP_RESULT", "reason": "SP_FAIL_REASON","v_env_tests":"V_ENV_TESTS_ALIAS","v_env_codes":"V_ENV_CODES_ALIAS","channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"","extra_info":"","seed":"","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:35 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST /guardbox HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 71
Host: autoupdate.gbccint.com

gb_gid=&gb_uid=52B07ADE-E9AB-4C1C-810C-E494260254B4&gb_version=1.1.1.14
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Sat, 08 Jul 2017 08:41:46 GMT
Content-Length: 96
{"version":"1.12.0.41","url":"hXXp://gbstorage.stgbssint.com/AutoUpdat
e/1.12.0.41/Guardbox.exe"}HTTP/1.1 200 OK..Cache-Control: no-cache..Pr
agma: no-cache..Content-Type: application/json; charset=utf-8..Expires
: -1..Server: Microsoft-IIS/8.5..X-AspNet-Version: 4.0.30319..X-Powere
d-By: ASP.NET..P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UN
I COM NAV INT"..Date: Sat, 08 Jul 2017 08:41:46 GMT..Content-Length: 9
6..{"version":"1.12.0.41","url":"hXXp://gbstorage.stgbssint.com/AutoUp
date/1.12.0.41/Guardbox.exe"}..


POST / HTTP/1.1
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */ *
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 760
Host: gb-installer.databssint.com

{"action_type":"install_start","install_type":"new_install","download_duration":"","gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","gb_version":"1.1.1.14","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","variant":"","experiment":"","cmd":"","tracking_channel":"","sp_id_installed":"null","sp_version":"0","machine_id":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_version":"6.1","os_name":"Windows","os_bit":"32Bit","os_locale":"en-US","os_extended":"6.1.0x100.1","os_service_pack":"1","os_edition":"Ultimate"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:27 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Date: Sat, 08 Jul 2017 08:41:27 GMT..P3P: CP="N
OI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/1.1..Content-Length
: 0..Connection: keep-alive..
....



POST / HTTP/1.1

Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */ *
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Content-Length: 881
Host: gb-installer.databssint.com

{"action_type":"install_complete","install_duration":"18","download_duration":"","gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","gb_version":"1.1.1.14","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","variant":"","experiment":"","cmd":"","tracking_channel":"","sp_id_installed":"null","sp_version":"2.17.26.43","install_type":"new_install","sp_error_code":"0","error_code":"0","all_errors":[],"machine_id":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_version":"6.1","os_name":"Windows","os_bit":"32Bit","os_locale":"en-US","os_extended":"6.1.0x100.1","os_service_pack":"1","os_edition":"Ultimate"}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:47 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


GET /ip/?client=sp HTTP/1.1
User-Agent: SearchProtect;2.17.26.43;Windows 7 Ultimate;SPCC5CBB48-B6AA-4766-84B5-49497200A135
Accept: */*
Host: sp-ip2location.spccint.com


HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 180
Content-Type: application/json; charset=text/plain
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Date: Sat, 08 Jul 2017 08:41:39 GMT
{"Location":{"City":"Kharkiv","Country":"Ukraine","CountryCode":"UA","
IP":"194.242.96.218","Latitude":49.98081,"Longitude":36.25272,"Region"
:"Kharkivs'ka Oblast'"},"Language":"uk"}HTTP/1.1 200 OK..Cache-Control
: private..Content-Length: 180..Content-Type: application/json; charse
t=text/plain..Server: Microsoft-IIS/7.5..X-AspNet-Version: 4.0.30319..
X-Powered-By: ASP.NET..P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BU
S IND UNI COM NAV INT"..Date: Sat, 08 Jul 2017 08:41:39 GMT..{"Locatio
n":{"City":"Kharkiv","Country":"Ukraine","CountryCode":"UA","IP":"194.
242.96.218","Latitude":49.98081,"Longitude":36.25272,"Region":"Kharkiv
s'ka Oblast'"},"Language":"uk"}..


GET /guardbox HTTP/1.1
Host: servicemap.gbccint.com
Connection: keep-alive


HTTP/1.1 201 Created
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 1557
Cache-Control: no-cache
Expires: Sat, 08 Jul 2017 08:41:55 GMT
Date: Sat, 08 Jul 2017 08:41:55 GMT
Connection: keep-alive
{"services":[{"name":"setting","url":"hXXp://setting.gbccint.com/guard
box","version":"1","interval":"86400"},{"name":"translation","url":"ht
tp://translation.gbccint.com/GuardBox/WS_LOCALE","version":"1","interv
al":"86400"},{"name":"keepAlive","url":"hXXp://gb-alive-msg.gbox-data.
net","version":"1","interval":"7200"},{"name":"clientLog","url":"http:
//clientLog.gbccint.com/log/putlog","version":"1","interval":"86400"},
{"name":"storage","url":"hXXp://storage.gbccint.com","version":"1","in
terval":"86400"},{"name":"GeoURFTimeouts","url":"hXXp://setting.gbccin
t.com/GeoTimeouts","version":"1","interval":"86400"},{"name":"ip2Locat
ion","url":"hXXp://ip2location.gbccint.com/ip","version":"1","interval
":"86400"},{"name":"DownloadService","url":"hXXp://download.gbccint.co
m/getMultipleDownloadUrls?ctid=EB_CARRIER&testGroupId=EB_UPPER_RANGE&v
ariantId=EB_VARIANT_ID","version":"1","interval":"86400"},{"name":"imp
ression","url":"hXXp://gb-impression.gbox-data.net","version":"1","int
erval":"86400"},{"name":"usage","url":"hXXp://gb-usage.gbox-data.net",
"version":"1","interval":"86400"},{"name":"browserAccessibility","url"
:"hXXp://gbstorage.stgbssint.com/browseraccessibility/1.0.0.1/settings
.json","version":"1","interval":"86400"},{"name":"keepAliveForIE","url
":"hXXp://ext-alive-msg.gbox-data.net","version":"1","interval":"7200"
},{"name":"searchAPI","url":"hXXp://c.api.seccint.com/UP/settings/?gd=
WS_GID&c=WS_COUNTRY","version":"1","interval":"86400"},{"name":"keepAl
iveForCH","url":"hXXp://ext-alive-msg.gbox-data.net","version":"1"

<<< skipped >>>

POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 987
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_start","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"InternetExplorer","browser_version":"9.0.8112.16421","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503292236","profile_number":"1","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "SP_RESULT", "reason": "SP_FAIL_REASON","v_env_tests":"V_ENV_TESTS_ALIAS","v_env_codes":"V_ENV_CODES_ALIAS","channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"","extra_info":"","seed":"","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:32 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST / HTTP/1.1
Host: gb-alive-msg.gbox-data.net
Connection: keep-alive
Transfer-Encoding: chunked

1ca
{"gb_gid":"","gb_uid":"52B07ADE-E9AB-4C1C-810C-E494260254B4","installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC","gb_version":"1.1.1.14","machine_id":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","os_version":"6.1","os_name":"Windows","os_bit":"32Bit","os_locale":"en-US","os_extended":"6.1.0x100.1","os_service_pack":"1","os_edition":"Ultimate","variant":"","experiment":"","action_type":"keep_alive"}
0


HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:55 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 1090
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_completed","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"Chrome","browser_version":"54.0.2840.59","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503305138","profile_number":"","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "success", "reason": "0","v_env_tests":{"10_ProcessesExists":"0","10_ModuleInjected":"0","10_FakeSPServiceParent":"0","12_ProcessesExists":"0","12_StatusKeyExists":"0"},"v_env_codes":{"10":"0","12":"0"},"channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"cleanmachine","extra_info":"","seed":"17981","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:46 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


POST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: NSIS_Inetc (Mozilla)
Host: sp-installer.databssint.com
Content-Length: 970
Connection: Keep-Alive
Cache-Control: no-cache

{"event_type":"install_start","SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","SP_version":"2.17.26.43","OS_name":"Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601) 32-bit","OS_version":"6.1","browser":"Firefox","browser_version":"49.0.1","carrier_type":"CTID","carrier_ID":"CT3331172","carrier_version":"","carrier_userid":"","carrier_UM":"","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7+XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","hp_takeover":"true","other_takeover":"true","environment":"","sequence_timestamp":"1499503293360","profile_number":"1","user_number":"1", "installation_session_id":"93830505-E92D-4060-B978-E49A9BFE56BC", "download_length": -1, "install_type": "install", "result": "SP_RESULT", "reason": "SP_FAIL_REASON","v_env_tests":"V_ENV_TESTS_ALIAS","v_env_codes":"V_ENV_CODES_ALIAS","channel_id": "", "brand": "GB" , "previous_brand":"", "brand_install_type":"","extra_info":"","seed":"","Experiment":"","Variant":""}
HTTP/1.1 202 Accepted
Date: Sat, 08 Jul 2017 08:41:34 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive


GET /AutoUpdate/1.12.0.41/Guardbox.exe HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0E; .NET4.0C)
Host: gbstorage.stgbssint.com
Connection: Keep-Alive


HTTP/1.1 200 OK
Content-Type: application/octet-stream
Last-Modified: Mon, 27 Jul 2015 12:26:10 GMT
Accept-Ranges: bytes
ETag: "a2227d6b67c8d01:0"
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
P3P: CP="IDC DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
Content-Length: 4956680
Date: Sat, 08 Jul 2017 08:41:47 GMT
Connection: keep-alive
MZ......................@.............................................
..!..L.!This program cannot be run in DOS mode....$.......A{.k...8...8
...8.b<8...8.b,8...8...8...8...8...8..%8...8.."8...8Rich...8.......
.PE..L...]|.N.................p.......B...9............@..............
............`........K...@.................................d........@.
.............8.K......................................................
........................................text....o.......p.............
..... ..`.rdata...*.......,...t..............@..@.data....~...........
...............@....ndata.......0...........................rsrc......
..@......................@..@.reloc.......P......................@..B.
......................................................................
......................................................................
......................................................................
......................................................................
...............................................U....\.}..t .}.F.E.u..H
.....-G..H.P.u..u..u.....@..K...SV.5.-G.W.E.P.u.....@..e...E..E.P.u...
..@..}..e....D.@........FR..VV..U... M..........M........E...FQ.....NU
..M.......M...VT..U........FP..E...............E.P.M...H.@..E..P.E..E.
P.u.....@..u....E..9}...n....~X.te.v4..L.@..E...tU.}.j.W.E......E.....
..P.@..vXW..T.@..u..5X.@.W..h ....E..E.Pj.h..F.W....@..u.W...u....E.P.
u.....@._^3.[.....L$...-G...i. @...T.....tUVW.q.3.;5.-G.sD..i. @...D..
S.....t.G.....t...O..t .....u...3....3...F. @..;5.-G.r.[_^...U..QQ

<<< skipped >>>

POST / HTTP/1.1
Content-Type: application/json
Accept: */*
Host: sp-usage.databssint.com
Content-Length: 419
Connection: Keep-Alive
Cache-Control: no-cache

{"SP_ID":"SPCC5CBB48-B6AA-4766-84B5-49497200A135","Experiment":"","Variant":"","oslocale":"en-US","environment":"","OS_version":"6.1","OS_name":"Windows 7 Ultimate","machine_ID":"QSRI/I1ZZE62WXJITXS9DKLRYOL7 XKJZ8CTXIBS6J8ELTBJAAIRC2JCGRLBYZANODNVWCOTPF2LBDAYRZLPYW","sequence_timestamp":"1499503296667","SP_version":"2.17.26.43","brand":"GB","action_type":"driver_first_enabled","result":"success","failure_reason":""}
HTTP/1.1 202 Accepted
Access-Control-Allow-Methods: GET,POST,HEAD,OPTIONS,PUT
Access-Control-Allow-Origin: *
Date: Sat, 08 Jul 2017 08:41:39 GMT
P3P: CP="NOI ADM DEV COM NAV OUR STP"
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: keep-alive
HTTP/1.1 202 Accepted..Access-Control-Allow-Methods: GET,POST,HEAD,OPT
IONS,PUT..Access-Control-Allow-Origin: *..Date: Sat, 08 Jul 2017 08:41
:39 GMT..P3P: CP="NOI ADM DEV COM NAV OUR STP"..Server: Apache-Coyote/
1.1..Content-Length: 0..Connection: keep-alive..


The Trojan connects to the servers at the folowing location(s):

guardboxapp.exe_1676:

.text
`.rdata
@.data
.rsrc
@.reloc
t.JuG
j.Yf;
_tcPVj@
.PjRW
function not supported
operation canceled
address_family_not_supported
operation_in_progress
operation_not_supported
protocol_not_supported
operation_would_block
address family not supported
broken pipe
inappropriate io control operation
not supported
operation in progress
operation not permitted
operation not supported
operation would block
protocol not supported
operator
GetProcessWindowStation
CMainFlow::SetRunOnWindowsStartup
node.exe process id =
node.exe window was found:
D:\Builds\93\WiseShield\Guardbox_1.1.1\Sources\GuardBox\1.1.1\Application\GuardBox\Release\GuardboxApp.pdb
CryptMsgClose
CertGetNameStringW
CertFreeCertificateContext
CertFindCertificateInStore
CertCloseStore
CryptMsgGetParam
URLDownloadToFileW
VERSION.dll
CRYPT32.dll
urlmon.dll
GetProcessHeap
KERNEL32.dll
USER32.dll
RegCreateKeyExW
RegOpenKeyExW
RegCloseKey
ADVAPI32.dll
ShellExecuteExW
SHELL32.dll
ole32.dll
OLEAUT32.dll
SHLWAPI.dll
GetCPInfo
zcÁ
.?AVCWinHttpRequest@@
.?AUIWinHttpRequestEvents@@
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardboxapp.exe
*<9<9<9<<9/,
1<95.,,,,>
><><====
<><>====
<<>====2
<><====%
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
4M4Z4d4j4u4
> >%>*>3>
9-9W9n9}9
4D4C4R4a4p4
7t7C7R7a7p7
0 0$0004080
; ;(;0;8;@;
< <$<,<@<`<|<
kernel32.dll
mscoree.dll
- floating point support not loaded
- CRT not initialized
- Attempt to initialize the CRT more than once.
USER32.DLL
portuguese-brazilian
Key does not exist
Empty URL
Incorrect HTTP request type
Invalid HTTP URL
Invalid HTTP header structure
Attempt to use non exist http method
http copy error
The requested key does not exist
%s does not exist in %s
[path] or [key] is empty
ieframe.dll
SOFTWARE\Microsoft\Windows NT\CurrentVersion
Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
shell32.dll
Software\Microsoft\Windows\CurrentVersion\Run
GUARD_BOX_QUIT_EVENT_CB00DBA8-E578-44B1-B5A4-48BF71470E94
GUARDBOX_QUIT_AUTOUPDATE_REASON_CB00DBA8-E578-44B1-B5A4-48BF71470E94
GUARDBOX_QUIT_UPGRADE_REASON_CB00DBA8-E578-44B1-B5A4-48BF71470E94
node.exe App\App
x [%s]: %u
\StringFileInfo\xx\%s
Windows_Unknown
Windows2000
WindowsXP
WindowsVista
Windows7
Windows8
Windows8_1
Windows
hXXp://gb-installer.databssint.com
{"headers":[{"name":"Accept","value":"*/ *"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"}]}
\gid.json
\uid.json
hXXp://autoupdate.qagbccint.com/guardbox
hXXp://autoupdate.gbccint.com/guardbox
{"headers":[{"name":"Accept","value":"*/*"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"}]}
bFoundDownloadURLAttribute =
After URLDownloadToFile. Error ValidateDllSignature of
\Guardbox.exe
IDispatch error #%d
01234567
1.1.1.14

node.exe_3488:

.text
`.rdata
@.data
.rsrc
@.reloc
t!SSh@bV
t8SSh
SSSh4
SSh\De
PSSh"
j.ShX
9Pj%X
ttNIt.It'IIt
j.Xj/f
Ht.HH
wu.Qj
6<%u(C
t.jHX
#tNHt.Huc
Visual C   CRT: Not enough memory to complete call to strerror.
GetProcessWindowStation
Broken pipe
Inappropriate I/O control operation
Operation not permitted
operator
src\fs_event_wrap.cc
FSEventWrap: Aborting due to unwrap failure at %s:%d
src\cares_wrap.cc
port
EAFNOSUPPORT
EBADMSG
EMSGSIZE
ENOEXEC
ENOMSG
EPIPE
EPROTONOSUPPORT
ESPIPE
\\?\UNC\
Unknown system errno %d
%s:%i
process.hrtime() only accepts an Array tuple.
process.dlopen takes exactly 2 arguments.
exports
%s_module
Symbol %s not found.
Module version mismatch. Expected %d, got %d.
FATAL ERROR: %s %s
FATAL ERROR: %s
Binding %s
v0.10.29
http_parser
1.9.0-DEV
1.2.3
debugPort
node.js
Debug port must be in range 1025 to 65535.
Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]
Documentation can be found at hXXp://nodejs.org/
Error: %s requires an argument
node v0.10.29
debugger listening on port %d
src\node_buffer.cc
end cannot be longer than parent.length
global.Proxy=new $Object();
var $Proxy=global.Proxy
$Proxy.create=function(a,b){
return %CreateJSProxy(a,b)
$Proxy.createFunction=function(a,b,c){
return %CreateJSFunctionProxy(
a,b,c,$Function.prototype)
var b=this.prototype
if(!(%_IsSpecObject(b)))b=$Object.prototype
var c=this.getPropertyDescriptor(b)
return c.value
if((typeof(c.get)==='undefined')){return c.get}
return %_CallFunction(a,c.get)
var d=this.getOwnPropertyDescriptor(b)
if(d.writable){
d.value=c
this.defineProperty(b,d)
if(d.set){
%_CallFunction(a,c,d.set)
d=this.getPropertyDescriptor(b)
this.defineProperty(b,{
return!!this.getPropertyDescriptor(a)
return!!this.getOwnPropertyDescriptor(a)
function DerivedKeysTrap(){
var a=this.getOwnPropertyNames()
for(var c=0,count=0;c<a.length;  c){
var e=this.getOwnPropertyDescriptor(((typeof(%IS_VAR(d))==='string')?d:NonStringToString(d)))
if(!(typeof(e)==='undefined')&&e.enumerable){
var a=this.getPropertyNames()
var e=this.getPropertyDescriptor(((typeof(%IS_VAR(d))==='string')?d:NonStringToString(d)))
if((typeof(b.enumerate)==='undefined')){
return ToStringArray(b.enumerate(),"enumerate")
var $Set=global.Set;
var $Map=global.Map;
var $WeakMap=global.WeakMap;
%SetInitialize(this);
['Set.prototype.add',this]);
return %SetAdd(this,a);
['Set.prototype.has',this]);
return %SetHas(this,a);
['Set.prototype.delete',this]);
if(%SetHas(this,a)){
%SetDelete(this,a);
['Map.prototype.get',this]);
['Map.prototype.set',this]);
['Map.prototype.has',this]);
['Map.prototype.delete',this]);
['WeakMap.prototype.get',this]);
throw %MakeTypeError('invalid_weakmap_key',[this,a]);
['WeakMap.prototype.set',this]);
['WeakMap.prototype.has',this]);
['WeakMap.prototype.delete',this]);
%CheckIsBootstrapping();
%SetCode($Set,SetConstructor);
%SetCode($Map,MapConstructor);
%SetProperty($Set.prototype,"constructor",$Set,2);
%SetProperty($Map.prototype,"constructor",$Map,2);
InstallFunctions($Set.prototype,2,$Array(
InstallFunctions($Map.prototype,2,$Array(
%SetCode($WeakMap,WeakMapConstructor);
%SetProperty($WeakMap.prototype,"constructor",$WeakMap,2);
InstallFunctions($WeakMap.prototype,2,$Array(
var $Object=global.Object;
var $Array=global.Array;
var $String=global.String;
var $Number=global.Number;
var $Function=global.Function;
var $Boolean=global.Boolean;
if((typeof(this)==='string')&&(typeof(a)==='string'))return %StringEquals(this,a);
if((typeof(a)==='string'))return %StringEquals(b,a);
return %StringEquals(this,a);
return ÞleteProperty(%ToObject(this),%ToString(a),b);
throw %MakeTypeError('invalid_in_operator_use',[this,a]);
var d=a.prototype;
function FILTER_KEY(a){
b=a.length;
b=(a==null)?0:%ToUint32(a.length);
return(b==1)?ÞfaultNumber(a):ÞfaultString(a);
if((typeof(a)==='string'))return a.length!=0;
:%StringToNumber(a);
return((a===null))?0:ToNumber(ÞfaultNumber(a));
return((a===null))?'null':%ToString(ÞfaultString(a));
var b=a.valueOf;
var d=a.toString;
var b=a.toString;
var d=a.valueOf;
%FunctionSetPrototype($Array,new $Array(0));
if(c.length>=8){
%OptimizeObjectForAddingMultipleProperties(a,c.length>>1);
for(var d=0;d<c.length;d =2){
%FunctionSetName(f,e);
%FunctionRemovePrototype(f);
%SetProperty(a,e,f,b);
%SetNativeFlag(f);
var e=(c.length>>1) (b?b.length:0);
for(var f=0;f<b.length;f  ){
%SetProperty(d,b[f],void 0,2|4);
for(var f=0;f<c.length;f =2){
%SetProperty(d,g,h,2|4|1);
%SetNativeFlag(h);
return %StringParseInt(a,b);
return %StringParseFloat(a);
throw new $EvalError('The "this" value passed to eval must ' 
var d=%CompileString(a);
%SetProperty(global,"NaN",$NaN,2|4|1);
%SetProperty(global,"Infinity",1/0,2|4|1);
%SetProperty(global,"undefined",void 0,
%SetCode($Boolean,function(a){
%FunctionSetPrototype($Boolean,new $Boolean(false));
%SetProperty($Boolean.prototype,"constructor",$Boolean,2);
$Object.prototype.constructor=$Object;
["Object.prototype.toLocaleString"]);
return this.toString();
["Object.prototype.isPrototypeOf"]);
return(typeof(c)==='undefined')?false:c.isEnumerable();
'Object.prototype.__defineGetter__: Expecting function');
d.setGet(b);
d.setEnumerable(true);
d.setConfigurable(true);
'Object.prototype.__defineSetter__: Expecting function');
d.setSet(b);
function ObjectKeys(a){
throw MakeTypeError("called_on_non_object",["Object.keys"]);
var c=CallTrap0(b,"keys",DerivedKeysTrap);
return ToStringArray(c,"keys");
return %LocalKeys(a);
return a.hasGetter()||a.hasSetter();
return a.hasValue()||a.hasWritable();
return{value:a.getValue(),
writable:a.isWritable(),
enumerable:a.isEnumerable(),
configurable:a.isConfigurable()};
return{get:a.getGet(),
set:a.getSet(),
if(a.hasValue()){
%IgnoreAttributesAndSetProperty(b,"value",a.getValue(),0);
if(a.hasWritable()){
%IgnoreAttributesAndSetProperty(b,"writable",a.isWritable(),0);
if(a.hasGetter()){
%IgnoreAttributesAndSetProperty(b,"get",a.getGet(),0);
if(a.hasSetter()){
%IgnoreAttributesAndSetProperty(b,"set",a.getSet(),0);
if(a.hasEnumerable()){
a.isEnumerable(),0);
if(a.hasConfigurable()){
a.isConfigurable(),0);
b.setEnumerable(ToBoolean(a.enumerable));
b.setConfigurable(ToBoolean(a.configurable));
b.setValue(a.value);
b.setWritable(ToBoolean(a.writable));
var c=a.get;
b.setGet(c);
var d=a.set;
b.setSet(d);
if(!b.hasValue())b.setValue(void 0);
if(!b.hasWritable())b.setWritable(false);
if(!b.hasGetter())b.setGet(void 0);
if(!b.hasSetter())b.setSet(void 0);
if(!b.hasEnumerable())b.setEnumerable(false);
if(!b.hasConfigurable())b.setConfigurable(false);
this.value_=void 0;
this.hasValue_=false;
this.writable_=false;
this.hasWritable_=false;
this.enumerable_=false;
this.hasEnumerable_=false;
this.configurable_=false;
this.hasConfigurable_=false;
this.get_=void 0;
this.hasGetter_=false;
this.set_=void 0;
this.hasSetter_=false;
this.value_=a;
this.hasValue_=true;
return this.value_;
return this.hasValue_;
this.enumerable_=a;
this.hasEnumerable_=true;
return this.enumerable_;
return this.hasEnumerable_;
this.writable_=a;
this.hasWritable_=true;
return this.writable_;
return this.hasWritable_;
this.configurable_=a;
this.hasConfigurable_=true;
return this.hasConfigurable_;
return this.configurable_;
this.get_=a;
this.hasGetter_=true;
return this.get_;
return this.hasGetter_;
this.set_=a;
this.hasSetter_=true;
return this.set_;
return this.hasSetter_;
b.setGet(a[2]);
b.setSet(a[3]);
b.setValue(a[1]);
b.setWritable(a[4]);
b.setEnumerable(a[5]);
b.setConfigurable(a[6]);
if(!f.isConfigurable()){
if(d.isConfigurable()){
ÞleteProperty(a,b,0);
(!c.hasEnumerable()||
SameValue(c.isEnumerable(),f.isEnumerable()))&&
(!c.hasConfigurable()||
SameValue(c.isConfigurable(),f.isConfigurable()))&&
(!c.hasWritable()||
SameValue(c.isWritable(),f.isWritable()))&&
(!c.hasValue()||
SameValue(c.getValue(),f.getValue()))&&
(!c.hasGetter()||
SameValue(c.getGet(),f.getGet()))&&
(!c.hasSetter()||
SameValue(c.getSet(),f.getSet()))){
if(c.isConfigurable()||
(c.hasEnumerable()&&
c.isEnumerable()!=f.isEnumerable())){
if(!f.isWritable()&&c.isWritable()){
if(!f.isWritable()&&c.hasValue()&&
!SameValue(c.getValue(),f.getValue())){
if(c.hasSetter()&&!SameValue(c.getSet(),f.getSet())){
if(c.hasGetter()&&!SameValue(c.getGet(),f.getGet())){
if(c.hasEnumerable()){
h|=c.isEnumerable()?0:2;
h|=f.isEnumerable()?0:2;
if(c.hasConfigurable()){
h|=c.isConfigurable()?0:4;
h|=f.isConfigurable()?0:4;
if(c.hasWritable()){
h|=c.isWritable()?0:1;
h|=f.isWritable()?0:1;
if(c.hasValue()){
i=c.getValue();
i=f.getValue();
ÞfineOrRedefineDataProperty(a,b,i,h);
var j=c.hasGetter()?c.getGet():null;
var k=c.hasSetter()?c.getSet():null;
ÞfineOrRedefineAccessorProperty(a,b,j,k,h);
var e=a.length;
if(!c.hasValue()){
var f=ToUint32(c.getValue());
if(f!=ToNumber(c.getValue())){
if(f!=e&&!g.isWritable()){
a.length=f;
c.value_=void 0;
c.hasValue_=false;
if((i>=e&&!g.isWritable())||
a.length=i 1;
throw MakeTypeError("called_on_non_object",["Object.getPrototypeOf"]);
["Object.getOwnPropertyDescriptor"]);
var c=ToUint32(a.length);
throw MakeTypeError("called_on_non_object",["Object.getOwnPropertyNames"]);
%GetIndexedInterceptorElementNames(a);
d=d.concat(e);
d=d.concat(%GetLocalPropertyNames(a));
d=d.concat(f);
for(var i=0;i<d.length;  i){
d.length=h;
throw MakeTypeError("called_on_non_object",["Object.defineProperty"]);
b.push(c);
throw MakeTypeError("called_on_non_object",["Object.defineProperties"]);
for(var f=0;f<d.length;f  ){
e.push(ToPropertyDescriptor(c[d[f]]));
%Fix(a);
%SetCode(a,f);
$Object.defineProperty(g,"constructor",
%FunctionSetPrototype(a,g);
a.length=0;
throw MakeTypeError("called_on_non_object",["Object.seal"]);
for(var c=0;c<b.length;c  ){
if(e.isConfigurable()){
e.setConfigurable(false);
throw MakeTypeError("called_on_non_object",["Object.freeze"]);
if(e.isWritable()||e.isConfigurable()){
if(IsDataDescriptor(e))e.setWritable(false);
throw MakeTypeError("called_on_non_object",["Object.preventExtension"]);
throw MakeTypeError("called_on_non_object",["Object.isSealed"]);
if(e.isConfigurable())return false;
throw MakeTypeError("called_on_non_object",["Object.isFrozen"]);
if(IsDataDescriptor(e)&&e.isWritable())return false;
throw MakeTypeError("called_on_non_object",["Object.isExtensible"]);
%SetCode($Object,function(a){
%SetExpectedNumberOfProperties($Object,4);
InstallFunctions($Object.prototype,2,$Array(
"keys",ObjectKeys,
throw new $TypeError('Boolean.prototype.toString is not generic');
throw new $TypeError('Boolean.prototype.valueOf is not generic');
InstallFunctions($Boolean.prototype,2,$Array(
%SetCode($Number,function(a){
%FunctionSetPrototype($Number,new $Number(0));
throw new $TypeError('Number.prototype.toString is not generic');
["Number.prototype.toLocaleString"]);
throw new $TypeError('Number.prototype.valueOf is not generic');
["Number.prototype.toFixed"]);
["Number.prototype.toExponential"]);
["Number.prototype.toPrecision"]);
%OptimizeObjectForAddingMultipleProperties($Number.prototype,8);
%SetProperty($Number.prototype,"constructor",$Number,2);
%SetProperty($Number,
%SetProperty($Number,"MIN_VALUE",5e-324,
%SetProperty($Number,"NaN",$NaN,2|4|1);
InstallFunctions($Number.prototype,2,$Array(
$Function.prototype.constructor=$Function;
throw new $TypeError('Function.prototype.toString is not generic');
var b=%FunctionGetSourceCode(a);
if(!(typeof(b)==='string')||%FunctionIsBuiltin(a)){
var c=%FunctionGetName(a);
var c=%FunctionNameShouldPrintAsAnonymous(a)
:%FunctionGetName(a);
return %Apply(c[0],c[1],c,2,c.length-2);
if(c.length===2){
var e=c.length-2;
%FunctionRemovePrototype(b);
var j=this.length;
var k=%FunctionBindArguments(b,this,
c=Join(c,b-1,',',NonStringToString);
if(c.indexOf(')')!=-1)throw MakeSyntaxError('unable_to_parse',[]);
var h=%_CallFunction(g,%CompileString(f));
%FunctionMarkNameShouldPrintAsAnonymous(h);
return %SetNewFunctionAttributes(h);
%SetCode($Function,NewFunction);
InstallFunctions($Function.prototype,2,$Array(
function GetSortedArrayKeys(a,b){
var c=b.length;
d.push(g);
d.push(f);
function SparseJoinWithSeparator(a,b,c,d){
var e=GetSortedArrayKeys(a,%GetArrayKeys(a,b));
var g=new InternalArray(e.length*2);
for(var i=0;i<e.length;i  ){
return %SparseJoinWithSeparator(g,b,d);
function SparseJoin(a,b,c){
var d=GetSortedArrayKeys(a,%GetArrayKeys(a,b));
var f=d.length;
return %StringBuilderConcat(g,h,'');
function Join(a,b,c,d){
if(c.length==0){
return SparseJoin(a,b,d);
return SparseJoinWithSeparator(a,b,d,c);
g.length=h;
var j=%_FastAsciiArrayJoin(g,'');
var j=%_FastAsciiArrayJoin(g,c);
return %StringBuilderJoin(g,b,c);
if(e)visited_arrays.length=visited_arrays.length-1;
return((a==null))?'':%ToString(ÞfaultString(a));
return %ToString(b.toLocaleString());
var g=%GetArrayKeys(a,b c);
var h=g.length;
var h=%GetArrayKeys(a,d);
var i=h.length;
b=this.join;
if(b===ArrayJoin){
return Join(this,this.length,',',ConvertToString);
b=a.join;
var b=a.length;
return Join(a,c,',',ConvertToLocaleString);
function ArrayJoin(a){
["Array.prototype.join"]);
var b=%_FastAsciiArrayJoin(this,a);
return Join(this,(this.length>>>0),a,ConvertToString);
["Array.prototype.pop"]);
var a=(this.length>>>0);
this.length=a;
["Array.prototype.push"]);
this.length=a b;
return this.length;
["Array.prototype.concat"]);
var c=GetSortedArrayKeys(a,%GetArrayKeys(a,b));
var d=c.length-1;
["Array.prototype.reverse"]);
var a=(this.length>>>0)-1;
["Array.prototype.shift"]);
this.length=0;
this.length=a-1;
["Array.prototype.unshift"]);
var b=(this.length>>>0);
this.length=b c;
["Array.prototype.slice"]);
var c=(this.length>>>0);
g.length=f-d;
["Array.prototype.splice"]);
var d=(this.length>>>0);
h.length=g;
this.length=d-g i;
["Array.prototype.sort"]);
return %SmiLexicographicCompare(b,c);
q.push([j,g[j]]);
q.sort(function(g,s){
var t=q[q.length>>1][0];
var O=%GetArrayKeys(N,L);
if(O.length>0){
if(!K.hasOwnProperty(j)&&N.hasOwnProperty(j)){
for(var j=0;j<O.length;j  ){
!K.hasOwnProperty(Q)&&N.hasOwnProperty(Q)){
var O=%GetArrayKeys(N,i);
if(N.hasOwnProperty(j)){
N.hasOwnProperty(Q)){
if(!K.hasOwnProperty(T)){
if(!K.hasOwnProperty(U)){
var L=(this.length>>>0);
["Array.prototype.filter"]);
var d=ToUint32(c.length);
if(ÞbugCallbackSupportsStepping(a)){
ÞbugPrepareStepInIfStepping(a);
["Array.prototype.forEach"]);
var d=(c.length>>>0);
["Array.prototype.some"]);
["Array.prototype.every"]);
["Array.prototype.map"]);
["Array.prototype.indexOf"]);
var h=%GetArrayKeys(this,c);
if(h.length==2&&h[0]<0){
if(h.length==0)return-1;
var k=GetSortedArrayKeys(this,h);
var l=k.length;
["Array.prototype.lastIndexOf"]);
var h=%GetArrayKeys(this,b 1);
var l=k.length-1;
["Array.prototype.reduce"]);
["Array.prototype.reduceRight"]);
%SetProperty($Array.prototype,"constructor",$Array,2);
var a=%SpecialArrayFunctions({});
if(a.hasOwnProperty(c)){
%FunctionSetLength(h,g);
InstallFunctions($Array.prototype,2,$Array(
"join",b("join",ArrayJoin),
%FinishArrayPrototypeSetup($Array.prototype);
%SetCode($String,function(a){
%FunctionSetPrototype($String,new $String());
throw new $TypeError('String.prototype.toString is not generic');
throw new $TypeError('String.prototype.valueOf is not generic');
["String.prototype.charAt"]);
["String.prototype.charCodeAt"]);
["String.prototype.concat"]);
return %StringBuilderConcat(c,a 1,"");
%FunctionSetLength(StringConcat,1);
["String.prototype.indexOf"]);
if(c>b.length)c=b.length;
return %StringIndexOf(b,a,c);
["String.prototype.lastIndexOf"]);
var d=a.length;
return %StringLastIndexOf(b,a,g);
["String.prototype.localeCompare"]);
return %StringLocaleCompare(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)),
["String.prototype.match"]);
if(!a.global)return RegExpExecNoTests(a,b,0);
%_Log('regexp','regexp-match,%0S,%1r',[b,a]);
var c=%StringMatch(b,a,lastMatchInfo);
return RegExpExecNoTests(a,b,0);
["String.prototype.replace"]);
%_Log('regexp','regexp-replace,%0r,%1S',[a,c]);
if(a.global){
return %StringReplaceRegExpWithString(c,
var g=%StringReplaceRegExpWithString(c,
if(a.length==1&&
c.length>0xFF&&
%StringIndexOf(b,'$',0)<0){
return %StringReplaceOneCharWithString(c,a,b);
var h=%StringIndexOf(c,a,0);
var i=h a.length;
return j SubString(c,i,c.length);
var g=a.length;
var h=%StringIndexOf(a,'$',0);
d =SubString(b,c[4],b.length);
h=%StringIndexOf(a,'$',j);
var g=%RegExpExecMultiple(b,
b.lastIndex=0;
i =m.length;
var n=%Apply(c,k,m,0,m.length);
var q=o.generate();
d.length=0;
var d=DoRegExpExec(b,a,0);
return h SubString(a,i,a.length);
["String.prototype.search"]);
var c=DoRegExpExec(b,((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)),0);
["String.prototype.slice"]);
var d=c.length;
["String.prototype.split"]);
if(g===0)return %StringToArray(c,b);
var h=%StringSplit(c,a,b);
%_Log('regexp','regexp-split,%0S,%1r',[a,b]);
if(DoRegExpExec(b,a,0,0)!=null){
j.push(SubString(a,g,d));
var k=DoRegExpExec(b,a,h);
j.push(%_StringCharAt(a,g));
j.push(%_SubString(a,g,i));
if(j.length===c)break;
j.push(%_StringCharAt(a,o));
j.push(%_SubString(a,o,q));
j.push(void 0);
if(j.length===c)break outer_loop;
["String.prototype.subString"]);
["String.prototype.substr"]);
d=c.length;
if(a>=c.length)return'';
a =c.length;
if(g>c.length)g=c.length;
["String.prototype.toLowerCase"]);
return %StringToLowerCase(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)));
["String.prototype.toLocaleLowerCase"]);
["String.prototype.toUpperCase"]);
return %StringToUpperCase(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)));
["String.prototype.toLocaleUpperCase"]);
["String.prototype.trim"]);
return %StringTrim(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)),true,true);
["String.prototype.trimLeft"]);
return %StringTrim(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)),true,false);
["String.prototype.trimRight"]);
return %StringTrim(((typeof(%IS_VAR(this))==='string')?this:NonStringToString(this)),false,true);
c.length=b;
return %StringFromCharCodeArray(c);
return((typeof(%IS_VAR(a))==='string')?a:NonStringToString(a)).replace(/</g,"<")
.replace(/>/g,">")
.replace(/"/g,""")
.replace(/'/g,"'");
this.elements=%_Arguments(1);
this.elements=new InternalArray();
this.special_string=a;
if(a.length>0)this.elements.push(a);
this.elements.push((a<<11)|c);
var d=this.elements;
d.push(-c);
d.push(a);
var a=this.elements;
return %StringBuilderConcat(a,a.length,this.special_string);
%SetProperty($String.prototype,"constructor",$String,2);
InstallFunctions($String.prototype,2,$Array(
65,66,67,68,69,70];
var c=a.length;
var i=a.charCodeAt(h);
var j=a.charCodeAt(h);
return %StringFromCharCodeArray(d);
var i=a.charAt(h);
var j=URIHexCharsToCharCode(a.charCodeAt(  h),a.charCodeAt(  h));
if(a.charAt(  h)!='%')throw new $URIError("URI malformed");
l[m]=URIHexCharsToCharCode(a.charCodeAt(  h),
a.charCodeAt(  h));
d[g  ]=a.charCodeAt(h-1);
d[g  ]=a.charCodeAt(h);
d[g  ]=i.charCodeAt(0);
d.length=g;
for(var b=0;b<a.length;  b){
var c=a.charCodeAt(b);
return %URIEscape(b);
return %URIUnescape(b);
%FunctionSetInstanceClassName(MathConstructor,'Math');
$Math.__proto__=$Object.prototype;
%SetProperty(global,"Math",$Math,2);
%SetProperty($Math,
2.7182818284590452354,
2.302585092994046,
0.6931471805599453,
1.4426950408889634,
0.4342944819032518,
3.1415926535897932,
0.7071067811865476,
1.4142135623730951,
for(var h=0;h<a.length;h  ){
if(i.length==2&&%_StringCharCodeAt(i,0)==0x25){
if(a!=null&&(%_IsObject(a))&&a.toString===ObjectToString){
var b=a.constructor;
var c=b.name;
d.type=b;
d.arguments=c;
%FunctionSetInstanceClassName(Script,'Script');
%SetProperty(Script.prototype,'constructor',Script,
%SetCode(Script,function(a){
throw new $Error("Not supported");
"invalid_lhs_in_postfix_op",["Invalid left-hand side expression in postfix operation"],
"invalid_lhs_in_prefix_op",["Invalid left-hand side expression in prefix operation"],
"apply_non_function",["Function.prototype.apply was called on ","%0",", which is a ","%1"," and not a function"],
"apply_wrong_args",["Function.prototype.apply: Arguments list has wrong type"],
"invalid_in_operator_use",["Cannot use 'in' operator to search for '","%0","' in ","%1"],
"invalid_weakmap_key",["Invalid value used as weak map key"],
"array_indexof_not_defined",["Array.getIndexOf: Argument undefined"],
"strict_lhs_postfix",["Postfix increment/decrement may not have eval or arguments operand in strict mode"],
"strict_lhs_prefix",["Prefix increment/decrement may not have eval or arguments operand in strict mode"],
"invalid_module_path",["Module does not export '","%0","', or export is not itself a module"],
"module_export_undefined",["Export '","%0","' is not defined in module"],
for(var d=0;d<b.length;d =2){
for(var i=0;i<h.length;i  ){
%IgnoreAttributesAndSetProperty(h,'length',h.length,
var d=c.locationFromPosition(b,true);
return d.line 1;
var d=b.locationFromPosition(c,true);
d.restrict();
return d.sourceText();
var c=this.lineCount()-1;
var d=this.line_ends;
var a=this.lineFromPosition(position);
var b=this.line_ends;
if(d>0&&%_CallFunction(this.source,d-1,StringCharAt)=='\r'){
a =this.line_offset;
if(a==this.line_offset){
g =this.column_offset;
d=a-this.line_offset;
g-=this.column_offset;
return this.locationFromPosition(h g,false);
var i=this.lineFromPosition(h);
if(i==-1||i d>=this.lineCount()){
return this.locationFromPosition(
this.line_ends[i d-1] 1 g);
var c=(typeof(a)==='undefined')?this.line_offset
var d=(typeof(b)==='undefined')?this.line_offset this.lineCount()
c-=this.line_offset;
d-=this.line_offset;
if(d>this.lineCount())d=this.lineCount();
if(c>=this.lineCount()||
var g=this.line_ends;
c this.line_offset,
d this.line_offset,
b=a-this.line_offset;
if(b<0||this.lineCount()<=b){
var c=this.line_ends;
return %_CallFunction(this.source,d,g,StringSubstring);
return this.line_ends.length;
function ScriptNameOrSourceURL(){
if(this.line_offset>0||this.column_offset>0){
return this.name;
if(this.hasCachedNameOrSourceURL){
return this.cachedNameOrSourceURL;
this.hasCachedNameOrSourceURL=true;
var a=ToString(this.source);
var b=%StringIndexOf(a,"sourceURL=",0);
this.cachedNameOrSourceURL=this.name;
/\/\/@[\040\t]sourceURL=[\040\t]*([^\s\'\"]*)[\040\t]*$/gm;
%_RegExpExec(c,a,b-4,d);
this.cachedNameOrSourceURL=
"cachedNameOrSourceURL","hasCachedNameOrSourceURL"),
"nameOrSourceURL",ScriptNameOrSourceURL
this.script=a;
this.position=b;
this.line=c;
this.column=d;
this.start=g;
this.end=h;
if(this.end-this.start>c){
var g=this.position-d;
var h=this.position c-d;
if(this.start<g&&h<this.end){
}else if(this.start<g){
this.start=this.end-c;
this.end=this.start c;
return %_CallFunction(this.script.source,
this.start,
this.end,
this.from_line=b;
this.to_line=c;
this.from_position=d;
this.to_position=g;
this.from_position,
this.to_position,
var d=b.locationFromPosition(c,false);
return c-d.start;
return new CallSite(a,b,c).toString();
ÞfineOrRedefineAccessorProperty(a,b,h,i,2);
this.receiver=a;
this.fun=b;
this.pos=c;
return this.receiver;
if(this.receiver==null){
return(%_ClassOf(this.receiver)==='global');
var a=%FunctionGetScript(this.fun);
return a&&a.compilation_type==1;
function CallSiteGetScriptNameOrSourceURL(){
return a?a.nameOrSourceURL():null;
return this.fun;
var a=this.fun.name;
a=%FunctionGetInferredName(this.fun);
var b=%FunctionGetScript(this.fun);
if(b&&b.compilation_type==1){
if(a&&this.receiver&&
(%_CallFunction(this.receiver,
ObjectLookupGetter)===this.fun||
%_CallFunction(this.receiver,
ObjectLookupSetter)===this.fun||
this.receiver[a]===this.fun)){
for(var c in this.receiver){
if(%_CallFunction(this.receiver,c,ObjectLookupGetter)===this.fun||
%_CallFunction(this.receiver,c,ObjectLookupSetter)===this.fun||
(!%_CallFunction(this.receiver,c,ObjectLookupGetter)&&
this.receiver[c]===this.fun)){
return a?a.name:null;
if(this.pos==-1){
b=a.locationFromPosition(this.pos,true);
return b?b.line 1:null;
return b?b.column 1:null;
return a?(a.type==0):false;
return this.pos;
var a=this.receiver?this.receiver.constructor:null;
return this.fun===a;
if(this.isNative()){
if(this.isEval()){
a=this.getScriptNameOrSourceURL();
b=this.getEvalOrigin();
a=this.getFileName();
var c=this.getLineNumber();
var d=this.getColumnNumber();
var h=this.getFunctionName();
var j=this.isConstructor();
var k=!(this.isToplevel()||j);
var m=this.getMethodName();
if(l&&h.indexOf(l)!=0){
if(m&&h.lastIndexOf("." m)!=
h.length-m.length-1){
"getScriptNameOrSourceURL",CallSiteGetScriptNameOrSourceURL,
var b=a.nameOrSourceURL();
if(a.eval_from_function_name){
c =a.eval_from_function_name;
var d=a.eval_from_script;
if(d.compilation_type==1){
if(d.name){
c =" (" d.name;
var g=d.locationFromPosition(
a.eval_from_script_position,true);
c =":" (g.line 1);
c =":" (g.column 1);
c.push(a.toString());
c.push("<error: " e ">");
c.push("<error>");
for(var d=0;d<b.length;d  ){
h=g.toString();
c.push(" at " h);
return c.join("\n");
for(var d=0;d<b.length;d =4){
var k=%FunctionGetPositionForOffset(i,j);
c.push(new CallSite(g,h,k));
if((%_IsFunction($Error.prepareStackTrace))){
return $Error.prepareStackTrace(a,c);
var c=a.receiver.constructor;
%_CallFunction(a.receiver,ObjectToString);
var d=c.name;
var c=$Error.stackTraceLimit;
var d=%CollectStackTrace(a,
%SetProperty(global,c,b,2);
%SetProperty(builtins,'$' c,b,2|4|1);
%FunctionSetPrototype(d,$Object.prototype);
%FunctionSetInstanceClassName(d,'Error');
%FunctionSetPrototype(b,new d());
%FunctionSetPrototype(b,new $Error());
%FunctionSetInstanceClassName(b,'Error');
%SetProperty(b.prototype,'constructor',b,2);
%SetProperty(b.prototype,"name",c,2);
%SetCode(b,function(g){
return FormatMessage(%NewMessageObject(h.type,h.arguments));
%SetNativeFlag(b);
$Error.captureStackTrace=captureStackTrace;
%SetProperty($Error.prototype,'message','',2);
function GetPropertyWithoutInvokingMonkeyGetters(a,b){
if(a===$ReferenceError.prototype)
if(a===$SyntaxError.prototype)
if(a===$TypeError.prototype)
var b=GetPropertyWithoutInvokingMonkeyGetters(a,"type");
var c=GetPropertyWithoutInvokingMonkeyGetters(a,"name");
var d=GetPropertyWithoutInvokingMonkeyGetters(a,"message");
var h=GetPropertyWithoutInvokingMonkeyGetters(a,"arguments");
visited_errors.length=visited_errors.length-1;
throw MakeTypeError("called_on_non_object",["Error.prototype.toString"]);
InstallFunctions($Error.prototype,2,['toString',ErrorToString]);
b.setTime(a);
var h=%CreateApiFunction(a);
if(b)%FunctionSetName(h,b);
h.prototype=typeof i==='undefined'?
%FunctionSetReadOnlyPrototype(h);
%SetProperty(h.prototype,"constructor",h,2);
h.prototype.__proto__=l.prototype;
var d=%DisableAccessChecks(a);
%SetProperty(a,h,k,j);
var sourceLineBeginningSkip=/^(?:\s*(?:\/\*.*?\*\/)*)*/;
Debug.DebugEvent={Break:1,
Debug.ExceptionBreak={Caught:0,
Debug.StepAction={StepOut:0,
Debug.ScriptType={Native:0,
Debug.ScriptCompilationType={Host:0,
Debug.ScriptBreakPointType={ScriptId:0,
getValue:function(){return this.value;},
this.value=!!a;
%SetDisableBreak(!this.value);
getValue:function(){return Debug.isBreakOnException();},
Debug.setBreakOnException();
Debug.clearBreakOnException();
getValue:function(){return Debug.isBreakOnUncaughtException();},
Debug.setBreakOnUncaughtException();
Debug.clearBreakOnUncaughtException();
break_points.push(c);
this.source_position_=a;
this.script_break_point_=b;
this.number_=next_break_point_number  ;
this.hit_count_=0;
this.active_=true;
this.condition_=null;
this.ignoreCount_=0;
BreakPoint.prototype.number=function(){
return this.number_;
BreakPoint.prototype.func=function(){
return this.func_;
BreakPoint.prototype.source_position=function(){
return this.source_position_;
BreakPoint.prototype.hit_count=function(){
return this.hit_count_;
BreakPoint.prototype.active=function(){
if(this.script_break_point()){
return this.script_break_point().active();
return this.active_;
BreakPoint.prototype.condition=function(){
if(this.script_break_point()&&this.script_break_point().condition()){
return this.script_break_point().condition();
return this.condition_;
BreakPoint.prototype.ignoreCount=function(){
return this.ignoreCount_;
BreakPoint.prototype.script_break_point=function(){
return this.script_break_point_;
BreakPoint.prototype.enable=function(){
BreakPoint.prototype.disable=function(){
this.active_=false;
BreakPoint.prototype.setCondition=function(a){
this.condition_=a;
BreakPoint.prototype.setIgnoreCount=function(a){
this.ignoreCount_=a;
BreakPoint.prototype.isTriggered=function(a){
if(!this.active())return false;
if(this.condition()){
var b=a.frame(0).evaluate(this.condition());
if(!(b instanceof ValueMirror)||!%ToBoolean(b.value_)){
this.hit_count_  ;
if(this.script_break_point_){
this.script_break_point_.hit_count_  ;
if(this.ignoreCount_>0){
this.ignoreCount_--;
return b.isTriggered(MakeExecutionState(a));
this.type_=type;
if(type==Debug.ScriptBreakPointType.ScriptId){
this.script_id_=script_id_or_name;
}else if(type==Debug.ScriptBreakPointType.ScriptName){
this.script_name_=script_id_or_name;
}else if(type==Debug.ScriptBreakPointType.ScriptRegExp){
this.script_regexp_object_=new RegExp(script_id_or_name);
this.line_=opt_line||0;
this.column_=opt_column;
this.groupId_=opt_groupId;
this.break_points_=[];
ScriptBreakPoint.prototype.cloneForOtherScript=function(a){
var b=new ScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
a.id,this.line_,this.column_,this.groupId_);
b.number_=next_break_point_number  ;
script_break_points.push(b);
b.hit_count_=this.hit_count_;
b.active_=this.active_;
b.condition_=this.condition_;
b.ignoreCount_=this.ignoreCount_;
ScriptBreakPoint.prototype.number=function(){
ScriptBreakPoint.prototype.groupId=function(){
return this.groupId_;
ScriptBreakPoint.prototype.type=function(){
return this.type_;
ScriptBreakPoint.prototype.script_id=function(){
return this.script_id_;
ScriptBreakPoint.prototype.script_name=function(){
return this.script_name_;
ScriptBreakPoint.prototype.script_regexp_object=function(){
return this.script_regexp_object_;
ScriptBreakPoint.prototype.line=function(){
return this.line_;
ScriptBreakPoint.prototype.column=function(){
return this.column_;
ScriptBreakPoint.prototype.actual_locations=function(){
for(var b=0;b<this.break_points_.length;b  ){
a.push(this.break_points_[b].actual_location);
ScriptBreakPoint.prototype.update_positions=function(a,b){
this.line_=a;
this.column_=b;
ScriptBreakPoint.prototype.hit_count=function(){
ScriptBreakPoint.prototype.active=function(){
ScriptBreakPoint.prototype.condition=function(){
ScriptBreakPoint.prototype.ignoreCount=function(){
ScriptBreakPoint.prototype.enable=function(){
ScriptBreakPoint.prototype.disable=function(){
ScriptBreakPoint.prototype.setCondition=function(a){
ScriptBreakPoint.prototype.setIgnoreCount=function(a){
this.break_points_[b].setIgnoreCount(a);
ScriptBreakPoint.prototype.matchesScript=function(a){
if(this.type_==Debug.ScriptBreakPointType.ScriptId){
return this.script_id_==a.id;
if(!(a.line_offset<=this.line_&&
this.line_<a.line_offset a.lineCount())){
if(this.type_==Debug.ScriptBreakPointType.ScriptName){
return this.script_name_==a.nameOrSourceURL();
}else if(this.type_==Debug.ScriptBreakPointType.ScriptRegExp){
return this.script_regexp_object_.test(a.nameOrSourceURL());
throw new Error("Unexpected breakpoint type " this.type_);
ScriptBreakPoint.prototype.set=function(a){
var b=this.column();
var c=this.line();
var d=a.sourceLine(this.line());
if(!a.sourceColumnStart_){
a.sourceColumnStart_=new Array(a.lineCount());
if((typeof(a.sourceColumnStart_[c])==='undefined')){
a.sourceColumnStart_[c]=
d.match(sourceLineBeginningSkip)[0].length;
b=a.sourceColumnStart_[c];
var g=Debug.findScriptSourcePosition(a,this.line(),b);
break_point.setIgnoreCount(this.ignoreCount());
var h=%SetScriptBreakPoint(a,g,break_point);
var i=a.locationFromPosition(h,true);
break_point.actual_location={line:i.line,
column:i.column,
script_id:a.id};
this.break_points_.push(break_point);
ScriptBreakPoint.prototype.clear=function(){
for(var b=0;b<break_points.length;b  ){
if(break_points[b].script_break_point()&&
break_points[b].script_break_point()===this){
%ClearBreakPoint(break_points[b]);
a.push(break_points[b]);
for(var b=0;b<script_break_points.length;b  ){
if((c.type()==Debug.ScriptBreakPointType.ScriptName||
c.type()==Debug.ScriptBreakPointType.ScriptRegExp)&&
c.matchesScript(a)){
c.set(a);
for(var c=0;c<script_break_points.length;c  ){
if(script_break_points[c].matchesScript(a)){
b.push(script_break_points[c]);
Debug.setListener=function(a,b){
%SetDebugEventListener(a,b);
Debug.breakExecution=function(a){
Debug.breakLocations=function(a){
Debug.findScript=function(a){
return %FunctionGetScript(a);
var b=Debug.scripts();
if(a.test(h.name)){
Debug.scriptSource=function(a){
return this.findScript(a).source;
Debug.source=function(a){
return %FunctionGetSourceCode(a);
Debug.disassemble=function(a){
return ÞbugDisassembleFunction(a);
Debug.disassembleConstructor=function(a){
return ÞbugDisassembleConstructor(a);
Debug.ExecuteInDebugContext=function(a,b){
return %ExecuteInDebugContext(a,!!b);
Debug.sourcePosition=function(a){
return %FunctionGetScriptSourcePosition(a);
Debug.findFunctionSourceLocation=function(a,b,c){
var d=%FunctionGetScript(a);
var g=%FunctionGetScriptSourcePosition(a);
return d.locationFromLine(b,c,g);
Debug.findScriptSourcePosition=function(a,b,c){
var d=a.locationFromLine(b,c);
return d?d.position:null;
Debug.findBreakPoint=function(a,b){
for(var d=0;d<break_points.length;d  ){
if(break_points[d].number()==a){
break_points.splice(d,1);
return this.findScriptBreakPoint(a,b);
Debug.findBreakPointActualLocations=function(a){
if(script_break_points[b].number()==a){
return script_break_points[b].actual_locations();
if(break_points[b].number()==a){
return[break_points[b].actual_location];
Debug.setBreakPoint=function(a,b,c,d){
if(%FunctionIsAPIFunction(a)){
this.findFunctionSourceLocation(a,b,c).position;
var h=g-this.sourcePosition(a);
var i=%FunctionGetScript(a);
if(i.type==Debug.ScriptType.Native){
if(i&&i.id){
h =%FunctionGetScriptSourcePosition(a);
var j=i.locationFromPosition(h,false);
return this.setScriptBreakPointById(i.id,
j.line,j.column,
%SetFunctionBreakPoint(a,h,k);
l =this.sourcePosition(a);
var m=i.locationFromPosition(l,true);
k.actual_location={line:m.line,
column:m.column,
script_id:i.id};
k.setCondition(d);
return k.number();
Debug.setBreakPointByScriptIdAndPosition=function(script_id,position,
break_point.setCondition(condition);
break_point.disable();
var a=this.scripts();
for(var b=0;b<a.length;b  ){
if(script_id==a[b].id){
break_point.actual_position=%SetScriptBreakPoint(a[b],position,
Debug.enableBreakPoint=function(a){
var b=this.findBreakPoint(a,false);
b.enable();
Debug.disableBreakPoint=function(a){
b.disable();
Debug.changeBreakPointCondition=function(a,b){
var c=this.findBreakPoint(a,false);
c.setCondition(b);
Debug.changeBreakPointIgnoreCount=function(a,b){
c.setIgnoreCount(b);
Debug.clearBreakPoint=function(a){
var b=this.findBreakPoint(a,true);
return %ClearBreakPoint(b);
b=this.findScriptBreakPoint(a,true);
Debug.clearAllBreakPoints=function(){
for(var a=0;a<break_points.length;a  ){
%ClearBreakPoint(break_point);
Debug.disableAllBreakPoints=function(){
Debug.disableBreakPoint(a);
%ChangeBreakOnException(Debug.ExceptionBreak.Caught,false);
%ChangeBreakOnException(Debug.ExceptionBreak.Uncaught,false);
Debug.findScriptBreakPoint=function(a,b){
for(var d=0;d<script_break_points.length;d  ){
if(script_break_points[d].number()==a){
c.clear();
script_break_points.splice(d,1);
Debug.setScriptBreakPoint=function(type,script_id_or_name,
a.number_=next_break_point_number  ;
a.setCondition(opt_condition);
script_break_points.push(a);
var b=this.scripts();
if(a.matchesScript(b[c])){
a.set(b[c]);
return a.number();
Debug.setScriptBreakPointById=function(script_id,
return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
Debug.setScriptBreakPointByName=function(script_name,
return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptName,
Debug.setScriptBreakPointByRegExp=function(script_regexp,
return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptRegExp,
Debug.enableScriptBreakPoint=function(a){
var b=this.findScriptBreakPoint(a,false);
Debug.disableScriptBreakPoint=function(a){
Debug.changeScriptBreakPointCondition=function(
var a=this.findScriptBreakPoint(break_point_number,false);
a.setCondition(condition);
Debug.changeScriptBreakPointIgnoreCount=function(
a.setIgnoreCount(ignoreCount);
Debug.scriptBreakPoints=function(){
Debug.clearStepping=function(){
%ClearStepping();
Debug.setBreakOnException=function(){
return %ChangeBreakOnException(Debug.ExceptionBreak.Caught,true);
Debug.clearBreakOnException=function(){
return %ChangeBreakOnException(Debug.ExceptionBreak.Caught,false);
Debug.isBreakOnException=function(){
return!!%IsBreakOnException(Debug.ExceptionBreak.Caught);
Debug.setBreakOnUncaughtException=function(){
return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught,true);
Debug.clearBreakOnUncaughtException=function(){
return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught,false);
Debug.isBreakOnUncaughtException=function(){
return!!%IsBreakOnException(Debug.ExceptionBreak.Uncaught);
Debug.showBreakPoints=function(a,b){
var c=b?this.scriptSource(a):this.source(a);
var d=b?this.sourcePosition(a):0;
var g=this.breakLocations(a);
g.sort(function(h,i){return h-i;});
for(var m=0;m<g.length;m  ){
j =c.slice(k,l);
l=c.length;
j =c.substring(k,l);
Debug.scripts=function(){
return ÞbugGetLoadedScripts();
Debug.debuggerFlags=function(){
Debug.MakeMirror=MakeMirror;
function MakeExecutionState(a){
return new ExecutionState(a);
function ExecutionState(a){
this.break_id=a;
this.selected_frame=0;
ExecutionState.prototype.prepareStep=function(a,b){
var c=Debug.StepAction.StepIn;
return %PrepareStep(this.break_id,c,d);
ExecutionState.prototype.evaluateGlobal=function(source,disable_break,
return MakeMirror(ÞbugEvaluateGlobal(this.break_id,source,
ExecutionState.prototype.frameCount=function(){
return %GetFrameCount(this.break_id);
ExecutionState.prototype.threadCount=function(){
return %GetThreadCount(this.break_id);
ExecutionState.prototype.frame=function(a){
if(a==null)a=this.selected_frame;
if(a<0||a>=this.frameCount()){
return new FrameMirror(this.break_id,a);
ExecutionState.prototype.setSelectedFrame=function(a){
if(b<0||b>=this.frameCount())throw new Error('Illegal frame index.');
this.selected_frame=b;
ExecutionState.prototype.selectedFrame=function(){
return this.selected_frame;
ExecutionState.prototype.debugCommandProcessor=function(a){
this.exec_state_=a;
this.break_points_hit_=b;
BreakEvent.prototype.executionState=function(){
return this.exec_state_;
BreakEvent.prototype.eventType=function(){
return Debug.DebugEvent.Break;
BreakEvent.prototype.func=function(){
return this.exec_state_.frame(0).func();
BreakEvent.prototype.sourceLine=function(){
return this.exec_state_.frame(0).sourceLine();
BreakEvent.prototype.sourceColumn=function(){
return this.exec_state_.frame(0).sourceColumn();
BreakEvent.prototype.sourceLineText=function(){
return this.exec_state_.frame(0).sourceLineText();
BreakEvent.prototype.breakPointsHit=function(){
return this.break_points_hit_;
BreakEvent.prototype.toJSONProtocol=function(){
body:{invocationText:this.exec_state_.frame(0).invocationText(),
var b=this.func().script();
a.body.sourceLine=this.sourceLine(),
a.body.sourceColumn=this.sourceColumn(),
a.body.sourceLineText=this.sourceLineText(),
a.body.script=MakeScriptObject_(b,false);
if(this.breakPointsHit()){
a.body.breakpoints=[];
for(var c=0;c<this.breakPointsHit().length;c  ){
var d=this.breakPointsHit()[c];
var g=d.script_break_point();
h=g.number();
h=d.number();
a.body.breakpoints.push(h);
return JSON.stringify(ObjectToProtocolObject_(a));
this.exception_=b;
this.uncaught_=c;
ExceptionEvent.prototype.executionState=function(){
ExceptionEvent.prototype.eventType=function(){
return Debug.DebugEvent.Exception;
ExceptionEvent.prototype.exception=function(){
return this.exception_;
ExceptionEvent.prototype.uncaught=function(){
return this.uncaught_;
ExceptionEvent.prototype.func=function(){
ExceptionEvent.prototype.sourceLine=function(){
ExceptionEvent.prototype.sourceColumn=function(){
ExceptionEvent.prototype.sourceLineText=function(){
ExceptionEvent.prototype.toJSONProtocol=function(){
a.event="exception";
a.body={uncaught:this.uncaught_,
exception:MakeMirror(this.exception_)
if(this.exec_state_.frameCount()>0){
a.body.sourceLine=this.sourceLine();
a.body.sourceColumn=this.sourceColumn();
a.body.sourceLineText=this.sourceLineText();
a.body.sourceLine=-1;
return a.toJSONProtocol();
this.script_=MakeMirror(b);
this.before_=c;
CompileEvent.prototype.executionState=function(){
CompileEvent.prototype.eventType=function(){
if(this.before_){
return Debug.DebugEvent.BeforeCompile;
return Debug.DebugEvent.AfterCompile;
CompileEvent.prototype.script=function(){
return this.script_;
CompileEvent.prototype.toJSONProtocol=function(){
a.running=true;
a.event="beforeCompile";
a.event="afterCompile";
a.body={};
a.body.script=this.script_;
this.func=a;
NewFunctionEvent.prototype.eventType=function(){
return Debug.DebugEvent.NewFunction;
NewFunctionEvent.prototype.name=function(){
return this.func.name;
NewFunctionEvent.prototype.setBreakPoint=function(a){
Debug.setBreakPoint(this.func,a||0);
this.id_=b;
ScriptCollectedEvent.prototype.id=function(){
return this.id_;
ScriptCollectedEvent.prototype.executionState=function(){
ScriptCollectedEvent.prototype.toJSONProtocol=function(){
a.event="scriptCollected";
a.body.script={id:this.id()};
var c={id:a.id(),
name:a.name(),
lineOffset:a.lineOffset(),
columnOffset:a.columnOffset(),
lineCount:a.lineCount(),
if(!(typeof(a.data())==='undefined')){
c.data=a.data();
c.source=a.source();
this.running_=b||false;
DebugCommandProcessor.prototype.processDebugRequest=function(a){
return this.processDebugJSONRequest(a);
this.seq=next_response_seq  ;
this.type='response';
this.request_seq=a.seq;
this.command=a.command;
this.type='event';
this.success=true;
this.running=undefined;
ProtocolMessage.prototype.setOption=function(a,b){
if(!this.options_){
this.options_={};
this.options_[a]=b;
ProtocolMessage.prototype.failed=function(a){
this.success=false;
this.message=a;
ProtocolMessage.prototype.toJSONProtocol=function(){
a.seq=this.seq;
if(this.request_seq){
a.request_seq=this.request_seq;
a.type=this.type;
if(this.event){
a.event=this.event;
if(this.command){
a.command=this.command;
if(this.success){
a.success=this.success;
a.success=false;
if(this.body){
var c=MakeMirrorSerializer(true,this.options_);
if(this.body instanceof Mirror){
b=c.serializeValue(this.body);
}else if(this.body instanceof Array){
for(var d=0;d<this.body.length;d  ){
if(this.body[d]instanceof Mirror){
b.push(c.serializeValue(this.body[d]));
b.push(ObjectToProtocolObject_(this.body[d],c));
b=ObjectToProtocolObject_(this.body,c);
a.body=b;
a.refs=c.serializeReferencedObjects();
if(this.message){
a.message=this.message;
a.running=this.running;
return JSON.stringify(a);
DebugCommandProcessor.prototype.createResponse=function(a){
DebugCommandProcessor.prototype.processDebugJSONRequest=function(
a=JSON.parse(json_request);
b=this.createResponse(a);
if(!a.type){
if(a.type!='request'){
throw new Error("Illegal type '" a.type "' in request");
if(!a.command){
if(a.arguments){
var c=a.arguments;
if(c.inlineRefs||c.compactFormat){
b.setOption('inlineRefs',true);
if(!(typeof(c.maxStringLength)==='undefined')){
b.setOption('maxStringLength',c.maxStringLength);
if(a.command=='continue'){
this.continueRequest_(a,b);
}else if(a.command=='break'){
this.breakRequest_(a,b);
}else if(a.command=='setbreakpoint'){
this.setBreakPointRequest_(a,b);
}else if(a.command=='changebreakpoint'){
this.changeBreakPointRequest_(a,b);
}else if(a.command=='clearbreakpoint'){
this.clearBreakPointRequest_(a,b);
}else if(a.command=='clearbreakpointgroup'){
this.clearBreakPointGroupRequest_(a,b);
}else if(a.command=='disconnect'){
this.disconnectRequest_(a,b);
}else if(a.command=='setexceptionbreak'){
this.setExceptionBreakRequest_(a,b);
}else if(a.command=='listbreakpoints'){
this.listBreakpointsRequest_(a,b);
}else if(a.command=='backtrace'){
this.backtraceRequest_(a,b);
}else if(a.command=='frame'){
this.frameRequest_(a,b);
}else if(a.command=='scopes'){
this.scopesRequest_(a,b);
}else if(a.command=='scope'){
this.scopeRequest_(a,b);
}else if(a.command=='setVariableValue'){
this.setVariableValueRequest_(a,b);
}else if(a.command=='evaluate'){
this.evaluateRequest_(a,b);
}else if(lol_is_enabled&&a.command=='getobj'){
this.getobjRequest_(a,b);
}else if(a.command=='lookup'){
this.lookupRequest_(a,b);
}else if(a.command=='references'){
this.referencesRequest_(a,b);
}else if(a.command=='source'){
this.sourceRequest_(a,b);
}else if(a.command=='scripts'){
this.scriptsRequest_(a,b);
}else if(a.command=='threads'){
this.threadsRequest_(a,b);
}else if(a.command=='suspend'){
this.suspendRequest_(a,b);
}else if(a.command=='version'){
this.versionRequest_(a,b);
}else if(a.command=='profile'){
this.profileRequest_(a,b);
}else if(a.command=='changelive'){
this.changeLiveRequest_(a,b);
}else if(a.command=='restartframe'){
this.restartFrameRequest_(a,b);
}else if(a.command=='flags'){
this.debuggerFlagsRequest_(a,b);
}else if(a.command=='v8flags'){
}else if(a.command=='gc'){
this.gcRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-capture'){
this.lolCaptureRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-delete'){
this.lolDeleteRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-diff'){
this.lolDiffRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-getid'){
this.lolGetIdRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-info'){
this.lolInfoRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-reset'){
this.lolResetRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-retainers'){
this.lolRetainersRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-path'){
this.lolPathRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-print'){
this.lolPrintRequest_(a,b);
}else if(lol_is_enabled&&a.command=='lol-stats'){
this.lolStatsRequest_(a,b);
throw new Error('Unknown command "' a.command '" in request');
b=this.createResponse();
b.success=false;
b.message=%ToString(e);
if(!(typeof(b.running)==='undefined')){
this.running_=b.running;
b.running=this.running_;
return b.toJSONProtocol();
return'{"seq":' b.seq ',' 
'"request_seq":' a.seq ',' 
DebugCommandProcessor.prototype.continueRequest_=function(a,b){
var d=Debug.StepAction.StepIn;
var g=a.arguments.stepaction;
var h=a.arguments.stepcount;
d=Debug.StepAction.StepIn;
d=Debug.StepAction.StepMin;
d=Debug.StepAction.StepNext;
d=Debug.StepAction.StepOut;
this.exec_state_.prepareStep(d,c);
b.running=true;
DebugCommandProcessor.prototype.breakRequest_=function(a,b){
DebugCommandProcessor.prototype.setBreakPointRequest_=
if(!a.arguments){
b.failed('Missing arguments');
var c=a.arguments.type;
var d=a.arguments.target;
var g=a.arguments.line;
var h=a.arguments.column;
var i=(typeof(a.arguments.enabled)==='undefined')?
true:a.arguments.enabled;
var j=a.arguments.condition;
var k=a.arguments.ignoreCount;
var l=a.arguments.groupId;
b.failed('Missing argument "type" or "target"');
b.failed('Argument "target" is not a string value');
o=this.exec_state_.evaluateGlobal(d).value();
b.failed('Error: "' %ToString(e) 
b.failed('"' d '" does not evaluate to a function');
m=Debug.setBreakPoint(o,g,h,j);
return b.failed('Object #' q '# not found');
if(!r.isFunction()){
return b.failed('Object #' q '# is not a function');
m=Debug.setBreakPoint(r.value(),
Debug.setScriptBreakPointByName(d,g,h,j,
Debug.setScriptBreakPointById(d,g,h,j,l);
Debug.setScriptBreakPointByRegExp(d,g,h,j,
b.failed('Illegal type "' c '"');
var t=Debug.findBreakPoint(m);
Debug.changeBreakPointIgnoreCount(m,k);
Debug.disableBreakPoint(m);
b.body={type:c,
if(t.type()==Debug.ScriptBreakPointType.ScriptId){
b.body.type='scriptId';
b.body.script_id=t.script_id();
}else if(t.type()==Debug.ScriptBreakPointType.ScriptName){
b.body.type='scriptName';
b.body.script_name=t.script_name();
}else if(t.type()==Debug.ScriptBreakPointType.ScriptRegExp){
b.body.type='scriptRegExp';
b.body.script_regexp=t.script_regexp_object().source;
t.type());
b.body.line=t.line();
b.body.column=t.column();
b.body.actual_locations=t.actual_locations();
b.body.type='function';
b.body.actual_locations=[t.actual_location];
DebugCommandProcessor.prototype.changeBreakPointRequest_=function(
if(!request.arguments){
response.failed('Missing arguments');
var a=%ToNumber(request.arguments.breakpoint);
var b=request.arguments.enabled;
var c=request.arguments.condition;
var d=request.arguments.ignoreCount;
response.failed('Missing argument "breakpoint"');
Debug.enableBreakPoint(a);
Debug.changeBreakPointCondition(a,c);
Debug.changeBreakPointIgnoreCount(a,d);
DebugCommandProcessor.prototype.clearBreakPointGroupRequest_=function(
var a=request.arguments.groupId;
response.failed('Missing argument "groupId"');
if(g.groupId()==a){
b.push(g.number());
g.clear();
c.push(g);
response.body={breakpoints:b};
DebugCommandProcessor.prototype.clearBreakPointRequest_=function(
Debug.clearBreakPoint(a);
response.body={breakpoint:a};
DebugCommandProcessor.prototype.listBreakpointsRequest_=function(
number:c.number(),
line:c.line(),
column:c.column(),
groupId:c.groupId(),
hit_count:c.hit_count(),
active:c.active(),
condition:c.condition(),
ignoreCount:c.ignoreCount(),
actual_locations:c.actual_locations()
if(c.type()==Debug.ScriptBreakPointType.ScriptId){
d.type='scriptId';
d.script_id=c.script_id();
}else if(c.type()==Debug.ScriptBreakPointType.ScriptName){
d.type='scriptName';
d.script_name=c.script_name();
}else if(c.type()==Debug.ScriptBreakPointType.ScriptRegExp){
d.type='scriptRegExp';
d.script_regexp=c.script_regexp_object().source;
c.type());
a.push(d);
response.body={
breakOnExceptions:Debug.isBreakOnException(),
breakOnUncaughtExceptions:Debug.isBreakOnUncaughtException()
DebugCommandProcessor.prototype.disconnectRequest_=
Debug.disableAllBreakPoints();
DebugCommandProcessor.prototype.setExceptionBreakRequest_=
b.failed('Missing argument "type"');
d=!Debug.isBreakOnException();
d=!Debug.isBreakOnUncaughtException();
if(!(typeof(a.arguments.enabled)==='undefined')){
d=a.arguments.enabled;
b.failed('Illegal value for "enabled":"' d '"');
%ChangeBreakOnException(Debug.ExceptionBreak.Caught,d);
%ChangeBreakOnException(Debug.ExceptionBreak.Uncaught,d);
b.failed('Unknown "type":"' c '"');
b.body={'type':c,'enabled':d};
DebugCommandProcessor.prototype.backtraceRequest_=function(
var a=this.exec_state_.frameCount();
if(request.arguments){
if(request.arguments.fromFrame){
b=request.arguments.fromFrame;
if(request.arguments.toFrame){
c=request.arguments.toFrame;
if(request.arguments.bottom){
return response.failed('Invalid frame number');
c=Math.min(a,c);
return response.failed(g);
h.push(this.exec_state_.frame(i));
DebugCommandProcessor.prototype.frameRequest_=function(a,b){
if(this.exec_state_.frameCount()==0){
return b.failed('No frames');
var c=a.arguments.number;
if(c<0||this.exec_state_.frameCount()<=c){
return b.failed('Invalid frame number');
this.exec_state_.setSelectedFrame(a.arguments.number);
b.body=this.exec_state_.frame();
DebugCommandProcessor.prototype.resolveFrameFromScopeDescription_=
if(a&&!(typeof(a.frameNumber)==='undefined')){
frame_index=a.frameNumber;
if(frame_index<0||this.exec_state_.frameCount()<=frame_index){
return this.exec_state_.frame(frame_index);
return this.exec_state_.frame();
DebugCommandProcessor.prototype.resolveScopeHolder_=
if(!(typeof(a.functionHandle)==='number')){
var b=LookupMirror(a.functionHandle);
if(!b.isFunction()){
var c=this.resolveFrameFromScopeDescription_(a);
DebugCommandProcessor.prototype.scopesRequest_=function(a,b){
var c=this.resolveScopeHolder_(a.arguments);
var d=c.scopeCount();
g.push(c.scope(h));
b.body={
DebugCommandProcessor.prototype.scopeRequest_=function(a,b){
if(a.arguments&&!(typeof(a.arguments.number)==='undefined')){
d=%ToNumber(a.arguments.number);
if(d<0||c.scopeCount()<=d){
return b.failed('Invalid scope number');
b.body=c.scope(d);
DebugCommandProcessor.resolveValue_=function(a){
var b=LookupMirror(a.handle);
mapping.handle "# not found");
return b.value();
if(a.type==BOOLEAN_TYPE){
return Boolean(a.stringDescription);
}else if(a.type==NUMBER_TYPE){
return Number(a.stringDescription);
}if(a.type==STRING_TYPE){
return String(a.stringDescription);
return a.value;
}else if(a.type==UNDEFINED_TYPE){
}else if(a.type==NULL_TYPE){
DebugCommandProcessor.prototype.setVariableValueRequest_=
if((typeof(a.arguments.name)==='undefined')){
b.failed('Missing variable name');
var c=a.arguments.name;
var d=a.arguments.scope;
var g=this.resolveScopeHolder_(d);
if((typeof(d.number)==='undefined')){
b.failed('Missing scope number');
var h=%ToNumber(d.number);
var i=g.scope(h);
DebugCommandProcessor.resolveValue_(a.arguments.newValue);
i.setVariableValue(c,j);
DebugCommandProcessor.prototype.evaluateRequest_=function(a,b){
return b.failed('Missing arguments');
var c=a.arguments.expression;
var d=a.arguments.frame;
var g=a.arguments.global;
var h=a.arguments.disable_break;
var i=a.arguments.additional_context;
return b.failed('Failed to convert expression argument to string');
return b.failed('Arguments "frame" and "global" are exclusive');
for(var k=0;k<i.length;k  ){
if(!(typeof(l.name)==='string')||!(typeof(l.handle)==='number')){
return b.failed("Context element #" k 
var m=LookupMirror(l.handle);
return b.failed("Context object '" l.name 
"' #" l.handle "# not found");
j[l.name]=m.value();
b.body=this.exec_state_.evaluateGlobal(
if(o<0||o>=this.exec_state_.frameCount()){
return b.failed('Invalid frame "' d '"');
b.body=this.exec_state_.frame(o).evaluate(
b.body=this.exec_state_.frame().evaluate(
DebugCommandProcessor.prototype.getobjRequest_=function(a,b){
var c=a.arguments.obj_id;
return b.failed('Argument "obj_id" missing');
b.body=MakeMirror(%GetLOLObj(c));
DebugCommandProcessor.prototype.lookupRequest_=function(a,b){
var c=a.arguments.handles;
return b.failed('Argument "handles" missing');
if(!(typeof(a.arguments.includeSource)==='undefined')){
includeSource=%ToBoolean(a.arguments.includeSource);
b.setOption('includeSource',includeSource);
for(var g=0;g<c.length;g  ){
return b.failed('Object #' h '# not found');
b.body=d;
DebugCommandProcessor.prototype.referencesRequest_=
var d=a.arguments.handle;
return b.failed('Argument "type" missing');
return b.failed('Argument "handle" missing');
return b.failed('Invalid type "' c '"');
b.body=g.referencedBy();
b.body=g.constructedBy();
return b.failed('Object #' d '# not found');
DebugCommandProcessor.prototype.sourceRequest_=function(a,b){
return b.failed('No source');
var g=this.exec_state_.frame();
c=a.arguments.fromLine;
d=a.arguments.toLine;
if(!(typeof(a.arguments.frame)==='undefined')){
var h=%ToNumber(a.arguments.frame);
if(h<0||h>=this.exec_state_.frameCount()){
return b.failed('Invalid frame "' g '"');
g=this.exec_state_.frame(h);
var i=g.func().script();
var j=i.sourceSlice(c,d);
return b.failed('Invalid line interval');
b.body={};
b.body.source=j.sourceText();
b.body.fromLine=j.from_line;
b.body.toLine=j.to_line;
b.body.fromPosition=j.from_position;
b.body.toPosition=j.to_position;
b.body.totalLines=i.lineCount();
DebugCommandProcessor.prototype.scriptsRequest_=function(a,b){
var c=ScriptTypeFlag(Debug.ScriptType.Normal);
if(!(typeof(a.arguments.types)==='undefined')){
c=%ToNumber(a.arguments.types);
return b.failed('Invalid types "' 
a.arguments.types '"');
d=%ToBoolean(a.arguments.includeSource);
b.setOption('includeSource',d);
if((%_IsArray(a.arguments.ids))){
var h=a.arguments.ids;
if(!(typeof(a.arguments.filter)==='undefined')){
var l=%ToNumber(a.arguments.filter);
j=a.arguments.filter;
var m=ÞbugGetLoadedScripts();
b.body=[];
for(var i=0;i<m.length;i  ){
if(g&&!g[m[i].id]){
if(o.id&&o.id===k){
if(o.name&&o.name.indexOf(j)>=0){
if(c&ScriptTypeFlag(m[i].type)){
b.body.push(MakeMirror(m[i]));
DebugCommandProcessor.prototype.threadsRequest_=function(a,b){
var c=this.exec_state_.threadCount();
var h=%GetThreadDetails(this.exec_state_.break_id,g);
d.push(i);
DebugCommandProcessor.prototype.suspendRequest_=function(a,b){
b.running=false;
DebugCommandProcessor.prototype.versionRequest_=function(a,b){
DebugCommandProcessor.prototype.profileRequest_=function(a,b){
if(a.arguments.command=='resume'){
}else if(a.arguments.command=='pause'){
return b.failed('Unknown command');
DebugCommandProcessor.prototype.changeLiveRequest_=function(
return response.failed('Missing arguments');
var a=request.arguments.script_id;
var b=!!request.arguments.preview_only;
var c=ÞbugGetLoadedScripts();
if(c[g].id==a){
response.failed('Script not found');
if(!(typeof(request.arguments.new_source)==='string')){
var i=request.arguments.new_source;
var j=Debug.LiveEdit.SetScriptSource(d,
response.body={change_log:h,result:j};
if(!b&&!this.running_&&j.stack_modified){
response.body.stepin_recommended=true;
DebugCommandProcessor.prototype.restartFrameRequest_=function(
var a=request.arguments.frame;
return response.failed('No frames');
if(c<0||c>=this.exec_state_.frameCount()){
return response.failed('Invalid frame "' a '"');
b=this.exec_state_.frame(c);
b=this.exec_state_.frame();
var d=Debug.LiveEdit.RestartFrame(b);
response.body={result:d};
DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(request,
var a=request.arguments.flags;
response.body={flags:[]};
var c=a[b].name;
d.setValue(a[b].value);
response.body.flags.push({name:c,value:d.getValue()});
var g=debugger_flags[c].getValue();
response.body.flags.push({name:c,value:g});
DebugCommandProcessor.prototype.v8FlagsRequest_=function(a,b){
var c=a.arguments.flags;
%SetFlags(c);
DebugCommandProcessor.prototype.gcRequest_=function(a,b){
%CollectGarbage(c);
b.body={"before":d,"after":g};
DebugCommandProcessor.prototype.lolCaptureRequest_=
b.body=ÊptureLOL();
DebugCommandProcessor.prototype.lolDeleteRequest_=
var c=a.arguments.id;
var d=ÞleteLOL(c);
b.body={id:c};
b.failed('Failed to delete: live object list ' c ' not found.');
DebugCommandProcessor.prototype.lolDiffRequest_=function(a,b){
var c=a.arguments.id1;
var d=a.arguments.id2;
var g=a.arguments.verbose;
var h=a.arguments.filter;
var i=a.arguments.start;
var j=a.arguments.count;
b.body=%DumpLOL(c,d,i,j,h);
b.body=%SummarizeLOL(c,d,h);
DebugCommandProcessor.prototype.lolGetIdRequest_=function(a,b){
var c=a.arguments.address;
b.body.id=%GetLOLObjId(c);
DebugCommandProcessor.prototype.lolInfoRequest_=function(a,b){
var c=a.arguments.start;
var d=a.arguments.count;
b.body=%InfoLOL(c,d);
DebugCommandProcessor.prototype.lolResetRequest_=function(a,b){
DebugCommandProcessor.prototype.lolRetainersRequest_=
var d=a.arguments.verbose;
var g=a.arguments.start;
var h=a.arguments.count;
var i=a.arguments.filter;
b.body=%GetLOLObjRetainers(c,Mirror.prototype,d,
DebugCommandProcessor.prototype.lolPathRequest_=function(a,b){
b.body.path=%GetLOLPath(c,d,Mirror.prototype);
DebugCommandProcessor.prototype.lolPrintRequest_=function(a,b){
b.body.dump=%PrintLOLObj(c);
DebugCommandProcessor.prototype.isRunning=function(){
return this.running_;
DebugCommandProcessor.prototype.systemBreak=function(a,b){
return %SystemBreak();
for(var d=0;d<a.length;d  ){
c.push(ValueToProtocolValue_(a[d],b));
c=b.serializeValue(a);
Debug.TestApi={
CommandProcessorResolveValue:DebugCommandProcessor.resolveValue_
if(c.value()===a){
if(c.isNumber()&&isNaN(c.value())&&
mirror_cache_[c.handle()]=c;
c.prototype=b.prototype;
a.super_=b.prototype;
a.prototype=new c();
a.prototype.constructor=a;
PropertyKind.Named=1;
PropertyKind.Indexed=2;
PropertyType.Normal=0;
PropertyType.Field=1;
PropertyType.ConstantFunction=2;
PropertyType.Callbacks=3;
PropertyType.Handler=4;
PropertyType.Interceptor=5;
PropertyType.Transition=6;
PropertyType.Nonexistent=7;
PropertyAttribute.None=0;
PropertyAttribute.ReadOnly=1;
PropertyAttribute.DontEnum=2;
PropertyAttribute.DontDelete=4;
this.type_=a;
Mirror.prototype.type=function(){
Mirror.prototype.isValue=function(){
Mirror.prototype.isUndefined=function(){
Mirror.prototype.isNull=function(){
Mirror.prototype.isBoolean=function(){
Mirror.prototype.isNumber=function(){
Mirror.prototype.isString=function(){
Mirror.prototype.isObject=function(){
Mirror.prototype.isFunction=function(){
Mirror.prototype.isUnresolvedFunction=function(){
Mirror.prototype.isArray=function(){
Mirror.prototype.isDate=function(){
Mirror.prototype.isRegExp=function(){
Mirror.prototype.isError=function(){
Mirror.prototype.isProperty=function(){
Mirror.prototype.isInternalProperty=function(){
Mirror.prototype.isFrame=function(){
Mirror.prototype.isScript=function(){
Mirror.prototype.isContext=function(){
Mirror.prototype.isScope=function(){
Mirror.prototype.allocateHandle_=function(){
this.handle_=next_handle_  ;
Mirror.prototype.allocateTransientHandle_=function(){
this.handle_=next_transient_handle_--;
Mirror.prototype.toText=function(){
return"#<" this.constructor.name ">";
this.value_=b;
this.allocateHandle_();
this.allocateTransientHandle_();
Mirror.prototype.handle=function(){
return this.handle_;
ValueMirror.prototype.isPrimitive=function(){
var a=this.type();
ValueMirror.prototype.value=function(){
UndefinedMirror.prototype.toText=function(){
NullMirror.prototype.toText=function(){
BooleanMirror.prototype.toText=function(){
return this.value_?'true':'false';
NumberMirror.prototype.toText=function(){
return %NumberToString(this.value_);
StringMirror.prototype.length=function(){
return this.value_.length;
StringMirror.prototype.getTruncatedValue=function(a){
if(a!=-1&&this.length()>a){
return this.value_.substring(0,a) 
'... (length: ' this.length() ')';
StringMirror.prototype.toText=function(){
return this.getTruncatedValue(kMaxProtocolStringLength);
ObjectMirror.prototype.className=function(){
return %_ClassOf(this.value_);
ObjectMirror.prototype.constructorFunction=function(){
return MakeMirror(ÞbugGetProperty(this.value_,'constructor'));
ObjectMirror.prototype.prototypeObject=function(){
return MakeMirror(ÞbugGetProperty(this.value_,'prototype'));
ObjectMirror.prototype.protoObject=function(){
return MakeMirror(ÞbugGetPrototype(this.value_));
ObjectMirror.prototype.hasNamedInterceptor=function(){
var a=%GetInterceptorInfo(this.value_);
ObjectMirror.prototype.hasIndexedInterceptor=function(){
ObjectMirror.prototype.propertyNames=function(a,b){
a=a||PropertyKind.Named|PropertyKind.Indexed;
if(a&PropertyKind.Named){
c=%GetLocalPropertyNames(this.value_);
g =c.length;
if(this.hasNamedInterceptor()&&(a&PropertyKind.Named)){
%GetNamedInterceptorPropertyNames(this.value_);
c=c.concat(h);
g =h.length;
if(a&PropertyKind.Indexed){
d=%GetLocalElementNames(this.value_);
g =d.length;
if(this.hasIndexedInterceptor()&&(a&PropertyKind.Indexed)){
%GetIndexedInterceptorElementNames(this.value_);
d=d.concat(i);
g =i.length;
b=Math.min(b||g,g);
for(var l=0;k<b&&l<c.length;l  ){
for(var l=0;k<b&&l<d.length;l  ){
ObjectMirror.prototype.properties=function(a,b){
var c=this.propertyNames(a,b);
var d=new Array(c.length);
d[g]=this.property(c[g]);
ObjectMirror.prototype.internalProperties=function(){
return ObjectMirror.GetInternalProperties(this.value_);
ObjectMirror.prototype.property=function(a){
var b=ÞbugGetPropertyDetails(this.value_,%ToString(a));
ObjectMirror.prototype.lookupProperty=function(a){
var b=this.properties();
if(d.propertyType()!=PropertyType.Callbacks){
if(%_ObjectEquals(d.value_,a.value_)){
ObjectMirror.prototype.referencedBy=function(a){
var b=ÞbugReferencedBy(this.value_,
Mirror.prototype,a||0);
ObjectMirror.prototype.toText=function(){
var b=this.constructorFunction();
a=this.className();
a=b.name();
ObjectMirror.GetInternalProperties=function(a){
d.push(new InternalPropertyMirror("[[TargetFunction]]",
d.push(new InternalPropertyMirror("[[BoundThis]]",c[1]));
for(var h=2;h<c.length;h  ){
g.push(c[h]);
d.push(new InternalPropertyMirror("[[BoundArgs]]",g));
this.resolved_=true;
FunctionMirror.prototype.resolved=function(){
return this.resolved_;
FunctionMirror.prototype.name=function(){
return %FunctionGetName(this.value_);
FunctionMirror.prototype.inferredName=function(){
return %FunctionGetInferredName(this.value_);
FunctionMirror.prototype.source=function(){
if(this.resolved()){
return builtins.FunctionSourceString(this.value_);
FunctionMirror.prototype.script=function(){
var a=%FunctionGetScript(this.value_);
FunctionMirror.prototype.sourcePosition_=function(){
return %FunctionGetScriptSourcePosition(this.value_);
FunctionMirror.prototype.sourceLocation=function(){
if(this.resolved()&&this.script()){
return this.script().locationFromPosition(this.sourcePosition_(),
FunctionMirror.prototype.constructedBy=function(a){
var b=ÞbugConstructedBy(this.value_,a||0);
FunctionMirror.prototype.scopeCount=function(){
return %GetFunctionScopeCount(this.value());
FunctionMirror.prototype.scope=function(a){
FunctionMirror.prototype.toText=function(){
return this.source();
this.propertyCount_=0;
this.elementCount_=0;
this.resolved_=false;
UnresolvedFunctionMirror.prototype.className=function(){
UnresolvedFunctionMirror.prototype.constructorFunction=function(){
UnresolvedFunctionMirror.prototype.prototypeObject=function(){
UnresolvedFunctionMirror.prototype.protoObject=function(){
UnresolvedFunctionMirror.prototype.name=function(){
UnresolvedFunctionMirror.prototype.inferredName=function(){
UnresolvedFunctionMirror.prototype.propertyNames=function(a,b){
ArrayMirror.prototype.length=function(){
ArrayMirror.prototype.indexedPropertiesFromRange=function(opt_from_index,
var b=opt_to_index||this.length()-1;
var g=ÞbugGetPropertyDetails(this.value_,%ToString(d));
DateMirror.prototype.toText=function(){
var a=JSON.stringify(this.value_);
return a.substring(1,a.length-1);
RegExpMirror.prototype.source=function(){
return this.value_.source;
RegExpMirror.prototype.global=function(){
return this.value_.global;
RegExpMirror.prototype.ignoreCase=function(){
return this.value_.ignoreCase;
RegExpMirror.prototype.multiline=function(){
return this.value_.multiline;
RegExpMirror.prototype.toText=function(){
return"/" this.source() "/";
ErrorMirror.prototype.message=function(){
return this.value_.message;
ErrorMirror.prototype.toText=function(){
str=%_CallFunction(this.value_,builtins.ErrorToString);
this.mirror_=a;
this.name_=b;
this.value_=c[0];
this.details_=c[1];
if(c.length>2){
this.exception_=c[2];
this.getter_=c[3];
this.setter_=c[4];
PropertyMirror.prototype.isReadOnly=function(){
return(this.attributes()&PropertyAttribute.ReadOnly)!=0;
PropertyMirror.prototype.isEnum=function(){
return(this.attributes()&PropertyAttribute.DontEnum)==0;
PropertyMirror.prototype.canDelete=function(){
return(this.attributes()&PropertyAttribute.DontDelete)==0;
PropertyMirror.prototype.name=function(){
return this.name_;
PropertyMirror.prototype.isIndexed=function(){
for(var a=0;a<this.name_.length;a  ){
if(this.name_[a]<'0'||'9'<this.name_[a]){
PropertyMirror.prototype.value=function(){
return MakeMirror(this.value_,false);
PropertyMirror.prototype.isException=function(){
return this.exception_?true:false;
PropertyMirror.prototype.attributes=function(){
return ÞbugPropertyAttributesFromDetails(this.details_);
PropertyMirror.prototype.propertyType=function(){
return ÞbugPropertyTypeFromDetails(this.details_);
PropertyMirror.prototype.insertionIndex=function(){
return ÞbugPropertyIndexFromDetails(this.details_);
PropertyMirror.prototype.hasGetter=function(){
return this.getter_?true:false;
PropertyMirror.prototype.hasSetter=function(){
return this.setter_?true:false;
PropertyMirror.prototype.getter=function(){
if(this.hasGetter()){
return MakeMirror(this.getter_);
PropertyMirror.prototype.setter=function(){
if(this.hasSetter()){
return MakeMirror(this.setter_);
PropertyMirror.prototype.isNative=function(){
return(this.propertyType()==PropertyType.Interceptor)||
((this.propertyType()==PropertyType.Callbacks)&&
!this.hasGetter()&&!this.hasSetter());
this.name_=a;
InternalPropertyMirror.prototype.name=function(){
InternalPropertyMirror.prototype.value=function(){
this.break_id_=a;
this.details_=%GetFrameDetails(a,b);
FrameDetails.prototype.frameId=function(){
%CheckExecutionState(this.break_id_);
return this.details_[kFrameDetailsFrameIdIndex];
FrameDetails.prototype.receiver=function(){
return this.details_[kFrameDetailsReceiverIndex];
FrameDetails.prototype.func=function(){
return this.details_[kFrameDetailsFunctionIndex];
FrameDetails.prototype.isConstructCall=function(){
return this.details_[kFrameDetailsConstructCallIndex];
FrameDetails.prototype.isAtReturn=function(){
return this.details_[kFrameDetailsAtReturnIndex];
FrameDetails.prototype.isDebuggerFrame=function(){
return(this.details_[kFrameDetailsFlagsIndex]&a)==a;
FrameDetails.prototype.isOptimizedFrame=function(){
FrameDetails.prototype.isInlinedFrame=function(){
return this.inlinedFrameIndex()>0;
FrameDetails.prototype.inlinedFrameIndex=function(){
return(this.details_[kFrameDetailsFlagsIndex]&a)>>2;
FrameDetails.prototype.argumentCount=function(){
return this.details_[kFrameDetailsArgumentCountIndex];
FrameDetails.prototype.argumentName=function(a){
if(a>=0&&a<this.argumentCount()){
return this.details_[kFrameDetailsFirstDynamicIndex 
FrameDetails.prototype.argumentValue=function(a){
FrameDetails.prototype.localCount=function(){
return this.details_[kFrameDetailsLocalCountIndex];
FrameDetails.prototype.sourcePosition=function(){
return this.details_[kFrameDetailsSourcePositionIndex];
FrameDetails.prototype.localName=function(a){
if(a>=0&&a<this.localCount()){
this.argumentCount()*kFrameDetailsNameValueSize;
return this.details_[b 
FrameDetails.prototype.localValue=function(a){
FrameDetails.prototype.returnValue=function(){
(this.argumentCount() this.localCount())*kFrameDetailsNameValueSize;
if(this.details_[kFrameDetailsAtReturnIndex]){
return this.details_[a];
FrameDetails.prototype.scopeCount=function(){
return %GetScopeCount(this.break_id_,this.frameId());
this.index_=b;
this.details_=new FrameDetails(a,b);
FrameMirror.prototype.index=function(){
return this.index_;
FrameMirror.prototype.func=function(){
var a=this.details_.func();
FrameMirror.prototype.receiver=function(){
return MakeMirror(this.details_.receiver());
FrameMirror.prototype.isConstructCall=function(){
return this.details_.isConstructCall();
FrameMirror.prototype.isAtReturn=function(){
return this.details_.isAtReturn();
FrameMirror.prototype.isDebuggerFrame=function(){
return this.details_.isDebuggerFrame();
FrameMirror.prototype.isOptimizedFrame=function(){
return this.details_.isOptimizedFrame();
FrameMirror.prototype.isInlinedFrame=function(){
return this.details_.isInlinedFrame();
FrameMirror.prototype.inlinedFrameIndex=function(){
return this.details_.inlinedFrameIndex();
FrameMirror.prototype.argumentCount=function(){
return this.details_.argumentCount();
FrameMirror.prototype.argumentName=function(a){
return this.details_.argumentName(a);
FrameMirror.prototype.argumentValue=function(a){
return MakeMirror(this.details_.argumentValue(a));
FrameMirror.prototype.localCount=function(){
return this.details_.localCount();
FrameMirror.prototype.localName=function(a){
return this.details_.localName(a);
FrameMirror.prototype.localValue=function(a){
return MakeMirror(this.details_.localValue(a));
FrameMirror.prototype.returnValue=function(){
return MakeMirror(this.details_.returnValue());
FrameMirror.prototype.sourcePosition=function(){
return this.details_.sourcePosition();
FrameMirror.prototype.sourceLocation=function(){
if(this.func().resolved()&&this.func().script()){
return this.func().script().locationFromPosition(this.sourcePosition(),
FrameMirror.prototype.sourceLine=function(){
if(this.func().resolved()){
var a=this.sourceLocation();
return a.line;
FrameMirror.prototype.sourceColumn=function(){
return a.column;
FrameMirror.prototype.sourceLineText=function(){
return a.sourceText();
FrameMirror.prototype.scopeCount=function(){
return this.details_.scopeCount();
FrameMirror.prototype.scope=function(a){
FrameMirror.prototype.evaluate=function(source,disable_break,
var a=ÞbugEvaluate(this.break_id_,
this.details_.frameId(),
this.details_.inlinedFrameIndex(),
FrameMirror.prototype.invocationText=function(){
var b=this.func();
var c=this.receiver();
if(this.isConstructCall()){
a =b.name()?b.name():'[anonymous]';
}else if(this.isDebuggerFrame()){
!c.className||(c.className()!='global');
a =c.toText();
if(c.isObject()){
!h.isNull()&&g.isUndefined();
h=h.protoObject()){
g=h.lookupProperty(b);
if(!g.isUndefined()){
if(!g.isIndexed()){
a =g.name();
if(b.name()&&b.name()!=g.name()){
a ='(aka ' b.name() ')';
if(!this.isDebuggerFrame()){
for(var i=0;i<this.argumentCount();i  ){
if(this.argumentName(i)){
a =this.argumentName(i);
a =this.argumentValue(i).toText();
if(this.isAtReturn()){
a =this.returnValue().toText();
FrameMirror.prototype.sourceAndPositionText=function(){
if(b.resolved()){
if(b.script()){
if(b.script().name()){
a =b.script().name();
var c=this.sourceLocation();
a =!(typeof(c)==='undefined')?(c.line 1):'?';
a =!(typeof(c)==='undefined')?(c.column 1):'?';
if(!(typeof(this.sourcePosition())==='undefined')){
a =' (position ' (this.sourcePosition() 1) ')';
FrameMirror.prototype.localsText=function(){
var b=this.localCount();
a =this.localName(c);
a =this.localValue(c).toText();
FrameMirror.prototype.restart=function(){
var a=%LiveEditRestartFrame(this.break_id_,this.index_);
FrameMirror.prototype.toText=function(a){
b ='#' (this.index()<=9?'0':'') this.index();
b =this.invocationText();
b =this.sourceAndPositionText();
b =this.localsText();
this.break_id_=a.break_id_;
this.details_=%GetScopeDetails(a.break_id_,
a.details_.frameId(),
a.details_.inlinedFrameIndex(),
this.frame_id_=a.details_.frameId();
this.inlined_frame_id_=a.details_.inlinedFrameIndex();
this.details_=%GetFunctionScopeDetails(b.value(),c);
this.fun_value_=b.value();
this.break_id_=undefined;
this.index_=c;
ScopeDetails.prototype.type=function(){
if(!(typeof(this.break_id_)==='undefined')){
return this.details_[kScopeDetailsTypeIndex];
ScopeDetails.prototype.object=function(){
return this.details_[kScopeDetailsObjectIndex];
ScopeDetails.prototype.setVariableValueImpl=function(a,b){
c=%SetScopeVariableValue(this.break_id_,this.frame_id_,
this.inlined_frame_id_,this.index_,a,b);
c=%SetScopeVariableValue(this.fun_value_,null,null,this.index_,
this.frame_index_=a.index_;
this.frame_index_=undefined;
this.scope_index_=c;
this.details_=new ScopeDetails(a,b,c);
ScopeMirror.prototype.frameIndex=function(){
return this.frame_index_;
ScopeMirror.prototype.scopeIndex=function(){
return this.scope_index_;
ScopeMirror.prototype.scopeType=function(){
return this.details_.type();
ScopeMirror.prototype.scopeObject=function(){
var a=this.scopeType()==ScopeType.Local||
this.scopeType()==ScopeType.Closure;
return MakeMirror(this.details_.object(),a);
ScopeMirror.prototype.setVariableValue=function(a,b){
this.details_.setVariableValueImpl(a,b);
this.script_=a;
this.context_=new ContextMirror(a.context_data);
ScriptMirror.prototype.value=function(){
ScriptMirror.prototype.name=function(){
return this.script_.name||this.script_.nameOrSourceURL();
ScriptMirror.prototype.id=function(){
return this.script_.id;
ScriptMirror.prototype.source=function(){
return this.script_.source;
ScriptMirror.prototype.setSource=function(a){
ÞbugSetScriptSource(this.script_,a);
ScriptMirror.prototype.lineOffset=function(){
return this.script_.line_offset;
ScriptMirror.prototype.columnOffset=function(){
return this.script_.column_offset;
ScriptMirror.prototype.data=function(){
return this.script_.data;
ScriptMirror.prototype.scriptType=function(){
return this.script_.type;
ScriptMirror.prototype.compilationType=function(){
return this.script_.compilation_type;
ScriptMirror.prototype.lineCount=function(){
return this.script_.lineCount();
ScriptMirror.prototype.locationFromPosition=function(
return this.script_.locationFromPosition(position,include_resource_offset);
ScriptMirror.prototype.sourceSlice=function(a,b){
return this.script_.sourceSlice(a,b);
ScriptMirror.prototype.context=function(){
return this.context_;
ScriptMirror.prototype.evalFromScript=function(){
return MakeMirror(this.script_.eval_from_script);
ScriptMirror.prototype.evalFromFunctionName=function(){
return MakeMirror(this.script_.eval_from_function_name);
ScriptMirror.prototype.evalFromLocation=function(){
var a=this.evalFromScript();
if(!a.isUndefined()){
var b=this.script_.eval_from_script_position;
return a.locationFromPosition(b,true);
ScriptMirror.prototype.toText=function(){
a =this.name();
if(this.lineOffset()>0){
a =this.lineOffset();
a =this.lineOffset() this.lineCount()-1;
a =this.lineCount();
this.data_=a;
ContextMirror.prototype.data=function(){
return this.data_;
this.details_=a;
this.options_=b;
this.mirrors_=[];
JSONProtocolSerializer.prototype.serializeReference=function(a){
return this.serialize_(a,true,true);
JSONProtocolSerializer.prototype.serializeValue=function(a){
var b=this.serialize_(a,false,true);
JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){
var b=this.mirrors_.length;
a.push(this.serialize_(this.mirrors_[c],false,false));
JSONProtocolSerializer.prototype.includeSource_=function(){
return this.options_&&this.options_.includeSource;
JSONProtocolSerializer.prototype.inlineRefs_=function(){
return this.options_&&this.options_.inlineRefs;
JSONProtocolSerializer.prototype.maxStringLength_=function(){
if((typeof(this.options_)==='undefined')||
(typeof(this.options_.maxStringLength)==='undefined')){
return this.options_.maxStringLength;
JSONProtocolSerializer.prototype.add_=function(a){
for(var b=0;b<this.mirrors_.length;b  ){
if(this.mirrors_[b]===a){
this.mirrors_.push(a);
JSONProtocolSerializer.prototype.serializeReferenceWithDisplayData_=
b.ref=a.handle();
b.type=a.type();
switch(a.type()){
b.value=a.value();
b.value=a.getTruncatedValue(this.maxStringLength_());
b.name=a.name();
b.inferredName=a.inferredName();
if(a.script()){
b.scriptId=a.script().id();
b.value=a.toText();
b.className=a.className();
JSONProtocolSerializer.prototype.serialize_=function(mirror,reference,
(mirror.isValue()||mirror.isScript()||mirror.isContext())){
if(this.inlineRefs_()&&mirror.isValue()){
return this.serializeReferenceWithDisplayData_(mirror);
this.add_(mirror);
return{'ref':mirror.handle()};
if(mirror.isValue()||mirror.isScript()||mirror.isContext()){
a.handle=mirror.handle();
a.type=mirror.type();
switch(mirror.type()){
a.value=mirror.value();
a.value=NumberToJSON_(mirror.value());
if(this.maxStringLength_()!=-1&&
mirror.length()>this.maxStringLength_()){
var b=mirror.getTruncatedValue(this.maxStringLength_());
a.value=b;
a.fromIndex=0;
a.toIndex=this.maxStringLength_();
a.length=mirror.length();
this.serializeObject_(mirror,a,details);
this.serializeFrame_(mirror,a);
this.serializeScope_(mirror,a);
if(mirror.name()){
a.name=mirror.name();
a.id=mirror.id();
a.lineOffset=mirror.lineOffset();
a.columnOffset=mirror.columnOffset();
a.lineCount=mirror.lineCount();
if(mirror.data()){
a.data=mirror.data();
if(this.includeSource_()){
a.source=mirror.source();
var c=mirror.source().substring(0,80);
a.sourceStart=c;
a.sourceLength=mirror.source().length;
a.scriptType=mirror.scriptType();
a.compilationType=mirror.compilationType();
if(mirror.compilationType()==1&&
mirror.evalFromScript()){
a.evalFromScript=
this.serializeReference(mirror.evalFromScript());
var d=mirror.evalFromLocation();
a.evalFromLocation={line:d.line,
column:d.column};
if(mirror.evalFromFunctionName()){
a.evalFromFunctionName=mirror.evalFromFunctionName();
if(mirror.context()){
a.context=this.serializeReference(mirror.context());
a.text=mirror.toText();
JSONProtocolSerializer.prototype.serializeObject_=function(mirror,content,
content.className=mirror.className();
content.constructorFunction=
this.serializeReference(mirror.constructorFunction());
content.protoObject=this.serializeReference(mirror.protoObject());
content.prototypeObject=this.serializeReference(mirror.prototypeObject());
if(mirror.hasNamedInterceptor()){
content.namedInterceptor=true;
if(mirror.hasIndexedInterceptor()){
content.indexedInterceptor=true;
if(mirror.isFunction()){
content.name=mirror.name();
if(!(typeof(mirror.inferredName())==='undefined')){
content.inferredName=mirror.inferredName();
content.resolved=mirror.resolved();
if(mirror.resolved()){
content.source=mirror.source();
if(mirror.script()){
content.script=this.serializeReference(mirror.script());
content.scriptId=mirror.script().id();
serializeLocationFields(mirror.sourceLocation(),content);
content.scopes=[];
for(var a=0;a<mirror.scopeCount();a  ){
var b=mirror.scope(a);
content.scopes.push({
type:b.scopeType(),
if(mirror.isDate()){
content.value=mirror.value();
var c=mirror.propertyNames(PropertyKind.Named);
var d=mirror.propertyNames(PropertyKind.Indexed);
var g=new Array(c.length d.length);
for(var a=0;a<c.length;a  ){
var h=mirror.property(c[a]);
g[a]=this.serializeProperty_(h);
this.add_(h.value());
for(var a=0;a<d.length;a  ){
var h=mirror.property(d[a]);
g[c.length a]=this.serializeProperty_(h);
content.properties=g;
var i=mirror.internalProperties();
if(i.length>0){
for(var a=0;a<i.length;a  ){
j.push(this.serializeInternalProperty_(i[a]));
content.internalProperties=j;
b.position=a.position;
var c=a.line;
b.line=c;
var d=a.column;
b.column=d;
JSONProtocolSerializer.prototype.serializeProperty_=function(a){
var c=a.value();
if(this.inlineRefs_()&&c.isValue()){
b.value=this.serializeReferenceWithDisplayData_(c);
if(a.attributes()!=PropertyAttribute.None){
b.attributes=a.attributes();
if(a.propertyType()!=PropertyType.Normal){
b.propertyType=a.propertyType();
b.ref=c.handle();
JSONProtocolSerializer.prototype.serializeInternalProperty_=
JSONProtocolSerializer.prototype.serializeFrame_=function(a,b){
b.index=a.index();
b.receiver=this.serializeReference(a.receiver());
var c=a.func();
b.func=this.serializeReference(c);
if(c.script()){
b.script=this.serializeReference(c.script());
b.constructCall=a.isConstructCall();
b.atReturn=a.isAtReturn();
if(a.isAtReturn()){
b.returnValue=this.serializeReference(a.returnValue());
b.debuggerFrame=a.isDebuggerFrame();
var d=new Array(a.argumentCount());
for(var g=0;g<a.argumentCount();g  ){
var i=a.argumentName(g);
h.name=i;
h.value=this.serializeReference(a.argumentValue(g));
b.arguments=d;
var d=new Array(a.localCount());
for(var g=0;g<a.localCount();g  ){
j.name=a.localName(g);
j.value=this.serializeReference(a.localValue(g));
b.locals=d;
serializeLocationFields(a.sourceLocation(),b);
var k=a.sourceLineText();
b.sourceLineText=k;
b.scopes=[];
for(var g=0;g<a.scopeCount();g  ){
var l=a.scope(g);
b.scopes.push({
type:l.scopeType(),
JSONProtocolSerializer.prototype.serializeScope_=function(a,b){
b.index=a.scopeIndex();
b.frameIndex=a.frameIndex();
b.type=a.scopeType();
b.object=this.inlineRefs_()?
this.serializeValue(a.scopeObject()):
this.serializeReference(a.scopeObject());
Debug.LiveEdit=new function(){
var c=script.source;
MarkChangedFunctions(g,h.GetChunks());
l.push(r);
for(var t=0;t<r.children.length;t  ){
CollectDamaged(r.children[t]);
for(var t=0;t<u.length;t  ){
m.push(u[t]);
CollectNew(u[t].children);
if(q.status==a.DAMAGED){
if(q.status==a.UNCHANGED){
o.push(q);
}else if(q.status==a.SOURCE_CHANGED){
}else if(q.status==a.CHANGED){
k.push(q);
CollectNew(q.unmatched_new_nodes);
for(var t=0;t<q.children.length;t  ){
HarvestTodo(q.children[t]);
old_len:c.length,
new_len:new_source.length,
for(var t=0;t<k.length;t  ){
k[t].live_shared_function_infos;
for(var B=0;B<A.length;B  ){
z.push(A[B]);
w.stack_modified=C!=0;
w.stack_modified;
if(l.length==0){
change_log.push({linked_to_old_script:H});
for(var t=0;t<l.length;t  ){
w.created_script_name=G;
for(var t=0;t<m.length;t  ){
m[t].info.shared_function_info,script);
change_log.push({position_patched:I});
for(var t=0;t<o.length;t  ){
if(o[t].live_shared_function_infos){
o[t].live_shared_function_infos.
%LiveEditFunctionSourceUpdated(J.raw_array);
w.updated=true;
this.ApplyPatchMultiChunk=ApplyPatchMultiChunk;
for(var t=0;t<M.length;t  ){
%LiveEditFunctionSetScript(J.shared_function_info,void 0);
N.push(J);
O.push(t);
for(var t=0;t<N.length;t  ){
for(var B=t 1;B<N.length;B  ){
if(N[P].start_position>N[B].start_position){
function ResetIndexes(T,U){
while(S<N.length&&
N[S].outer_index==U){
N[X].outer_index=T;
N[W].next_sibling_index=X;
ResetIndexes(X,O[X]);
N[W].next_sibling_index=-1;
ResetIndexes(-1,-1);
Assert(S==N.length);
var Z=q.corresponding_node.info;
if(q.live_shared_function_infos){
q.live_shared_function_infos.forEach(function(aa){
%LiveEditReplaceFunctionCode(Z.raw_array,
aa.raw_array);
if(q.children[t].corresponding_node){
q.children[t].corresponding_node.info.
if(q.children[t].live_shared_function_infos){
q.children[t].live_shared_function_infos.
aa.info,
ac.info);
Y.push({function_patched:Z.function_name});
Y.push({function_patched:Z.function_name,
if(ad.live_shared_function_infos){
ad.live_shared_function_infos.
%LiveEditFunctionSetScript(J.info,E);
ae.push({name:ad.info.function_name});
ae.push(
{name:ad.info.function_name,not_found:true});
Y.push({break_points_update:ah});
for(var t=0;t<ag.length;t  ){
aj.clear();
var ak=Debug.findScriptSourcePosition(af,
aj.line(),aj.column());
line:aj.line(),
column:aj.column()
ai.push(al);
var an=aj.cloneForOtherScript(am);
an.set(am);
ah.push({
id:aj.number(),
new_id:an.number(),
var ao=h.Translate(
ai[t].position,
PosTranslator.ShiftWithTopInsideChunkHandler);
af.locationFromPosition(ao,false);
aj.update_positions(ap.line,ap.column);
line:ap.line,
column:ap.column
aj.set(af);
ah.push({type:"position_changed",
this.pos1=at;
this.pos2=au;
this.len1=av;
this.len2=aw;
for(var t=0;t<ax.length;t =3){
ay.push(new DiffChunk(aA,aB,aC-aA,
this.chunks=ay;
PosTranslator.prototype.GetChunks=function(){
return this.chunks;
PosTranslator.prototype.Translate=function(aE,aF){
var aG=this.chunks;
if(aG.length==0||aE<aG[0].pos1){
var aI=aG.length-1;
var aJ=Math.floor((aH aI)/2);
if(aE<aG[aJ 1].pos1){
if(aE>=aK.pos1 aK.len1){
return aE aK.pos2 aK.len2-aK.pos1-aK.len1;
aF=PosTranslator.DefaultInsideChunkHandler;
PosTranslator.DefaultInsideChunkHandler=function(aE,aL){
PosTranslator.ShiftWithTopInsideChunkHandler=
return aE-aL.pos1 aL.pos2;
this.info=aM;
this.children=aN;
this.array_index=aO;
this.parent=void 0;
this.status=a.UNCHANGED;
this.status_explanation=void 0;
this.new_start_pos=void 0;
this.new_end_pos=void 0;
this.corresponding_node=void 0;
this.unmatched_new_nodes=void 0;
this.textual_corresponding_node=void 0;
this.textually_unmatched_new_nodes=void 0;
this.live_shared_function_infos=void 0;
while(aQ<aP.length&&
aP[aQ].outer_index==aR){
aS.push(BuildNode());
for(var t=0;t<aS.length;t  ){
aS[t].parent=r;
Assert(aQ==aP.length);
this.current=function(){return ay[aW];};
this.next=function(){
aX=aK.pos2 aK.len2-(aK.pos1 aK.len1);
this.done=function(){return aW>=ay.length;};
this.TranslatePos=function(aE){return aE aX;};
aY.new_start_pos=aV.TranslatePos(
aY.info.start_position);
while(!aV.done()&&
aV.current().pos1<aY.info.end_position){
if(aZ<aY.children.length){
var bc=aY.children[aZ];
if(bc.info.end_position<=aV.current().pos1){
}else if(bc.info.start_position>=
aV.current().pos1 aV.current().len1){
aV.next();
}else if(bc.info.start_position<=aV.current().pos1&&
bc.info.end_position>=aV.current().pos1 
aV.current().len1){
(bc.status!=a.UNCHANGED);
(bc.status==a.DAMAGED);
bc.status=a.DAMAGED;
bc.status_explanation=
if(aV.current().pos1 aV.current().len1<=
aY.info.end_position){
aY.status=a.CHANGED;
aY.status=a.DAMAGED;
aY.status_explanation=
while(aZ<aY.children.length){
aY.status=a.SOURCE_CHANGED;
aY.new_end_pos=
aV.TranslatePos(aY.info.end_position);
r.new_start_pos=aV.TranslatePos(r.info.start_position);
r.new_end_pos=aV.TranslatePos(r.info.end_position);
var bg=q.children;
var bh=bf.children;
while(bk<bg.length){
if(bg[bk].status==a.DAMAGED){
}else if(bl<bh.length){
if(bh[bl].info.start_position<
bg[bk].new_start_pos){
bi.push(bh[bl]);
bj.push(bh[bl]);
}else if(bh[bl].info.start_position==
if(bh[bl].info.end_position==
bg[bk].new_end_pos){
bg[bk].corresponding_node=
bg[bk].textual_corresponding_node=
if(bg[bk].status!=a.UNCHANGED){
bi.push(
bg[bk].corresponding_node);
bg[bk].corresponding_node=void 0;
q.status=a.CHANGED;
bg[bk].status=a.DAMAGED;
bg[bk].status_explanation=
while(bl<bh.length){
if(q.status==a.CHANGED){
WhyFunctionExpectationsDiffer(q.info,bf.info);
q.status=a.DAMAGED;
q.status_explanation=bm;
q.unmatched_new_nodes=bi;
q.textually_unmatched_new_nodes=
bd.corresponding_node=be;
bd.textual_corresponding_node=be;
Assert(bd.status!=a.DAMAGED,
for(var t=0;t<bn.length;t  ){
bo.push(new SharedInfoWrapper(bn[t]));
for(var t=0;t<bo.length;t  ){
if(bq.start_position==N.start_position&&
bq.end_position==N.end_position){
bp.push(bq);
if(bp.length>0){
r.live_shared_function_infos=FindFunctionInfos(r.info);
TraverseTree(r.children[t]);
this.function_name=br[0];
this.start_position=br[1];
this.end_position=br[2];
this.param_num=br[3];
this.code=br[4];
this.code_scope_info=br[5];
this.scope_info=br[6];
this.outer_index=br[7];
this.shared_function_info=br[8];
this.next_sibling_index=null;
this.raw_array=br;
this.info=br[3];
ad.live_shared_function_infos.forEach(function(J){
%LiveEditPatchFunctionPositions(J.raw_array,
{name:ad.info.function_name,info_not_found:true});
return L.name " (old)";
if(bs.param_num!=bt.param_num){
return"Changed parameter number: " bs.param_num 
" and " bt.param_num;
var bu=bs.scope_info;
var bv=bt.scope_info;
bw=bu.toString();
bx=bv.toString();
for(var t=0;t<bz.length;t  ){
bA[t]=bz[t].info;
if(bB[bA.length]){
throw new Failure(bB[bA.length]);
for(var t=0;t<bA.length;t  ){
if(bB[t]==by.REPLACED_ON_ACTIVE_STACK){
bD.push({name:bE.function_name});
}else if(bB[t]!=by.AVAILABLE_FOR_PATCH){
name:bE.function_name,
start_pos:bE.start_position,
end_pos:bE.end_position,
by.SymbolName(bB[t])
bC.push(bF);
if(bD.length>0){
Y.push({dropped_from_stack:bD});
if(bC.length>0){
Y.push({functions_on_stack:bC});
return bD.length;
by.SymbolName=function(bG){
this.message=as;
this.Failure=Failure;
Failure.prototype.toString=function(){
return"LiveEdit Failure: " this.message;
this.GetPcFromSourcePos=GetPcFromSourcePos;
var c=L.source;
this.SetScriptSource=SetScriptSource;
var bK=c.substring(0,change_pos) 
new_str c.substring(change_pos change_len);
[change_pos,change_pos change_len,change_pos new_str.length],
var bc=r.children[t];
if(bc.status!=a.UNCHANGED){
bP.push(ProcessOldNode(bc));
if(r.textually_unmatched_new_nodes){
for(var t=0;t<r.textually_unmatched_new_nodes.length;t  ){
var bc=r.textually_unmatched_new_nodes[t];
bQ.push(ProcessNewNode(bc));
name:r.info.function_name,
status:r.status,
if(r.status_explanation){
bR.status_explanation=r.status_explanation;
if(r.textual_corresponding_node){
bR.new_positions=DescribePositions(r.textual_corresponding_node);
bP.push(ProcessNewNode(r.children[t]));
start_position:r.info.start_position,
end_position:r.info.end_position
var bB=bS.restart();
this.RestartFrame=RestartFrame;
this.TestApi={
var $Date=global.Date;
var b=ÚteLocalTimezone(a);
return ÚteToUTC(a);
return ÚteMakeDay(a,b) c-1;
%SetCode($Date,function(a,b,c,d,g,h,i){
return(new $Date()).toString();
k=ÚteCurrentTime();
(ÚteSetValue(this,k,1));
if(l.string===a){
k=l.time;
l.time=k;
l.string=a;
(ÚteSetValue(this,k,0));
%FunctionSetPrototype($Date,new $Date($NaN));
var b=ÚteParseString(ToString(a),parse_buffer);
return ÚteCurrentTime();
(ÚteSetValue(this,ToNumber(a),1));
return(ÚteSetValue(this,MakeDate((%_DateField(this,9)),c),0));
return(ÚteSetValue(this,MakeDate((%_DateField(this,19)),c),1));
return(ÚteSetValue(this,MakeDate((%_DateField(this,9)),d),0));
return(ÚteSetValue(this,MakeDate((%_DateField(this,19)),d),1));
return(ÚteSetValue(this,MakeDate((%_DateField(this,9)),h),0));
return(ÚteSetValue(this,MakeDate((%_DateField(this,19)),h),1));
return(ÚteSetValue(this,MakeDate((%_DateField(this,9)),i),0));
return(ÚteSetValue(this,MakeDate((%_DateField(this,19)),i),1));
return(ÚteSetValue(this,MakeDate(c,(%_DateField(this,10))),0));
return(ÚteSetValue(this,MakeDate(c,(%_DateField(this,20))),1));
return(ÚteSetValue(this,MakeDate(d,(%_DateField(this,10))),0));
return(ÚteSetValue(this,MakeDate(d,(%_DateField(this,20))),1));
return(ÚteSetValue(this,MakeDate(i,h),0));
return(ÚteSetValue(this,MakeDate(i,h),1));
if((!%_IsSmi(%IS_VAR(a))&&!(a==a)))return(ÚteSetValue(this,$NaN,1));
return(ÚteSetValue(this,MakeDate(h,g),0));
var b=this.getUTCFullYear();
'-' PadInt(this.getUTCMonth() 1,2) 
'-' PadInt(this.getUTCDate(),2) 
'T' PadInt(this.getUTCHours(),2) 
':' PadInt(this.getUTCMinutes(),2) 
':' PadInt(this.getUTCSeconds(),2) 
'.' PadInt(this.getUTCMilliseconds(),3) 
return b.toISOString();
cache.time=$NaN;
cache.string=null;
%SetProperty($Date.prototype,"constructor",$Date,2);
InstallFunctions($Date.prototype,2,$Array(
var $JSON=global.JSON;
var g=d.length;
var j=a.length;
i.push(l);
m="[" i.join(",") "]";
}else if(i.length>0){
m="[\n" d i.join(o) "\n" 
c.pop();
var j=b.length;
i.push(o);
q="{" i.join(",") "}";
q="{\n" d i.join(r) "\n" 
var j=i.toJSON;
c.push("[]");
c.push("[");
c[c.length-1]=h;
b.pop();
c.push(%QuoteJSONString(g));
c.push(%QuoteJSONStringComma(g));
c.push(",");
var j=c.length;
if(j==c.length)c[j-1]=",null";
c.push(((%_IsSmi(%IS_VAR(g))||g-g==0)?%_NumberToString(g):"null"));
if(j==c.length)c.push("null");
j=c.length;
c.push("]");
c.push("{");
var g=%ObjectKeys(a);
c.push(%QuoteJSONStringComma(j));
c.push(%QuoteJSONString(j));
c.push(":");
var k=c.length;
if(k==c.length){
c.push("}");
var g=b.toJSON;
d.push(b!==""?%QuoteJSONString(b):'""');
d.push(((%_IsSmi(%IS_VAR(b))||b-b==0)?%_NumberToString(b):"null"));
d.push(b?"true":"false");
d.push("null");
d.push(%QuoteJSONString(ToString(b)));
d.push(%_ValueOf(b)?"true":"false");
if(d.length==0)return;
var g=%_FastAsciiArrayJoin(d,"");
return %StringBuilderConcat(d,d.length,"");
if(c.length>10){
var $RegExp=global.RegExp;
c=(b.global?'g':'')
 (b.ignoreCase?'i':'')
 (b.multiline?'m':'');
b=b.source;
for(var i=0;i<c.length;i  ){
if(this==$RegExp.prototype){
['RegExp.prototype.compile',this]);
function DoRegExpExec(a,b,c){
var d=%_RegExpExec(a,b,c,lastMatchInfo);
function RegExpExecNoTests(a,b,c){
function RegExpExec(a){
['RegExp.prototype.exec',this]);
var b=this.lastIndex;
var d=this.global;
if(c<0||c>a.length){
this.lastIndex=0;
%_Log('regexp','regexp-exec,%0r,%1S,%2i',[this,a,b]);
var g=%_RegExpExec(this,a,c,lastMatchInfo);
if(d)this.lastIndex=0;
this.lastIndex=lastMatchInfo[4];
var regexp_key;
['RegExp.prototype.test',this]);
if(this.global){
var d=%_RegExpExec(this,a,c,lastMatchInfo);
if(%_StringCharCodeAt(g.source,0)==46&&
%_StringCharCodeAt(g.source,1)==42&&
%_StringCharCodeAt(g.source,2)!=63){
%_Log('regexp','regexp-exec,%0r,%1S,%2i',[g,a,b]);
var d=%_RegExpExec(g,a,0,lastMatchInfo);
if(!%_ObjectEquals(regexp_key,a)){
regexp_key=a;
new $RegExp(SubString(a.source,2,a.source.length),
(a.ignoreCase?a.multiline?"im":"i"
:a.multiline?"m":""));
['RegExp.prototype.toString',this]);
var a='/' this.source '/';
if(this.global)a ='g';
if(this.ignoreCase)a ='i';
if(this.multiline)a ='m';
if(a.length<=3)return'';
return a[a.length-3];
a=((c)[(c).length-2]);
b=((c)[(c).length-1]);
a=((c)[(c).length-2]) d.length;
return SubString(b,a,b.length);
if(a<lastMatchInfoOverride.length-2){
%FunctionSetInstanceClassName($RegExp,'RegExp');
%SetProperty($RegExp.prototype,'constructor',$RegExp,2);
%SetCode($RegExp,RegExpConstructor);
InstallFunctions($RegExp.prototype,2,$Array(
"exec",RegExpExec,
%FunctionSetLength($RegExp.prototype.compile,1);
ÞfineOrRedefineAccessorProperty($RegExp,'input',a,
ÞfineOrRedefineAccessorProperty($RegExp,'$_',a,
ÞfineOrRedefineAccessorProperty($RegExp,'$input',a,
ÞfineOrRedefineAccessorProperty($RegExp,'multiline',h,
ÞfineOrRedefineAccessorProperty($RegExp,'$*',h,
ÞfineOrRedefineAccessorProperty($RegExp,'lastMatch',RegExpGetLastMatch,
ÞfineOrRedefineAccessorProperty($RegExp,'$&',RegExpGetLastMatch,
ÞfineOrRedefineAccessorProperty($RegExp,'lastParen',RegExpGetLastParen,
ÞfineOrRedefineAccessorProperty($RegExp,'$ ',RegExpGetLastParen,
ÞfineOrRedefineAccessorProperty($RegExp,'leftContext',
ÞfineOrRedefineAccessorProperty($RegExp,'$`',RegExpGetLeftContext,
ÞfineOrRedefineAccessorProperty($RegExp,'rightContext',
ÞfineOrRedefineAccessorProperty($RegExp,"$'",RegExpGetRightContext,
ÞfineOrRedefineAccessorProperty($RegExp,'$' m,
%u.%u.%u.%u
0123456789
inflate 1.2.3 Copyright 1995-2005 Mark Adler
deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly
// in all copies or substantial portions of the Software.
// Hello, and welcome to hacking node.js!
// This file is invoked by node::Load in src/node.cc, and responsible for
// bootstrapping the node.js core. Special caution is given to the performance
this.global = this;
var EventEmitter = NativeModule.require('events').EventEmitter;
process.__proto__ = Object.create(EventEmitter.prototype, {
value: process.constructor
EventEmitter.call(process);
process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated
startup.processFatal();
startup.globalVariables();
startup.globalTimeouts();
startup.globalConsole();
startup.processAssert();
startup.processConfig();
startup.processNextTick();
startup.processStdio();
startup.processKillAndExit();
startup.processSignalHandlers();
startup.processChannel();
startup.resolveArgv0();
if (NativeModule.exists('_third_party_main')) {
// one to drop a file lib/_third_party_main.js into the build
// directory which will be executed instead of Node's normal loading.
process.nextTick(function() {
NativeModule.require('_third_party_main');
} else if (process.argv[1] == 'debug') {
var d = NativeModule.require('_debugger');
d.start();
// User passed '-e' or '--eval' arguments to Node.
} else if (process.argv[1]) {
// make process.argv[1] into a full path
var path = NativeModule.require('path');
process.argv[1] = path.resolve(process.argv[1]);
if (process.env.NODE_UNIQUE_ID) {
var cluster = NativeModule.require('cluster');
delete process.env.NODE_UNIQUE_ID;
var Module = NativeModule.require('module');
process.execArgv.some(function(arg) {
return arg.match(/^--debug-brk(=[0-9]*)?$/);
// Otherwise, there's a race condition where `node debug foo.js`
var debugTimeout =  process.env.NODE_DEBUG_TIMEOUT || 50;
setTimeout(Module.runMain, debugTimeout);
Module.runMain();
// If -i or --interactive were passed, or stdin is a TTY.
if (process._forceRepl || NativeModule.require('tty').isatty(0)) {
if (parseInt(process.env['NODE_NO_READLINE'], 10)) {
opts.terminal = false;
if (parseInt(process.env['NODE_DISABLE_COLORS'], 10)) {
opts.useColors = false;
var repl = Module.requireRepl().start(opts);
repl.on('exit', function() {
process.exit();
// Read all of stdin - execute it.
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(d) {
process.stdin.on('end', function() {
startup.globalVariables = function() {
global.process = process;
global.global = global;
global.GLOBAL = global;
global.root = global;
global.Buffer = NativeModule.require('buffer').Buffer;
process.binding('buffer').setFastBufferConstructor(global.Buffer);
process.domain = null;
startup.globalTimeouts = function() {
global.setTimeout = function() {
var t = NativeModule.require('timers');
return t.setTimeout.apply(this, arguments);
global.setInterval = function() {
return t.setInterval.apply(this, arguments);
global.clearTimeout = function() {
return t.clearTimeout.apply(this, arguments);
global.clearInterval = function() {
return t.clearInterval.apply(this, arguments);
global.setImmediate = function() {
return t.setImmediate.apply(this, arguments);
global.clearImmediate = function() {
return t.clearImmediate.apply(this, arguments);
startup.globalConsole = function() {
return NativeModule.require('console');
startup.lazyConstants = function() {
startup._lazyConstants = process.binding('constants');
startup.processFatal = function() {
if (process.domain) {
var domain = process.domain;
var domainModule = NativeModule.require('domain');
// domain.dispose() altogether. It's almost always a terrible
er.domain = domain;
er.domainThrown = true;
caught = domain.emit('error', er);
var domainModule = NativeModule.require('domain');
domainStack.length = 0;
domainModule.active = process.domain = null;
if (domain === domainModule.active)
domainStack.pop();
if (domainStack.length) {
var parentDomain = domainStack[domainStack.length - 1];
process.domain = domainModule.active = parentDomain;
caught = process.emit('uncaughtException', er);
process.emit('exit', 1);
startup.processAssert = function() {
assert = process.assert = function(x, msg) {
if (!x) throw new Error(msg || 'assertion error');
startup.processConfig = function() {
// used for `process.config`, but not a real module
var config = NativeModule._source.config;
delete NativeModule._source.config;
config = config.split('\n').slice(1).join('\n').replace(/'/g, '"');
process.config = JSON.parse(config, function(key, value) {
startup.processNextTick = function() {
// this infobox thing is used so that the C   code in src/node.cc
process.nextTick = function nextTick(cb) {
process.maxTickDepth = 1000;
nextTickQueue.splice(0, infoBox[index]);
infoBox[length] = nextTickQueue.length;
var msg = '(node) warning: Recursive process.nextTick detected. '  
if (process.throwDeprecation)
throw new Error(msg);
else if (process.traceDeprecation)
console.trace(msg);
console.error(msg);
while (infoBox[depth]   < process.maxTickDepth) {
callback = nextTickQueue[infoBox[index]  ].callback;
if (infoBox[depth] >= process.maxTickDepth)
// always do this at least once. otherwise if process.maxTickDepth
callback = tock.callback;
if (tock.domain) {
if (tock.domain._disposed) continue;
tock.domain.enter();
tock.domain.exit();
nextTickQueue.push(obj);
var obj = { callback: callback, domain: process.domain };
var Module = NativeModule.require('module');
var path = NativeModule.require('path');
var cwd = process.cwd();
module.filename = path.join(cwd, name);
module.paths = Module._nodeModulePaths(cwd);
script = 'global.__filename = '   JSON.stringify(name)   ';\n'  
'global.exports = exports;\n'  
'global.module = module;\n'  
'global.require = require;\n'  
'return require("vm").runInThisContext('  
JSON.stringify(body)   ', '  
JSON.stringify(name)   ', true);\n';
if (process._print_eval) console.log(result);
// TODO make this more compatible with ErrnoException from src/node.cc
// src/node.cc should be removed.
e.errno = e.code = errorno;
e.syscall = syscall;
var tty_wrap = process.binding('tty_wrap');
// Note stream._type is used for test-module-load-list.js
switch (tty_wrap.guessHandleType(fd)) {
var tty = NativeModule.require('tty');
stream = new tty.WriteStream(fd);
// See hXXps://github.com/joyent/node/issues/1726
if (stream._handle && stream._handle.unref) {
stream._handle.unref();
var fs = NativeModule.require('fs');
stream = new fs.SyncWriteStream(fd, { autoClose: false });
case 'PIPE':
case 'TCP':
var net = NativeModule.require('net');
stream = new net.Socket({
// FIXME Should probably have an option in net.Socket to create a
// Test: ./node test/fixtures/echo.js < /etc/passwd
stream.readable = false;
stream.read = null;
stream._type = 'pipe';
// For supporting legacy API we put the FD here.
stream.fd = fd;
startup.processStdio = function() {
stdout.destroy = stdout.destroySoon = function(er) {
er = er || new Error('process.stdout cannot be closed.');
stdout.emit('error', er);
if (stdout.isTTY) {
process.on('SIGWINCH', function() {
stderr.destroy = stderr.destroySoon = function(er) {
er = er || new Error('process.stderr cannot be closed.');
stderr.emit('error', er);
var tty_wrap = process.binding('tty_wrap');
switch (tty_wrap.guessHandleType(fd)) {
var tty = NativeModule.require('tty');
stdin = new tty.ReadStream(fd, {
var fs = NativeModule.require('fs');
stdin = new fs.ReadStream(null, { fd: fd, autoClose: false });
case 'PIPE':
case 'TCP':
var net = NativeModule.require('net');
stdin = new net.Socket({
// For supporting legacy API we put the FD here.
stdin.fd = fd;
if (stdin._handle && stdin._handle.readStop) {
stdin._handle.reading = false;
stdin._readableState.reading = false;
stdin._handle.readStop();
// if the user calls stdin.pause(), then we need to stop reading
stdin.on('pause', function() {
process.openStdin = function() {
process.stdin.resume();
return process.stdin;
startup.processKillAndExit = function() {
process.exit = function(code) {
process.emit('exit', code || 0);
process.reallyExit(code || 0);
process.kill = function(pid, sig) {
if (startup.lazyConstants()[sig] &&
sig.slice(0, 3) === 'SIG') {
r = process._kill(pid, startup.lazyConstants()[sig]);
startup.processSignalHandlers = function() {
// process.addListener.
var addListener = process.addListener;
var removeListener = process.removeListener;
return event.slice(0, 3) === 'SIG' &&
startup.lazyConstants().hasOwnProperty(event);
process.on = process.addListener = function(type, listener) {
!signalWraps.hasOwnProperty(type)) {
var Signal = process.binding('signal_wrap').Signal;
wrap.unref();
wrap.onsignal = function() { process.emit(type); };
var signum = startup.lazyConstants()[type];
var r = wrap.start(signum);
wrap.close();
return addListener.apply(this, arguments);
process.removeListener = function(type, listener) {
var ret = removeListener.apply(this, arguments);
assert(signalWraps.hasOwnProperty(type));
if (this.listeners(type).length === 0) {
signalWraps[type].close();
startup.processChannel = function() {
if (process.env.NODE_CHANNEL_FD) {
var fd = parseInt(process.env.NODE_CHANNEL_FD, 10);
delete process.env.NODE_CHANNEL_FD;
var cp = NativeModule.require('child_process');
// Load tcp_wrap to avoid situation where we might immediately receive
process.binding('tcp_wrap');
assert(process.send);
startup.resolveArgv0 = function() {
var isWindows = process.platform === 'win32';
// Make process.argv[0] into a full path, but only touch argv[0] if it's
// TODO: Make this work on Windows as well. Note that "node" might
// execute cwd\node.exe, or some %PATH%\node.exe on Windows,
// and that every directory has its own cwd, so d:node.exe is valid.
var argv0 = process.argv[0];
if (!isWindows && argv0.indexOf('/') !== -1 && argv0.charAt(0) !== '/') {
process.argv[0] = path.join(cwd, process.argv[0]);
// core modules found in lib/*.js. All core modules are compiled into the
var Script = process.binding('evals').NodeScript;
var runInThisContext = Script.runInThisContext;
this.filename = id   '.js';
this.id = id;
this.exports = {};
this.loaded = false;
NativeModule._source = process.binding('natives');
NativeModule.require = function(id) {
var cached = NativeModule.getCached(id);
return cached.exports;
if (!NativeModule.exists(id)) {
process.moduleLoadList.push('NativeModule '   id);
nativeModule.cache();
nativeModule.compile();
return nativeModule.exports;
NativeModule.getCached = function(id) {
NativeModule.exists = function(id) {
return NativeModule._source.hasOwnProperty(id);
NativeModule.getSource = function(id) {
NativeModule.wrap = function(script) {
return NativeModule.wrapper[0]   script   NativeModule.wrapper[1];
NativeModule.wrapper = [
'(function (exports, require, module, __filename, __dirname) { ',
NativeModule.prototype.compile = function() {
var source = NativeModule.getSource(this.id);
source = NativeModule.wrap(source);
var fn = runInThisContext(source, this.filename, true);
fn(this.exports, NativeModule.require, this, this.filename);
this.loaded = true;
NativeModule.prototype.cache = function() {
NativeModule._cache[this.id] = this;
inherits = util.inherits,
spawn = require('child_process').spawn;
exports.start = function(argv, stdin, stdout) {
argv || (argv = process.argv.slice(2));
if (argv.length < 1) {
console.error('Usage: node debug script.js');
process.exit(1);
stdin = stdin || process.stdin;
stdout = stdout || process.stdout;
var args = ['--debug-brk'].concat(argv),
stdin.resume();
process.on('uncaughtException', function(e) {
console.error("There was an internal error in Node's debugger. "  
'Please report this bug.');
console.error(e.message);
console.error(e.stack);
if (interface_.child) interface_.child.kill();
exports.port = 5858;
// hXXp://code.google.com/p/v8/wiki/DebuggerProtocol
// p.onResponse = function(res) {
// socket.setEncoding('utf8');
// socket.on('data', function(s) {
// // Pass strings into the protocol
// p.execute(s);
exports.Protocol = Protocol;
Protocol.prototype._newRes = function(raw) {
this.res = { raw: raw || '', headers: {} };
this.state = 'headers';
this.reqSeq = 1;
this.execute('');
Protocol.prototype.execute = function(d) {
var res = this.res;
res.raw  = d;
switch (this.state) {
var endHeaderIndex = res.raw.indexOf('\r\n\r\n');
var rawHeader = res.raw.slice(0, endHeaderIndex);
var endHeaderByteIndex = Buffer.byteLength(rawHeader, 'utf8');
var lines = rawHeader.split('\r\n');
for (var i = 0; i < lines.length; i  ) {
var kv = lines[i].split(/:  /);
res.headers[kv[0]] = kv[1];
this.contentLength =  res.headers['Content-Length'];
this.bodyStartByteIndex = endHeaderByteIndex   4;
this.state = 'body';
var len = Buffer.byteLength(res.raw, 'utf8');
if (len - this.bodyStartByteIndex < this.contentLength) {
// pass thru
var resRawByteLength = Buffer.byteLength(res.raw, 'utf8');
if (resRawByteLength - this.bodyStartByteIndex >= this.contentLength) {
buf.write(res.raw, 0, resRawByteLength, 'utf8');
res.body =
buf.slice(this.bodyStartByteIndex,
this.bodyStartByteIndex  
this.contentLength).toString('utf8');
res.body = res.body.length ? JSON.parse(res.body) : {};
this.onResponse(res);
this._newRes(buf.slice(this.bodyStartByteIndex  
this.contentLength).toString('utf8'));
Protocol.prototype.serialize = function(req) {
req.type = 'request';
req.seq = this.reqSeq  ;
var json = JSON.stringify(req);
return 'Content-Length: '   Buffer.byteLength(json, 'utf8')  
net.Stream.call(this);
var protocol = this.protocol = new Protocol(this);
this.currentFrame = NO_FRAME;
this.currentSourceLine = -1;
this.currentSource = null;
this.handles = {};
this.scripts = {};
this.breakpoints = [];
socket.setEncoding('utf8');
socket.on('data', function(d) {
protocol.execute(d);
protocol.onResponse = this._onResponse.bind(this);
inherits(Client, net.Stream);
exports.Client = Client;
Client.prototype._addHandle = function(desc) {
if (typeof desc != 'object' || typeof desc.handle != 'number') {
this.handles[desc.handle] = desc;
if (desc.type == 'script') {
var natives = process.binding('natives');
Client.prototype._addScript = function(desc) {
this.scripts[desc.id] = desc;
if (desc.name) {
desc.isNative = (desc.name.replace('.js', '') in natives) ||
desc.name == 'node.js';
Client.prototype._removeScript = function(desc) {
this.scripts[desc.id] = undefined;
Client.prototype._onResponse = function(res) {
this._reqCallbacks.some(function(fn, i) {
if (fn.request_seq == res.body.request_seq) {
if (res.headers.Type == 'connect') {
self.reqScripts();
self.emit('ready');
} else if (res.body && res.body.event == 'break') {
this.emit('break', res.body);
} else if (res.body && res.body.event == 'exception') {
this.emit('exception', res.body);
} else if (res.body && res.body.event == 'afterCompile') {
this._addHandle(res.body.body.script);
} else if (res.body && res.body.event == 'scriptCollected') {
this._removeScript(res.body.body.script);
this._reqCallbacks.splice(index, 1);
var err = res.success === false && (res.message || true) ||
res.body.success === false && (res.body.message || true);
cb(err, res.body && res.body.body || res.body, res);
if (!handled) this.emit('unhandledResponse', res.body);
Client.prototype.req = function(req, cb) {
this.write(this.protocol.serialize(req));
cb.request_seq = req.seq;
this._reqCallbacks.push(cb);
Client.prototype.reqVersion = function(cb) {
this.req({ command: 'version' } , function(err, body, res) {
cb(null, res.body.body.V8Version, res.body.running);
Client.prototype.reqLookup = function(refs, cb) {
// TODO: We have a cache of handle's we've already seen in this.handles
this.req(req, function(err, res) {
Client.prototype.reqScopes = function(cb) {
var refs = res.scopes.map(function(scope) {
return scope.object.ref;
self.reqLookup(refs, function(err, res) {
var globals = Object.keys(res).map(function(key) {
return res[key].properties.map(function(prop) {
return prop.name;
cb(null, globals.reverse());
Client.prototype.reqEval = function(expression, cb) {
if (this.currentFrame == NO_FRAME) {
this.reqFrameEval(expression, NO_FRAME, cb);
this.reqBacktrace(function(err, bt) {
if (err || !bt.frames) {
var frame = bt.frames[self.currentFrame];
var evalFrames = frame.scopes.map(function(s) {
var x = bt.frames[s.index];
return x.index;
Client.prototype._reqFramesEval = function(expression, evalFrames, cb) {
if (evalFrames.length == 0) {
var i = evalFrames.shift();
this.reqFrameEval(expression, i, function(err, res) {
Client.prototype.reqFrameEval = function(expression, frame, cb) {
req.arguments.global = true;
req.arguments.frame = frame;
Client.prototype.reqBacktrace = function(cb) {
this.req({ command: 'backtrace', arguments: { inlineRefs: true } } , cb);
Client.prototype.reqSetExceptionBreak = function(type, cb) {
this.req({
// name: 'node.js',
// text: 'node.js (lines: 562)' }
Client.prototype.reqScripts = function(cb) {
this.req({ command: 'scripts' } , function(err, res) {
for (var i = 0; i < res.length; i  ) {
Client.prototype.reqContinue = function(cb) {
this.req({ command: 'continue' }, cb);
Client.prototype.listbreakpoints = function(cb) {
this.req({ command: 'listbreakpoints' }, cb);
Client.prototype.setBreakpoint = function(req, cb) {
this.req(req, cb);
Client.prototype.clearBreakpoint = function(req, cb) {
Client.prototype.reqSource = function(from, to, cb) {
// client.next(1, cb);
Client.prototype.step = function(action, count, cb) {
Client.prototype.mirrorObject = function(handle, depth, cb) {
if (handle.type === 'object') {
// hXXps://groups.google.com/forum/?pli=1#!topic/nodejs-dev/4gkWBOimiOg
var propertyRefs = handle.properties.map(function(p) {
return p.ref;
this.reqLookup(propertyRefs, function(err, res) {
console.error('problem with reqLookup');
if (handle.className == 'Array') {
} else if (handle.className == 'Date') {
mirror = new Date(handle.value);
var keyValues = [];
handle.properties.forEach(function(prop, i) {
var value = res[prop.ref];
mirrorValue = value.value ? value.value : value.text;
if (Array.isArray(mirror) &&
typeof prop.name != 'number') {
keyValues[i] = {
name: prop.name,
if (value && value.handle && depth > 0) {
self.mirrorObject(value, depth - 1, function(err, result) {
if (!err) keyValues[i].value = result;
keyValues.forEach(function(kv) {
mirror[kv.name] = kv.value;
} else if (handle.type === 'function') {
} else if (handle.type === 'null') {
} else if (handle.value !== undefined) {
val = handle.value;
} else if (handle.type === 'undefined') {
process.nextTick(function() {
Client.prototype.fullTrace = function(cb) {
this.reqBacktrace(function(err, trace) {
if (trace.totalFrames <= 0) return cb(Error('No frames'));
for (var i = 0; i < trace.frames.length; i  ) {
var frame = trace.frames[i];
// text: '#00 blah() /home/ryan/projects/node/test-debug.js l...' }
refs.push(frame.script.ref);
refs.push(frame.func.ref);
refs.push(frame.receiver.ref);
for (var i = 0; i < trace.frames.length; i  ) {
var frame = trace.frames[i];
frame.script = res[frame.script.ref];
frame.func = res[frame.func.ref];
frame.receiver = res[frame.receiver.ref];
var helpMessage = 'Commands: '   commands.map(function(group) {
return group.join(', ');
}).join(',\n');
var head = sourceText.slice(0, position),
tail = sourceText.slice(position);
// Colourize char if stdout supports colours
if (repl.useColors) {
tail = tail.replace(/(. ?)([^\w]|$)/, '\u001b[32m$1\u001b[39m$2');
].join('');
var result = body.exception ? 'exception in ' : 'break in ';
if (body.script) {
if (body.script.name) {
var name = body.script.name,
dir = path.resolve()   '/';
if (name.indexOf(dir) === 0) {
name = name.slice(dir.length);
result  = body.sourceLine   1;
if (body.exception) result  = '\n'   body.exception.text;
this.stdin = stdin;
this.stdout = stdout;
this.args = args;
input: this.stdin,
output: this.stdout,
eval: this.controlEval.bind(this),
if (parseInt(process.env['NODE_NO_READLINE'], 10)) {
opts.terminal = false;
} else if (parseInt(process.env['NODE_FORCE_READLINE'], 10)) {
opts.terminal = true;
if (!this.stdout.isTTY) {
process.on('SIGINT', function() {
self.repl.rli.emit('SIGINT');
if (parseInt(process.env['NODE_DISABLE_COLORS'], 10)) {
opts.useColors = false;
this.repl = repl.start(opts);
repl._builtinLibs.splice(repl._builtinLibs.indexOf('repl'), 1);
this.repl.on('exit', function() {
process.exit(0);
process.on('exit', this.killChild.bind(this));
process.once('SIGTERM', process.exit.bind(process, 0));
process.once('SIGHUP', process.exit.bind(process, 0));
var proto = Interface.prototype,
function defineProperty(key, protoKey) {
var fn = proto[protoKey].bind(self);
if (proto[protoKey].length === 0) {
Object.defineProperty(self.repl.context, key, {
self.repl.context[key] = fn;
if (Object.prototype.hasOwnProperty.call(proto, i) &&
ignored.indexOf(i) === -1) {
this.killed = false;
this.waiting = null;
this.paused = 0;
this.context = this.repl.context;
this.history = {
this.pause();
self.run(function() {
self.resume();
Interface.prototype.pause = function() {
if (this.killed || this.paused   > 0) return false;
this.repl.rli.pause();
this.stdin.pause();
Interface.prototype.resume = function(silent) {
if (this.killed || this.paused === 0 || --this.paused !== 0) return false;
this.repl.rli.resume();
this.repl.displayPrompt();
this.stdin.resume();
if (this.waiting) {
this.waiting();
this.waiting = null;
Interface.prototype.clearline = function() {
if (this.stdout.isTTY) {
this.stdout.cursorTo(0);
this.stdout.clearLine(1);
this.stdout.write('\b');
Interface.prototype.print = function(text, oneline) {
if (this.killed) return;
this.clearline();
this.stdout.write(typeof text === 'string' ? text : util.inspect(text));
this.stdout.write('\n');
Interface.prototype.childPrint = function(text) {
this.print(text.toString().split(/\r\n|\r|\n/g).filter(function(chunk) {
}).map(function(chunk) {
}).join('\n'));
this.repl.displayPrompt(true);
Interface.prototype.error = function(text) {
this.print(text);
this.resume();
Interface.prototype.handleBreak = function(r) {
// Save execution context's data
this.client.currentSourceLine = r.sourceLine;
this.client.currentSourceLineText = r.sourceLineText;
this.client.currentSourceColumn = r.sourceColumn;
this.client.currentFrame = 0;
this.client.currentScript = r.script && r.script.name;
this.print(SourceInfo(r));
this.watchers(true, function(err) {
if (err) return self.error(err);
self.list(2);
self.resume(true);
Interface.prototype.requireConnection = function() {
if (!this.client) {
this.error('App isn\'t running... Try `run` instead');
// Used for debugger's commands evaluation and execution
Interface.prototype.controlEval = function(code, context, filename, callback) {
if (this.repl.rli.history && this.repl.rli.history.length > 0) {
code = '('   this.repl.rli.history[0]   '\n)';
var result = vm.runInContext(code, context, filename);
if (this.paused === 0) return callback(null, result);
// (it will be automatically invoked by .resume() method
this.waiting = function() {
Interface.prototype.debugEval = function(code, context, filename, callback) {
if (!this.requireConnection()) return;
client = this.client;
if (code === '.scope') {
client.reqScopes(callback);
var frame = client.currentFrame === NO_FRAME ? frame : undefined;
self.pause();
client.reqFrameEval(code, frame, function(err, res) {
self.resume(true);
client.mirrorObject(res, 3, function(err, mirror) {
function leftPad(n, prefix) {
var s = n.toString(),
nspaces = nchars - s.length - 1;
Interface.prototype.help = function() {
this.print(helpMessage);
Interface.prototype.run = function() {
if (this.child) {
this.error('App is already running... Try `restart` instead');
this.trySpawn(callback);
Interface.prototype.restart = function() {
self.killChild();
self.trySpawn();
self.resume();
}, 1000);
Interface.prototype.version = function() {
this.client.reqVersion(function(err, v) {
self.error(err);
self.print(v);
Interface.prototype.list = function(delta) {
client = this.client,
from = client.currentSourceLine - delta   1,
to = client.currentSourceLine   delta   1;
client.reqSource(from, to, function(err, res) {
self.error('You can\'t list source code right now');
var lines = res.source.split('\n');
for (var i = 0; i < lines.length; i  ) {
var lineno = res.fromLine   i   1;
var current = lineno == 1   client.currentSourceLine,
breakpoint = client.breakpoints.some(function(bp) {
return (bp.scriptReq === client.currentScript ||
bp.script === client.currentScript) &&
bp.line == lineno;
var wrapper = require('module').wrapper[0];
lines[i] = lines[i].slice(wrapper.length);
client.currentSourceColumn -= wrapper.length;
// Highlight executing statement
client.currentSourceColumn,
self.repl);
self.print(leftPad(lineno, breakpoint && '*')   ' '   line);
Interface.prototype.backtrace = function() {
client.fullTrace(function(err, bt) {
self.error('Can\'t request backtrace now');
if (bt.totalFrames == 0) {
self.print('(empty stack)');
firstFrameNative = bt.frames[0].script.isNative;
for (var i = 0; i < bt.frames.length; i  ) {
var frame = bt.frames[i];
if (!firstFrameNative && frame.script.isNative) break;
if (frame.func.inferredName && frame.func.inferredName.length > 0) {
text  = frame.func.inferredName   ' ';
text  = path.basename(frame.script.name)   ':';
text  = (frame.line   1)   ':'   (frame.column   1);
trace.push(text);
self.print(trace.join('\n'));
Interface.prototype.scripts = function() {
var client = this.client,
for (var id in client.scripts) {
var script = client.scripts[id];
if (typeof script == 'object' && script.name) {
script.name == client.currentScript ||
!script.isNative) {
scripts.push(
(script.name == client.currentScript ? '* ' : ' ')  
path.basename(script.name)
this.print(scripts.join('\n'));
// Continue execution of script
Interface.prototype.cont = function() {
this.client.reqContinue(function(err) {
if (err) self.error(err);
Interface.stepGenerator = function(type, count) {
if (!this.requireConnection()) return;
self.pause();
self.client.step(type, count, function(err, res) {
if (err) self.error(err);
Interface.prototype.next = Interface.stepGenerator('next', 1);
Interface.prototype.step = Interface.stepGenerator('in', 1);
Interface.prototype.out = Interface.stepGenerator('out', 1);
Interface.prototype.watch = function(expr) {
this._watchers.push(expr);
Interface.prototype.unwatch = function(expr) {
var index = this._watchers.indexOf(expr);
this._watchers.splice(index !== -1 ? index :  expr, 1);
Interface.prototype.watchers = function() {
waiting = this._watchers.length,
this.resume();
this._watchers.forEach(function(watcher, i) {
self.debugEval(watcher, null, null, function(err, value) {
if (verbose) self.print('Watchers:');
self._watchers.forEach(function(watcher, i) {
self.print(leftPad(i, ' ')   ': '   watcher   ' = '  
JSON.stringify(values[i]));
if (verbose) self.print('');
Interface.prototype.breakOnException = function breakOnException() {
this.client.reqSetExceptionBreak('all', function(err, res) {
Interface.prototype.setBreakpoint = function(script, line,
script = this.client.currentScript;
line = this.client.currentSourceLine   1;
if (/\(\)$/.test(script)) {
target: script.replace(/\(\)$/, ''),
if (script !=  script && !this.client.scripts[script]) {
var scripts = this.client.scripts;
Object.keys(scripts).forEach(function(id) {
scripts[id].name &&
scripts[id].name.indexOf(script) !== -1) {
if (ambiguous) return this.error('Script name is ambiguous');
if (line <= 0) return this.error('Line should be a positive value');
this.print('Warning: script \''   script   '\' was not loaded yet.');
var escapedPath = script.replace(/([/\\.?*()^${}|[\]])/g, '\\$1');
self.client.setBreakpoint(req, function(err, res) {
self.error(err);
self.list(5);
scriptId = res.script_id;
line = res.line   1;
self.client.breakpoints.push({
id: res.breakpoint,
script: (self.client.scripts[scriptId] || {}).name,
Interface.prototype.clearBreakpoint = function(script, line) {
this.client.breakpoints.some(function(bp, i) {
if (bp.scriptId === script ||
bp.scriptReq === script ||
(bp.script && bp.script.indexOf(script) !== -1)) {
if (bp.line === line) {
breakpoint = bp.id;
if (ambiguous) return this.error('Script name is ambiguous');
return this.error('Script : '   script   ' not found');
self.client.clearBreakpoint(req, function(err, res) {
self.client.breakpoints.splice(index, 1);
self.list(5);
Interface.prototype.breakpoints = function() {
this.client.listbreakpoints(function(err, res) {
self.print(res);
Interface.prototype.pause_ = function() {
cmd = 'process._debugPause();';
this.client.reqFrameEval(cmd, NO_FRAME, function(err, res) {
Interface.prototype.kill = function() {
if (!this.child) return;
this.killChild();
Interface.prototype.repl = function() {
self.print('Press Ctrl   C to leave debug repl');
var listeners = this.repl.rli.listeners('SIGINT').slice(0);
this.repl.rli.removeAllListeners('SIGINT');
this.repl.rli.once('SIGINT', function() {
process.nextTick(function() {
listeners.forEach(function(listener) {
self.repl.rli.on('SIGINT', listener);
self.exitRepl();
this.repl.eval = this.debugEval.bind(this);
this.repl.context = {};
this.history.control = this.repl.rli.history;
this.repl.rli.history = this.history.debug;
this.repl.prompt = '> ';
this.repl.rli.setPrompt('> ');
this.repl.displayPrompt();
Interface.prototype.exitRepl = function() {
this.repl.eval = this.controlEval.bind(this);
this.history.debug = this.repl.rli.history;
this.repl.rli.history = this.history.control;
this.repl.context = this.context;
this.repl.prompt = 'debug> ';
this.repl.rli.setPrompt('debug> ');
Interface.prototype.quit = function() {
process.exit(0);
Interface.prototype.killChild = function() {
this.child.kill();
this.child = null;
if (this.client) {
this.breakpoints = this.client.breakpoints;
this.client.destroy();
this.client = null;
Interface.prototype.trySpawn = function(cb) {
breakpoints = this.breakpoints || [],
port = exports.port,
childArgs = this.args;
if (this.args.length === 2) {
var match = this.args[1].match(/^([^:] ):(\d )$/);
port = parseInt(match[2], 10);
this.child = {
} else if (this.args.length === 3) {
if (this.args[1] === '-p' && /^\d $/.test(this.args[2])) {
process._debugProcess(parseInt(this.args[2], 10));
var match = this.args[1].match(/^--port=(\d )$/);
// Start debugger on custom port
// `node debug --port=5858 app.js`
port = parseInt(match[1], 10);
childArgs = ['--debug-brk='   port].concat(this.args.slice(2));
if (!this.child) {
this.child = spawn(process.execPath, childArgs);
this.child.stdout.on('data', this.childPrint.bind(this));
this.child.stderr.on('data', this.childPrint.bind(this));
var client = self.client = new Client(),
client.once('ready', function() {
self.stdout.write(' ok\n');
breakpoints.forEach(function(bp) {
self.print('Restoring breakpoint '   bp.scriptReq   ':'   bp.line);
self.setBreakpoint(bp.scriptReq, bp.line, bp.condition, true);
client.on('close', function() {
self.pause();
self.print('program terminated');
self.client = null;
self.killChild();
client.on('unhandledResponse', function(res) {
self.print('\nunhandled res:'   JSON.stringify(res));
client.on('break', function(res) {
self.handleBreak(res.body);
client.on('exception', function(res) {
client.on('error', connectError);
client.removeListener('error', connectError);
self.stdout.write('.');
client.connect(port, host);
self.print('connecting..', true);
exports.init = init;
exports.peek = peek;
exports.shift = shift;
exports.remove = remove;
exports.append = append;
exports.isEmpty = isEmpty;
// hXXp://wiki.commonjs.org/wiki/Unit_Testing/1.0
// Originally from narwhal.js (hXXp://narwhaljs.org)
// Copyright (c) 2009 Thomas Robinson <280north.com>
// all copies or substantial portions of the Software.
var pSlice = Array.prototype.slice;
var assert = module.exports = ok;
// new assert.AssertionError({ message: message,
assert.AssertionError = function AssertionError(options) {
this.name = 'AssertionError';
this.actual = options.actual;
this.expected = options.expected;
this.operator = options.operator;
this.message = options.message || getMessage(this);
var stackStartFunction = options.stackStartFunction || fail;
Error.captureStackTrace(this, stackStartFunction);
// assert.AssertionError instanceof Error
util.inherits(assert.AssertionError, Error);
function replacer(key, value) {
return value.toString();
return s.length < n ? s : s.slice(0, n);
return truncate(JSON.stringify(self.actual, replacer), 128)   ' '  
self.operator   ' '  
truncate(JSON.stringify(self.expected, replacer), 128);
// At present only the three keys mentioned above are used and
// understood by the spec. Implementations or sub modules can pass
// other keys to the AssertionError's constructor - they will be
function fail(actual, expected, message, operator, stackStartFunction) {
throw new assert.AssertionError({
operator: operator,
assert.fail = fail;
// assert.ok(guard, message_opt);
// This statement is equivalent to assert.equal(true, !!guard,
// assert.strictEqual(true, guard, message_opt);.
if (!!!value) fail(value, true, message, '==', assert.ok);
assert.ok = ok;
// assert.equal(actual, expected, message_opt);
assert.equal = function equal(actual, expected, message) {
if (actual != expected) fail(actual, expected, message, '==', assert.equal);
// with != assert.notEqual(actual, expected, message_opt);
assert.notEqual = function notEqual(actual, expected, message) {
fail(actual, expected, message, '!=', assert.notEqual);
// assert.deepEqual(actual, expected, message_opt);
assert.deepEqual = function deepEqual(actual, expected, message) {
fail(actual, expected, message, 'deepEqual', assert.deepEqual);
} else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {
if (actual.length != expected.length) return false;
for (var i = 0; i < actual.length; i  ) {
return actual.getTime() === expected.getTime();
return actual.source === expected.source &&
actual.global === expected.global &&
actual.multiline === expected.multiline &&
actual.lastIndex === expected.lastIndex &&
actual.ignoreCase === expected.ignoreCase;
// 7.4. Other pairs that do not both pass typeof value == 'object',
// with Object.prototype.hasOwnProperty.call), the same set of keys
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
return Object.prototype.toString.call(object) == '[object Arguments]';
if (a.prototype !== b.prototype) return false;
//~~~I've managed to break Object.keys through screwy arguments passing.
a = pSlice.call(a);
b = pSlice.call(b);
var ka = Object.keys(a),
kb = Object.keys(b),
key, i;
// having the same number of owned properties (keys incorporates
if (ka.length != kb.length)
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
//equivalent values for every corresponding key, and
key = ka[i];
if (!_deepEqual(a[key], b[key])) return false;
// assert.notDeepEqual(actual, expected, message_opt);
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
// assert.strictEqual(actual, expected, message_opt);
assert.strictEqual = function strictEqual(actual, expected, message) {
fail(actual, expected, message, '===', assert.strictEqual);
// determined by !==. assert.notStrictEqual(actual, expected, message_opt);
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
fail(actual, expected, message, '!==', assert.notStrictEqual);
if (Object.prototype.toString.call(expected) == '[object RegExp]') {
return expected.test(actual);
} else if (expected.call({}, actual) === true) {
message = (expected && expected.name ? ' ('   expected.name   ').' : '.')  
// assert.throws(block, Error_opt, message_opt);
assert.throws = function(block, /*optional*/error, /*optional*/message) {
_throws.apply(this, [true].concat(pSlice.call(arguments)));
assert.doesNotThrow = function(block, /*optional*/message) {
_throws.apply(this, [false].concat(pSlice.call(arguments)));
assert.ifError = function(err) { if (err) {throw err;}};
var SlowBuffer = process.binding('buffer').SlowBuffer;
exports.INSPECT_MAX_BYTES = 50;
SlowBuffer.prototype.__proto__ = Buffer.prototype;
if (n < 16) return '0'   n.toString(16);
return n.toString(16);
SlowBuffer.prototype.toString = function(encoding, start, end) {
encoding = String(encoding || 'utf8').toLowerCase();
if (typeof end !== 'number') end = this.length;
return this.hexSlice(start, end);
return this.utf8Slice(start, end);
return this.asciiSlice(start, end);
return this.binarySlice(start, end);
return this.base64Slice(start, end);
return this.ucs2Slice(start, end);
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
// Support both (string, offset, length, encoding)
var remaining = this.length - offset;
return this.hexWrite(string, offset, length);
return this.utf8Write(string, offset, length);
return this.asciiWrite(string, offset, length);
return this.binaryWrite(string, offset, length);
return this.base64Write(string, offset, length);
return this.ucs2Write(string, offset, length);
SlowBuffer.prototype.slice = function(start, end) {
var len = this.length;
if (!Buffer.isBuffer(subject)) {
this.length =  encoding > 0 ? Math.ceil(encoding) : 0;
this.parent = subject.parent ? subject.parent : subject;
this.offset = offset;
this.length =  subject > 0 ? Math.ceil(subject) : 0;
this.length = Buffer.byteLength(subject, encoding);
this.length =  subject.length > 0 ? Math.ceil(subject.length) : 0;
if (this.length > Buffer.poolSize) {
this.parent = new SlowBuffer(this.length);
this.offset = 0;
} else if (this.length > 0) {
if (!pool || pool.length - pool.used < this.length) allocPool();
this.parent = pool;
this.offset = pool.used;
pool.used = (pool.used   this.length   7) & ~7;
this.parent = zeroBuffer;
this.length = this.write(subject, 0, encoding);
} else if (Buffer.isBuffer(subject)) {
if (subject.parent)
subject.parent.copy(this.parent,
this.offset,
subject.offset,
this.length   subject.offset);
subject.copy(this.parent, this.offset, 0, this.length);
for (var i = 0; i < this.length; i  )
this.parent[i   this.offset] = subject[i];
SlowBuffer.makeFastBuffer(this.parent, this, this.offset, this.length);
return Array.isArray(subject) ||
typeof subject.length === 'number';
exports.SlowBuffer = SlowBuffer;
exports.Buffer = Buffer;
Buffer.isEncoding = function(encoding) {
switch (encoding && encoding.toLowerCase()) {
Buffer.poolSize = 8 * 1024;
pool = new SlowBuffer(Buffer.poolSize);
pool.used = 0;
Buffer.isBuffer = function isBuffer(b) {
Buffer.prototype.inspect = function inspect() {
len = this.length,
name = this.constructor.name;
if (i == exports.INSPECT_MAX_BYTES) {
return '<'   name   ' '   out.join(' ')   '>';
Buffer.prototype.get = function get(offset) {
if (offset < 0 || offset >= this.length)
return this.parent[this.offset   offset];
Buffer.prototype.set = function set(offset, v) {
return this.parent[this.offset   offset] = v;
// write(string, offset = 0, length = buffer.length-offset, encoding = 'utf8')
Buffer.prototype.write = function(string, offset, length, encoding) {
if (string.length > 0 && (length < 0 || offset < 0))
ret = this.parent.hexWrite(string, this.offset   offset, length);
ret = this.parent.utf8Write(string, this.offset   offset, length);
ret = this.parent.asciiWrite(string, this.offset   offset, length);
ret = this.parent.binaryWrite(string, this.offset   offset, length);
ret = this.parent.base64Write(string, this.offset   offset, length);
ret = this.parent.ucs2Write(string, this.offset   offset, length);
Buffer.prototype.toJSON = function() {
return Array.prototype.slice.call(this, 0);
// toString(encoding, start=0, end=buffer.length)
Buffer.prototype.toString = function(encoding, start, end) {
} else if (start > this.length) {
start = this.length;
if (typeof end !== 'number' || end > this.length) {
end = this.length;
start = start   this.offset;
end = end   this.offset;
return this.parent.hexSlice(start, end);
return this.parent.utf8Slice(start, end);
return this.parent.asciiSlice(start, end);
return this.parent.binarySlice(start, end);
return this.parent.base64Slice(start, end);
return this.parent.ucs2Slice(start, end);
Buffer.byteLength = SlowBuffer.byteLength;
// fill(value, start=0, end=buffer.length)
Buffer.prototype.fill = function fill(value, start, end) {
end || (end = this.length);
value = value.charCodeAt(0);
if (this.length == 0) return 0;
if (start < 0 || start >= this.length) {
if (end < 0 || end > this.length) {
return this.parent.fill(value,
start   this.offset,
end   this.offset);
Buffer.concat = function(list, length) {
if (!Array.isArray(list)) {
throw new TypeError('Usage: Buffer.concat(list, [length])');
if (list.length === 0) {
} else if (list.length === 1) {
for (var i = 0; i < list.length; i  ) {
length  = buf.length;
for (var i = 0; i < list.length; i  ) {
buf.copy(buffer, pos);
pos  = buf.length;
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function(target, target_start, start, end) {
if (!(end < this.length)) end = this.length;
target.length === 0 ||
this.length === 0 ||
start > this.length)
if (target_start >= target.length)
if (target.length - target_start < end - start)
end = target.length - target_start   start;
return this.parent.copy(target.parent || target,
target_start   (target.offset || 0),
Buffer.prototype.slice = function(start, end) {
return new Buffer(this.parent, end - start, start   this.offset);
Buffer.prototype.utf8Slice = function(start, end) {
return this.toString('utf8', start, end);
Buffer.prototype.binarySlice = function(start, end) {
return this.toString('binary', start, end);
Buffer.prototype.asciiSlice = function(start, end) {
return this.toString('ascii', start, end);
Buffer.prototype.utf8Write = function(string, offset) {
return this.write(string, offset, 'utf8');
Buffer.prototype.binaryWrite = function(string, offset) {
return this.write(string, offset, 'binary');
Buffer.prototype.asciiWrite = function(string, offset) {
return this.write(string, offset, 'ascii');
Buffer.prototype.readUInt8 = function(offset, noAssert) {
checkOffset(offset, 1, this.length);
Buffer.prototype.readUInt16LE = function(offset, noAssert) {
checkOffset(offset, 2, this.length);
Buffer.prototype.readUInt16BE = function(offset, noAssert) {
Buffer.prototype.readUInt32LE = function(offset, noAssert) {
checkOffset(offset, 4, this.length);
Buffer.prototype.readUInt32BE = function(offset, noAssert) {
* -65409
* in a rather Javascript friendly way. I'm glad we don't support this kind of
Buffer.prototype.readInt8 = function(offset, noAssert) {
Buffer.prototype.readInt16LE = function(offset, noAssert) {
Buffer.prototype.readInt16BE = function(offset, noAssert) {
Buffer.prototype.readInt32LE = function(offset, noAssert) {
Buffer.prototype.readInt32BE = function(offset, noAssert) {
Buffer.prototype.readFloatLE = function(offset, noAssert) {
return this.parent.readFloatLE(this.offset   offset, !!noAssert);
Buffer.prototype.readFloatBE = function(offset, noAssert) {
return this.parent.readFloatBE(this.offset   offset, !!noAssert);
Buffer.prototype.readDoubleLE = function(offset, noAssert) {
checkOffset(offset, 8, this.length);
return this.parent.readDoubleLE(this.offset   offset, !!noAssert);
Buffer.prototype.readDoubleBE = function(offset, noAssert) {
return this.parent.readDoubleBE(this.offset   offset, !!noAssert);
if (offset   ext > buffer.length || buffer.length   offset < 0)
Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
* our representation and pass that off to the wuint* functions. To do that
* we can pass it directly off to the equivalent wuint
Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
this.parent.writeFloatLE(value, this.offset   offset, !!noAssert);
Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
this.parent.writeFloatBE(value, this.offset   offset, !!noAssert);
Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
this.parent.writeDoubleLE(value, this.offset   offset, !!noAssert);
Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
this.parent.writeDoubleBE(value, this.offset   offset, !!noAssert);
var StringDecoder = require('string_decoder').StringDecoder;
var EventEmitter = require('events').EventEmitter;
var Process = process.binding('process_wrap').Process;
var constants; // if (!constants) constants = process.binding('constants');
Object.defineProperty(handleWraps, name, {
handleWrapGetter('Pipe', function() {
return process.binding('pipe_wrap').Pipe;
return process.binding('tty_wrap').TTY;
handleWrapGetter('TCP', function() {
return process.binding('tcp_wrap').TCP;
handleWrapGetter('UDP', function() {
return process.binding('udp_wrap').UDP;
function createPipe(ipc) {
return new handleWraps.Pipe(ipc);
function createSocket(pipe, readable) {
var s = new net.Socket({ handle: pipe });
s.writable = false;
s.readable = true;
s.writable = true;
s.readable = false;
// this object contain function to convert TCP objects to native handle objects
'net.Native': {
'net.Server': {
var server = new net.Server();
server.listen(handle, function() {
'net.Socket': {
// if the socket was created by net.Server
if (socket.server) {
message.key = socket.server._connectionKey;
var firstTime = !this._channel.sockets.send[message.key];
var socketList = getSocketList('send', this, message.key);
// the server should no longer expose a .connection property
if (firstTime) socket.server._setupSlave(socketList);
socket.server._connections--;
handle.onread = function() {};
handle.close();
var socket = new net.Socket({handle: handle});
socket.readable = socket.writable = true;
// if the socket was created by net.Server we will track the socket
if (message.key) {
var socketList = getSocketList('got', this, message.key);
socketList.add({
'dgram.Native': {
'dgram.Socket': {
message.dgramType = socket.type;
var socket = new dgram.Socket(message.dgramType);
socket.bind(handle, function() {
function SocketListSend(slave, key) {
EventEmitter.call(this);
this.key = key;
this.slave = slave;
util.inherits(SocketListSend, EventEmitter);
SocketListSend.prototype._request = function(msg, cmd, callback) {
if (!this.slave.connected) return onclose();
this.slave.send(msg);
self.slave.removeListener('internalMessage', onreply);
function onreply(msg) {
if (!(msg.cmd === cmd && msg.key === self.key)) return;
self.slave.removeListener('disconnect', onclose);
callback(null, msg);
this.slave.once('disconnect', onclose);
this.slave.on('internalMessage', onreply);
SocketListSend.prototype.close = function close(callback) {
cmd: 'NODE_SOCKET_NOTIFY_CLOSE',
key: this.key
SocketListSend.prototype.getConnections = function getConnections(callback) {
cmd: 'NODE_SOCKET_GET_COUNT',
}, 'NODE_SOCKET_COUNT', function(err, msg) {
callback(null, msg.count);
function SocketListReceive(slave, key) {
this.connections = 0;
if (!self.slave.connected) return;
self.slave.send({
cmd: 'NODE_SOCKET_ALL_CLOSED',
key: self.key
this.slave.on('internalMessage', function(msg) {
if (msg.key !== self.key) return;
if (msg.cmd === 'NODE_SOCKET_NOTIFY_CLOSE') {
if (self.connections === 0) return onempty();
self.once('empty', onempty);
} else if (msg.cmd === 'NODE_SOCKET_GET_COUNT') {
if (!self.slave.connected) return;
self.slave.send({
cmd: 'NODE_SOCKET_COUNT',
key: self.key,
count: self.connections
util.inherits(SocketListReceive, EventEmitter);
SocketListReceive.prototype.add = function(obj) {
this.connections  ;
obj.socket.once('close', function() {
self.connections--;
if (self.connections === 0) self.emit('empty');
function getSocketList(type, slave, key) {
var sockets = slave._channel.sockets[type];
var socketList = sockets[key];
socketList = sockets[key] = new Construct(slave, key);
typeof message.cmd === 'string' &&
message.cmd.length > INTERNAL_PREFIX.length &&
message.cmd.slice(0, INTERNAL_PREFIX.length) === INTERNAL_PREFIX) {
target.emit(eventName, message, handle);
channel.buffering = false;
channel.onread = function(pool, offset, length, recvHandle) {
jsonBuffer  = decoder.write(pool.slice(offset, offset   length));
while ((i = jsonBuffer.indexOf('\n', start)) >= 0) {
var json = jsonBuffer.slice(start, i);
var message = JSON.parse(json);
if (message && message.cmd === 'NODE_HANDLE')
jsonBuffer = jsonBuffer.slice(start);
this.buffering = jsonBuffer.length !== 0;
this.buffering = false;
target.disconnect();
channel.onread = nop;
channel.close();
channel.sockets = { got: {}, send: {} };
target.on('internalMessage', function(message, handle) {
if (message.cmd === 'NODE_HANDLE_ACK') {
assert(Array.isArray(target._handleQueue));
queue.forEach(function(args) {
target.send(args.message, args.handle);
if (message.cmd !== 'NODE_HANDLE') return;
target.send({ cmd: 'NODE_HANDLE_ACK' });
var obj = handleConversion[message.type];
// Update simultaneous accepts on Windows
if (process.platform === 'win32') {
obj.got.call(this, message, handle, function(handle) {
handleMessage(target, message.msg, handle);
target.send = function(message, handle) {
if (!this.connected) {
this.emit('error', new Error('channel closed'));
cmd: 'NODE_HANDLE',
msg: message
if (handle instanceof net.Socket) {
message.type = 'net.Socket';
} else if (handle instanceof net.Server) {
message.type = 'net.Server';
} else if (handle instanceof process.binding('tcp_wrap').TCP ||
handle instanceof process.binding('pipe_wrap').Pipe) {
message.type = 'net.Native';
} else if (handle instanceof dgram.Socket) {
message.type = 'dgram.Socket';
} else if (handle instanceof process.binding('udp_wrap').UDP) {
message.type = 'dgram.Native';
this._handleQueue.push({ message: message.msg, handle: handle });
var obj = handleConversion[message.type];
// convert TCP object to native handle object
handle = handleConversion[message.type].send.apply(target, arguments);
message = message.msg;
// Update simultaneous accepts on Windows
if (obj.simultaneousAccepts) {
!(message && message.cmd === 'NODE_HANDLE_ACK')) {
this._handleQueue.push({ message: message, handle: null });
var string = JSON.stringify(message)   '\n';
var writeReq = channel.writeUtf8String(string, handle);
this.emit('error', er);
if (obj && obj.postSend) {
writeReq.oncomplete = obj.postSend.bind(null, handle);
writeReq.oncomplete = nop;
return channel.writeQueueSize < (65536 * 2);
target.connected = true;
target.disconnect = function() {
this.emit('error', new Error('IPC channel is already disconnected'));
this.connected = false;
target.emit('disconnect');
if (channel.buffering) {
this.once('message', finish);
this.once('internalMessage', finish);
channel.readStart();
exports.fork = function(modulePath /*, args, options*/) {
var options, args, execArgv;
if (Array.isArray(arguments[1])) {
execArgv = options.execArgv || process.execArgv;
args = execArgv.concat([modulePath], args);
options.stdio = options.silent ? ['pipe', 'pipe', 'pipe', 'ipc'] :
options.execPath = options.execPath || process.execPath;
return spawn(options.execPath, args, options);
exports._forkChild = function(fd) {
// set process.send()
var p = createPipe(true);
p.open(fd);
p.unref();
process.on('newListener', function(name) {
if (  refs === 1) p.ref();
process.on('removeListener', function(name) {
if (--refs === 0) p.unref();
exports.exec = function(command /*, options, callback */) {
if (process.platform === 'win32') {
file = 'cmd.exe';
options.windowsVerbatimArguments = true;
return exports.execFile(file, args, options, callback);
exports.execFile = function(file /* args, options, callback */) {
if (typeof arguments[arguments.length - 1] === 'function') {
callback = arguments[arguments.length - 1];
cwd: options.cwd,
env: options.env,
windowsVerbatimArguments: !!options.windowsVerbatimArguments
e.killed = child.killed || killed;
e.code = code;
e.signal = signal;
child.stdout.destroy();
child.stderr.destroy();
child.kill(options.killSignal);
if (options.timeout > 0) {
}, options.timeout);
child.stdout.setEncoding(options.encoding);
child.stderr.setEncoding(options.encoding);
child.stdout.addListener('data', function(chunk) {
if (stdout.length > options.maxBuffer) {
child.stderr.addListener('data', function(chunk) {
if (stderr.length > options.maxBuffer) {
child.addListener('close', exithandler);
child.addListener('error', errorhandler);
var spawn = exports.spawn = function(file /*, args, options*/) {
args = arguments[1].slice(0);
} else if (arguments[1] && !Array.isArray(arguments[1])) {
args.unshift(file);
var env = (options && options.env ? options.env : null) || process.env;
for (var key in env) {
envPairs.push(key   '='   env[key]);
if (options && options.customFds && !options.stdio) {
options.stdio = options.customFds.map(function(fd) {
return fd === -1 ? 'pipe' : fd;
child.spawn({
cwd: options ? options.cwd : null,
windowsVerbatimArguments: !!(options && options.windowsVerbatimArguments),
detached: !!(options && options.detached),
stdio: options ? options.stdio : null,
uid: options ? options.uid : null,
gid: options ? options.gid : null
subprocess.emit('close', subprocess.exitCode, subprocess.signalCode);
// Initialize TCPWrap and PipeWrap
process.binding('tcp_wrap');
process.binding('pipe_wrap');
this.connected = false;
this.signalCode = null;
this.exitCode = null;
this._handle.owner = this;
this._handle.onexit = function(exitCode, signalCode) {
// - normally terminated processes don't touch this.signalCode
// - signaled processes don't touch this.exitCode
// - spawn failures are reported with exitCode == -1
self.signalCode = signalCode;
self.exitCode = exitCode;
if (self.stdin) {
self.stdin.destroy();
self._handle.close();
self.emit('error', err);
self.emit('exit', self.exitCode, self.signalCode);
util.inherits(ChildProcess, EventEmitter);
subprocess.stdio.forEach(function(stream, fd, stdio) {
if (!stream || !stream.readable || stream._consuming ||
stream._readableState.flowing)
stream.resume();
if (stream instanceof handleWraps.Pipe) return 'pipe';
if (stream instanceof handleWraps.TTY) return 'tty';
if (stream instanceof handleWraps.TCP) return 'tcp';
if (stream instanceof handleWraps.UDP) return 'udp';
ChildProcess.prototype.spawn = function(options) {
stdio = options.stdio || 'pipe';
case 'pipe': stdio = ['pipe', 'pipe', 'pipe']; break;
} else if (!Array.isArray(stdio)) {
// stdio.reduce() would skip the sparse elements of stdio.
// See hXXp://stackoverflow.com/a/5501711/3561
while (stdio.length < 3) stdio.push(undefined);
// (i.e. PipeWraps or fds)
stdio = stdio.reduce(function(acc, stdio, i) {
acc.filter(function(stdio) {
return stdio.type === 'pipe' || stdio.type === 'ipc';
}).forEach(function(stdio) {
stdio.handle.close();
stdio = i < 3 ? 'pipe' : 'ignore';
acc.push({type: 'ignore'});
} else if (stdio === 'pipe' || typeof stdio === 'number' && stdio < 0) {
acc.push({type: 'pipe', handle: createPipe()});
// Cleanup previously created pipes
throw Error('Child process can have only one IPC pipe');
ipc = createPipe(true);
acc.push({ type: 'pipe', handle: ipc, ipc: true });
} else if (typeof stdio === 'number' || typeof stdio.fd === 'number') {
acc.push({ type: 'fd', fd: stdio.fd || stdio });
} else if (getHandleWrapType(stdio) || getHandleWrapType(stdio.handle) ||
getHandleWrapType(stdio.handle) ? stdio.handle : stdio._handle;
acc.push({
options.stdio = stdio;
options.envPairs = options.envPairs || [];
options.envPairs.push('NODE_CHANNEL_FD='   ipcFd);
var r = this._handle.spawn(options);
stdio.forEach(function(stdio) {
if (stdio.type === 'pipe') {
this._handle.close();
this.pid = this._handle.pid;
stdio.forEach(function(stdio, i) {
if (stdio.type === 'ignore') return;
if (stdio.ipc) {
if (stdio.handle) {
// (which is the only one writable pipe)
stdio.socket = createSocket(self.pid !== 0 ? stdio.handle : null, i > 0);
if (i > 0 && self.pid !== 0) {
stdio.socket.on('close', function() {
this.stdin = stdio.length >= 1 && stdio[0].socket !== undefined ?
stdio[0].socket : null;
this.stdout = stdio.length >= 2 && stdio[1].socket !== undefined ?
stdio[1].socket : null;
this.stderr = stdio.length >= 3 && stdio[2].socket !== undefined ?
stdio[2].socket : null;
this.stdio = stdio.map(function(stdio) {
return stdio.socket === undefined ? null : stdio.socket;
// Add .send() method and start listening for IPC data
function errnoException(errorno, syscall, errmsg) {
// TODO make this more compatible with ErrnoException from src/node.cc
// src/node.cc should be removed.
if (errmsg) {
message  = ' - '   errmsg;
e.errno = e.code = errorno;
e.syscall = syscall;
ChildProcess.prototype.kill = function(sig) {
constants = process.binding('constants');
var r = this._handle.kill(signal);
this.killed = true;
/* The underlying platform doesn't support this signal. */
/* Other error, almost certainly EPERM. */
this.emit('error', errnoException(process._errno, 'kill'));
ChildProcess.prototype.ref = function() {
if (this._handle) this._handle.ref();
ChildProcess.prototype.unref = function() {
if (this._handle) this._handle.unref();
if (!stdout || typeof stdout.write !== 'function') {
prop.value = stdout;
Object.defineProperty(this, '_stdout', prop);
prop.value = stderr;
Object.defineProperty(this, '_stderr', prop);
prop.value = {};
Object.defineProperty(this, '_times', prop);
Object.keys(Console.prototype).forEach(function(k) {
this[k] = this[k].bind(this);
Console.prototype.log = function() {
this._stdout.write(util.format.apply(this, arguments)   '\n');
Console.prototype.info = Console.prototype.log;
Console.prototype.warn = function() {
this._stderr.write(util.format.apply(this, arguments)   '\n');
Console.prototype.error = Console.prototype.warn;
Console.prototype.dir = function(object) {
this._stdout.write(util.inspect(object)   '\n');
Console.prototype.time = function(label) {
this._times[label] = Date.now();
Console.prototype.timeEnd = function(label) {
var duration = Date.now() - time;
this.log('%s: %dms', label, duration);
Console.prototype.trace = function() {
err.name = 'Trace';
err.message = util.format.apply(this, arguments);
Error.captureStackTrace(err, arguments.callee);
this.error(err.stack);
Console.prototype.assert = function(expression) {
var arr = Array.prototype.slice.call(arguments, 1);
require('assert').ok(false, util.format.apply(this, arr));
module.exports = new Console(process.stdout, process.stderr);
module.exports.Console = Console;
module.exports = process.binding('constants');
exports.DEFAULT_ENCODING = 'buffer';
var binding = process.binding('crypto');
var SecureContext = binding.SecureContext;
var randomBytes = binding.randomBytes;
var pseudoRandomBytes = binding.pseudoRandomBytes;
var getCiphers = binding.getCiphers;
var getHashes = binding.getHashes;
throw new Error('node.js not compiled with openssl crypto support.');
this.context = context;
this.context = new SecureContext();
this.context.init(secureProtocol);
this.context.init();
if (flags) this.context.setOptions(flags);
exports.Credentials = Credentials;
exports.createCredentials = function(options, context) {
var c = new Credentials(options.secureProtocol,
options.secureOptions,
if (options.key) {
if (options.passphrase) {
c.context.setKey(options.key, options.passphrase);
c.context.setKey(options.key);
if (options.cert) c.context.setCert(options.cert);
if (options.ciphers) c.context.setCiphers(options.ciphers);
if (options.ca) {
if (Array.isArray(options.ca)) {
for (var i = 0, len = options.ca.length; i < len; i  ) {
c.context.addCACert(options.ca[i]);
c.context.addCACert(options.ca);
c.context.addRootCerts();
if (options.crl) {
if (Array.isArray(options.crl)) {
for (var i = 0, len = options.crl.length; i < len; i  ) {
c.context.addCRL(options.crl[i]);
c.context.addCRL(options.crl);
if (options.sessionIdContext) {
c.context.setSessionIdContext(options.sessionIdContext);
if (options.pfx) {
var pfx = options.pfx;
var passphrase = options.passphrase;
if (passphrase)
passphrase = toBuf(passphrase);
if (passphrase) {
c.context.loadPKCS12(pfx, passphrase);
c.context.loadPKCS12(pfx);
util.inherits(LazyTransform, stream.Transform);
].forEach(function(prop, i, props) {
Object.defineProperty(LazyTransform.prototype, prop, {
stream.Transform.call(this, this._options);
this._writableState.decodeStrings = false;
this._writableState.defaultEncoding = 'binary';
Object.defineProperty(this, prop, {
exports.createHash = exports.Hash = Hash;
this._binding = new binding.Hash(algorithm);
LazyTransform.call(this, options);
util.inherits(Hash, LazyTransform);
Hash.prototype._transform = function(chunk, encoding, callback) {
this._binding.update(chunk, encoding);
Hash.prototype._flush = function(callback) {
var encoding = this._readableState.encoding || 'buffer';
this.push(this._binding.digest(encoding), encoding);
Hash.prototype.update = function(data, encoding) {
encoding = encoding || exports.DEFAULT_ENCODING;
this._binding.update(data, encoding);
Hash.prototype.digest = function(outputEncoding) {
outputEncoding = outputEncoding || exports.DEFAULT_ENCODING;
return this._binding.digest(outputEncoding);
exports.createHmac = exports.Hmac = Hmac;
function Hmac(hmac, key, options) {
return new Hmac(hmac, key, options);
this._binding = new binding.Hmac();
this._binding.init(hmac, toBuf(key));
util.inherits(Hmac, LazyTransform);
Hmac.prototype.update = Hash.prototype.update;
Hmac.prototype.digest = Hash.prototype.digest;
Hmac.prototype._flush = Hash.prototype._flush;
Hmac.prototype._transform = Hash.prototype._transform;
assert(decoder.encoding === encoding, 'Cannot change encoding');
exports.createCipher = exports.Cipher = Cipher;
function Cipher(cipher, password, options) {
return new Cipher(cipher, password, options);
this._binding = new binding.Cipher;
this._binding.init(cipher, toBuf(password));
util.inherits(Cipher, LazyTransform);
Cipher.prototype._transform = function(chunk, encoding, callback) {
this.push(this._binding.update(chunk, encoding));
Cipher.prototype._flush = function(callback) {
this.push(this._binding.final());
Cipher.prototype.update = function(data, inputEncoding, outputEncoding) {
inputEncoding = inputEncoding || exports.DEFAULT_ENCODING;
var ret = this._binding.update(data, inputEncoding);
ret = this._decoder.write(ret);
Cipher.prototype.final = function(outputEncoding) {
var ret = this._binding.final();
ret = this._decoder.end(ret);
Cipher.prototype.setAutoPadding = function(ap) {
this._binding.setAutoPadding(ap);
exports.createCipheriv = exports.Cipheriv = Cipheriv;
function Cipheriv(cipher, key, iv, options) {
return new Cipheriv(cipher, key, iv, options);
this._binding = new binding.Cipher();
this._binding.initiv(cipher, toBuf(key), toBuf(iv));
util.inherits(Cipheriv, LazyTransform);
Cipheriv.prototype._transform = Cipher.prototype._transform;
Cipheriv.prototype._flush = Cipher.prototype._flush;
Cipheriv.prototype.update = Cipher.prototype.update;
Cipheriv.prototype.final = Cipher.prototype.final;
Cipheriv.prototype.setAutoPadding = Cipher.prototype.setAutoPadding;
exports.createDecipher = exports.Decipher = Decipher;
function Decipher(cipher, password, options) {
return new Decipher(cipher, password, options);
this._binding = new binding.Decipher;
util.inherits(Decipher, LazyTransform);
Decipher.prototype._transform = Cipher.prototype._transform;
Decipher.prototype._flush = Cipher.prototype._flush;
Decipher.prototype.update = Cipher.prototype.update;
Decipher.prototype.final = Cipher.prototype.final;
Decipher.prototype.finaltol = Cipher.prototype.final;
Decipher.prototype.setAutoPadding = Cipher.prototype.setAutoPadding;
exports.createDecipheriv = exports.Decipheriv = Decipheriv;
function Decipheriv(cipher, key, iv, options) {
return new Decipheriv(cipher, key, iv, options);
util.inherits(Decipheriv, LazyTransform);
Decipheriv.prototype._transform = Cipher.prototype._transform;
Decipheriv.prototype._flush = Cipher.prototype._flush;
Decipheriv.prototype.update = Cipher.prototype.update;
Decipheriv.prototype.final = Cipher.prototype.final;
Decipheriv.prototype.finaltol = Cipher.prototype.final;
Decipheriv.prototype.setAutoPadding = Cipher.prototype.setAutoPadding;
exports.createSign = exports.Sign = Sign;
this._binding = new binding.Sign();
this._binding.init(algorithm);
stream.Writable.call(this, options);
util.inherits(Sign, stream.Writable);
Sign.prototype._write = function(chunk, encoding, callback) {
Sign.prototype.update = Hash.prototype.update;
Sign.prototype.sign = function(key, encoding) {
var ret = this._binding.sign(toBuf(key));
ret = ret.toString(encoding);
exports.createVerify = exports.Verify = Verify;
this._binding = new binding.Verify;
util.inherits(Verify, stream.Writable);
Verify.prototype._write = Sign.prototype._write;
Verify.prototype.update = Sign.prototype.update;
Verify.prototype.verify = function(object, signature, sigEncoding) {
sigEncoding = sigEncoding || exports.DEFAULT_ENCODING;
return this._binding.verify(toBuf(object), toBuf(signature, sigEncoding));
exports.createDiffieHellman = exports.DiffieHellman = DiffieHellman;
function DiffieHellman(sizeOrKey, encoding) {
return new DiffieHellman(sizeOrKey, encoding);
if (!sizeOrKey)
this._binding = new binding.DiffieHellman();
encoding = encoding || exports.DEFAULT_ENCODING;
sizeOrKey = toBuf(sizeOrKey, encoding);
this._binding = new binding.DiffieHellman(sizeOrKey);
exports.DiffieHellmanGroup =
exports.createDiffieHellmanGroup =
exports.getDiffieHellman = DiffieHellmanGroup;
this._binding = new binding.DiffieHellmanGroup(name);
DiffieHellmanGroup.prototype.generateKeys =
DiffieHellman.prototype.generateKeys =
dhGenerateKeys;
function dhGenerateKeys(encoding) {
var keys = this._binding.generateKeys();
keys = keys.toString(encoding);
return keys;
DiffieHellmanGroup.prototype.computeSecret =
DiffieHellman.prototype.computeSecret =
function dhComputeSecret(key, inEnc, outEnc) {
inEnc = inEnc || exports.DEFAULT_ENCODING;
outEnc = outEnc || exports.DEFAULT_ENCODING;
var ret = this._binding.computeSecret(toBuf(key, inEnc));
ret = ret.toString(outEnc);
DiffieHellmanGroup.prototype.getPrime =
DiffieHellman.prototype.getPrime =
var prime = this._binding.getPrime();
prime = prime.toString(encoding);
DiffieHellmanGroup.prototype.getGenerator =
DiffieHellman.prototype.getGenerator =
var generator = this._binding.getGenerator();
generator = generator.toString(encoding);
DiffieHellmanGroup.prototype.getPublicKey =
DiffieHellman.prototype.getPublicKey =
dhGetPublicKey;
function dhGetPublicKey(encoding) {
var key = this._binding.getPublicKey();
key = key.toString(encoding);
return key;
DiffieHellmanGroup.prototype.getPrivateKey =
DiffieHellman.prototype.getPrivateKey =
dhGetPrivateKey;
function dhGetPrivateKey(encoding) {
var key = this._binding.getPrivateKey();
DiffieHellman.prototype.setPublicKey = function(key, encoding) {
this._binding.setPublicKey(toBuf(key, encoding));
DiffieHellman.prototype.setPrivateKey = function(key, encoding) {
this._binding.setPrivateKey(toBuf(key, encoding));
exports.pbkdf2 = function(password, salt, iterations, keylen, callback) {
return pbkdf2(password, salt, iterations, keylen, callback);
exports.pbkdf2Sync = function(password, salt, iterations, keylen) {
return pbkdf2(password, salt, iterations, keylen);
function pbkdf2(password, salt, iterations, keylen, callback) {
password = toBuf(password);
if (exports.DEFAULT_ENCODING === 'buffer')
return binding.PBKDF2(password, salt, iterations, keylen, callback);
var encoding = exports.DEFAULT_ENCODING;
binding.PBKDF2(password, salt, iterations, keylen, function(er, ret) {
ret = ret.toString(encoding);
var ret = binding.PBKDF2(password, salt, iterations, keylen);
return ret.toString(encoding);
exports.randomBytes = randomBytes;
exports.pseudoRandomBytes = pseudoRandomBytes;
exports.rng = randomBytes;
exports.prng = pseudoRandomBytes;
exports.getCiphers = function() {
return filterDuplicates(getCiphers.call(null, arguments));
exports.getHashes = function() {
return filterDuplicates(getHashes.call(null, arguments));
names.forEach(function(name) {
var key = name;
if (/^[0-9A-Z\-] $/.test(key)) key = key.toLowerCase();
if (!ctx.hasOwnProperty(key) || ctx[key] < name)
ctx[key] = name;
return Object.getOwnPropertyNames(ctx).map(function(key) {
return ctx[key];
}).sort();
var fork = require('child_process').fork;
if (process.env.NODE_DEBUG && /cluster/.test(process.env.NODE_DEBUG)) {
var prefix = process.pid   ','  
(process.env.NODE_UNIQUE_ID ? 'Worker' : 'Master');
console.error(prefix, x);
util.inherits(Cluster, EventEmitter);
var cluster = module.exports = new Cluster();
cluster.isWorker = 'NODE_UNIQUE_ID' in process.env;
cluster.isMaster = ! cluster.isWorker;
cluster.worker = cluster.isWorker ? {} : null;
cluster.workers = cluster.isMaster ? {} : null;
var settings = cluster.settings = {};
for (var id in cluster.workers) {
if (cluster.workers.hasOwnProperty(id)) {
cb(cluster.workers[id]);
this.missing = missing;
this.callback = callback;
ProgressTracker.prototype.done = function() {
this.missing -= 1;
this.check();
ProgressTracker.prototype.check = function() {
if (this.missing === 0) this.callback();
cluster.setupMaster = function(options) {
assert(cluster.isMaster);
// v8.log.
// a "--logfile=v8-%p.log" argument (where %p is expanded to the PID)
var execArgv = options.execArgv || process.execArgv;
if (execArgv.some(function(s) { return /^--prof/.test(s); }) &&
!execArgv.some(function(s) { return /^--logfile=/.test(s); }))
execArgv = execArgv.slice();
execArgv.push('--logfile=v8-%p.log');
settings = cluster.settings = {
exec: options.exec || process.argv[1],
execArgv: execArgv,
args: options.args || process.argv.slice(2),
silent: options.silent || false
cluster.emit('setup');
message.cmd.slice(0, INTERNAL_PREFIX.length) === INTERNAL_PREFIX;
// Add internal prefix to cmd
outMessage.cmd = INTERNAL_PREFIX   (outMessage.cmd || '');
queryCallbacks[inMessage._queryEcho](inMessage.content, inHandle);
message.cmd = inMessage.cmd.substr(INTERNAL_PREFIX.length);
if (messageHandler[message.cmd]) {
messageHandler[message.cmd](message, worker, respond);
if (cluster.isMaster) {
messageHandler.online = function(message, worker) {
worker.state = 'online';
debug('Worker '   worker.process.pid   ' online');
worker.emit('online');
cluster.emit('online', worker);
messageHandler.queryServer = function(message, worker, send) {
var args = [message.address,
message.port,
message.addressType,
message.fd];
var key = args.join(':');
if (serverHandlers.hasOwnProperty(key)) {
handler = serverHandlers[key];
if (message.addressType === 'udp4' ||
message.addressType === 'udp6') {
handler = dgram._createSocketHandle.apply(net, args);
handler = net._createServerHandle.apply(net, args);
serverHandlers[key] = handler;
messageHandler.listening = function(message, worker) {
worker.state = 'listening';
worker.emit('listening', {
address: message.address,
port: message.port,
addressType: message.addressType,
fd: message.fd
cluster.emit('listening', worker, {
messageHandler.suicide = function(message, worker) {
worker.suicide = true;
else if (cluster.isWorker) {
// Handle worker.disconnect from master
messageHandler.disconnect = function(message, worker) {
worker.disconnect();
var env = process.env;
this.id = cluster.isMaster ?   ids : toDecInt(env.NODE_UNIQUE_ID);
this.workerID = this.uniqueID = this.id;
this.state = 'none';
if (cluster.isMaster) {
envCopy['NODE_UNIQUE_ID'] = this.id;
this.process = fork(settings.exec, settings.args, {
'silent': settings.silent,
'execArgv': settings.execArgv
this.process = process;
// Save worker in the cluster.workers array
cluster.workers[this.id] = this;
// There is no worker.fork event since this has no real purpose
cluster.emit('fork', self);
this.process.on('internalMessage', handleMessage.bind(null, this));
this.process.once('exit', function(exitCode, signalCode) {
self.emit('exit', exitCode, signalCode);
cluster.emit('exit', self, exitCode, signalCode);
this.process.once('disconnect', function() {
self.emit('disconnect');
cluster.emit('disconnect', self);
this.process.on('message', this.emit.bind(this, 'message'));
this.process.on('error', this.emit.bind(this, 'error'));
util.inherits(Worker, EventEmitter);
cluster.Worker = Worker;
worker.state = state;
worker.suicide = !!worker.suicide;
delete cluster.workers[worker.id];
var callback = arguments[arguments.length - 1];
message._requestEcho = worker.id   ':'   (  queryIds);
worker.send(message, handler);
Worker.prototype.send = function() {
// You could also just use process.send in a worker
this.process.send.apply(this.process, arguments);
Worker.prototype.kill = Worker.prototype.destroy = function(signal) {
this.suicide = true;
if (self.process.connected) {
self.process.once('disconnect', function() {
self.process.kill(signal);
self.process.disconnect();
self.process.kill(signal);
if (this.process.connected) {
sendInternalMessage(this, {cmd: 'suicide'}, function() {
process.exit(0);
this.process.once('disconnect', function() {
process.exit(0);
// The .disconnect function will close all servers
Worker.prototype.disconnect = function() {
this.suicide = true;
sendInternalMessage(this, {cmd: 'disconnect'});
var servers = Object.keys(serverListeners).length;
sendInternalMessage(this, {cmd: 'suicide'}, function() {
progress.check();
for (var key in serverListeners) {
server = serverListeners[key];
progress.done();
server.on('close', progress.done.bind(progress));
server.close();
cluster.fork = function(env) {
cluster.setupMaster();
return (new cluster.Worker(env));
// execute .disconnect on all workers and close handlers when done
cluster.disconnect = function(callback) {
// Close all TCP handlers when all workers are disconnected
var workers = Object.keys(cluster.workers).length;
for (var key in serverHandlers) {
serverHandlers[key].close();
delete serverHandlers[key];
worker.once('disconnect', progress.done.bind(progress));
progress.check();
// Internal function. Called from src/node.js when worker process starts.
var worker = cluster.worker = new Worker();
process.once('disconnect', function() {
if (worker.suicide !== true) {
worker.state = 'online';
sendInternalMessage(worker, { cmd: 'online' });
// Internal function. Called by net.js and dgram.js when attempting to bind a
// TCP server or UDP socket.
cluster._getServer = function(tcpSelf, address, port, addressType, fd, cb) {
assert(cluster.isWorker);
// Store tcp instance for later use
var key = [address, port, addressType, fd].join(':');
serverListeners[key] = tcpSelf;
tcpSelf.once('listening', function() {
cluster.worker.state = 'listening';
sendInternalMessage(cluster.worker, {
cmd: 'listening',
port: tcpSelf.address().port || port,
cmd: 'queryServer',
port: port,
sendInternalMessage(cluster.worker, message, function(msg, handle) {
cb(handle, msg && msg.error);
var UDP = process.binding('udp_wrap').UDP;
return net.isIP(address);
return dns.lookup(address, family, callback);
return lookup(address || '0.0.0.0', 4, callback);
if (type == 'udp4') {
var handle = new UDP;
handle.lookup = lookup4;
if (type == 'udp6') {
handle.lookup = lookup6;
handle.bind = handle.bind6;
handle.send = handle.send6;
throw new Error('unix_dgram sockets are not supported any more.');
throw new Error('Bad socket type specified. Valid types are: udp4, udp6');
exports._createSocketHandle = function(address, port, addressType, fd) {
// Opening an existing fd is not supported for UDP handles.
if (port || address) {
var r = handle.bind(address, port || 0, 0);
handle.close();
events.EventEmitter.call(this);
handle.owner = this;
this.type = type;
this.fd = null; // compatibility hack
this.on('message', listener);
util.inherits(Socket, events.EventEmitter);
exports.Socket = Socket;
exports.createSocket = function(type, listener) {
socket._handle.onmessage = onMessage;
socket._handle.recvStart();
socket.fd = -42; // compatibility hack
socket.emit('listening');
newHandle.lookup = self._handle.lookup;
newHandle.bind = self._handle.bind;
newHandle.send = self._handle.send;
newHandle.owner = self;
self._handle.close();
Socket.prototype.bind = function(/*port, address, callback*/) {
if (typeof arguments[arguments.length - 1] === 'function')
self.once('listening', arguments[arguments.length - 1]);
var UDP = process.binding('udp_wrap').UDP;
if (arguments[0] instanceof UDP) {
var port = arguments[0];
self._handle.lookup(address, function(err, ip) {
if (cluster.isWorker) {
cluster._getServer(self, ip, port, self.type, -1, function(handle, err) {
return self.emit('error', errnoException(err, 'bind'));
return handle.close();
if (self._handle.bind(ip, port || 0, /*flags=*/ 0)) {
self.emit('error', errnoException(process._errno, 'bind'));
// thin wrapper around `send`, here for compatibility with dgram_legacy.js
Socket.prototype.sendto = function(buffer,
port,
throw new Error(this.type   ' sockets must send to port, address');
this.send(buffer, offset, length, port, address, callback);
Socket.prototype.send = function(buffer,
port,
if (!Buffer.isBuffer(buffer))
if (offset >= buffer.length)
if (offset   length > buffer.length)
port = port | 0;
if (port <= 0 || port > 65535)
throw new RangeError('Port should be > 0 and < 65536');
self.bind(0, null);
self.once('listening', function() {
for (var i = 0; i < self._sendQueue.length; i  )
self.send.apply(self, self._sendQueue[i]);
self._sendQueue.push([buffer, offset, length, port, address, callback]);
var req = self._handle.send(buffer, offset, length, port, ip);
req.oncomplete = afterSend;
req.cb = callback;
// don't emit as error, dgram_legacy.js compatibility
process.nextTick(function() {
var self = handle.owner;
if (req.cb)
req.cb(null, buffer.length); // compatibility with dgram_legacy.js
Socket.prototype.close = function() {
this._handle.close();
this.emit('close');
Socket.prototype.address = function() {
var address = this._handle.getsockname();
Socket.prototype.setBroadcast = function(arg) {
if (this._handle.setBroadcast((arg) ? 1 : 0)) {
Socket.prototype.setTTL = function(arg) {
if (this._handle.setTTL(arg)) {
Socket.prototype.setMulticastTTL = function(arg) {
if (this._handle.setMulticastTTL(arg)) {
Socket.prototype.setMulticastLoopback = function(arg) {
if (this._handle.setMulticastLoopback(arg)) {
Socket.prototype.addMembership = function(multicastAddress,
if (this._handle.addMembership(multicastAddress, interfaceAddress)) {
Socket.prototype.dropMembership = function(multicastAddress,
if (this._handle.dropMembership(multicastAddress, interfaceAddress)) {
Socket.prototype._healthCheck = function() {
throw new Error('Not running'); // error message from dgram_legacy.js
Socket.prototype._stopReceiving = function() {
this._handle.recvStop();
return self.emit('error', errnoException(process._errno, 'recvmsg'));
rinfo.size = len; // compatibility
self.emit('message', slab.slice(start, start   len), rinfo);
Socket.prototype.ref = function() {
this._handle.ref();
Socket.prototype.unref = function() {
this._handle.unref();
var cares = process.binding('cares_wrap'),
isIp = net.isIP;
// channel.someAPI(..., callback);
// callback.immediately = true;
if (asyncCallback.immediately) {
callback.apply(null, arguments);
callback.apply(null, args);
exports.lookup = function(domain, family, callback) {
if (arguments.length === 2) {
// Hack required for Windows because Win7 removed the
// localhost entry from c:\WINDOWS\system32\drivers\etc\hosts
// See hXXp://daniel.haxx.se/blog/2011/02/21/localhost-hack-on-windows/
if (process.platform == 'win32' && domain == 'localhost') {
callback(null, '127.0.0.1', 4);
var matchedFamily = net.isIP(domain);
callback(null, addresses[0], addresses[0].indexOf(':') >= 0 ? 6 : 4);
var wrap = cares.getaddrinfo(domain, family);
wrap.oncomplete = onanswer;
callback.immediately = true;
callback.immediately = true;
exports.resolve4 = resolveMap.A = resolver('queryA');
exports.resolve6 = resolveMap.AAAA = resolver('queryAaaa');
exports.resolveCname = resolveMap.CNAME = resolver('queryCname');
exports.resolveMx = resolveMap.MX = resolver('queryMx');
exports.resolveNs = resolveMap.NS = resolver('queryNs');
exports.resolveTxt = resolveMap.TXT = resolver('queryTxt');
exports.resolveSrv = resolveMap.SRV = resolver('querySrv');
exports.resolveNaptr = resolveMap.NAPTR = resolver('queryNaptr');
exports.reverse = resolveMap.PTR = resolver('getHostByAddr');
exports.resolve = function(domain, type_, callback_) {
resolver = exports.resolve4;
exports.NODATA = 'ENODATA';
exports.FORMERR = 'EFORMERR';
exports.SERVFAIL = 'ESERVFAIL';
exports.NOTFOUND = 'ENOTFOUND';
exports.NOTIMP = 'ENOTIMP';
exports.REFUSED = 'EREFUSED';
exports.BADQUERY = 'EBADQUERY';
exports.ADNAME = 'EADNAME';
exports.BADFAMILY = 'EBADFAMILY';
exports.BADRESP = 'EBADRESP';
exports.CONNREFUSED = 'ECONNREFUSED';
exports.TIMEOUT = 'ETIMEOUT';
exports.EOF = 'EOF';
exports.FILE = 'EFILE';
exports.NOMEM = 'ENOMEM';
exports.DESTRUCTION = 'EDESTRUCTION';
exports.BADSTR = 'EBADSTR';
exports.BADFLAGS = 'EBADFLAGS';
exports.NONAME = 'ENONAME';
exports.BADHINTS = 'EBADHINTS';
exports.NOTINITIALIZED = 'ENOTINITIALIZED';
exports.LOADIPHLPAPI = 'ELOADIPHLPAPI';
exports.ADDRGETNETWORKPARAMS = 'EADDRGETNETWORKPARAMS';
exports.CANCELLED = 'ECANCELLED';
var EventEmitter = events.EventEmitter;
var inherits = util.inherits;
events.usingDomains = true;
exports.Domain = Domain;
exports.create = exports.createDomain = function(cb) {
exports._stack = stack;
exports.active = null;
this.members = [];
Domain.prototype.enter = function() {
exports.active = process.domain = this;
stack.push(this);
Domain.prototype.exit = function() {
var index = stack.lastIndexOf(this);
stack.splice(index);
exports.active = stack[stack.length - 1];
process.domain = exports.active;
Domain.prototype.add = function(ee) {
if (ee.domain === this) return;
if (ee.domain) {
ee.domain.remove(ee);
// var d = domain.create();
// var e = domain.create();
// d.add(e);
// e.add(d);
// e.emit('error', er); // RangeError, stack overflow!
if (this.domain && (ee instanceof Domain)) {
for (var d = this.domain; d; d = d.domain) {
ee.domain = this;
this.members.push(ee);
Domain.prototype.remove = function(ee) {
ee.domain = null;
var index = this.members.indexOf(ee);
this.members.splice(index, 1);
Domain.prototype.run = function(fn) {
return this.bind(fn)();
Domain.prototype.intercept = function(cb) {
return this.bind(cb, true);
Domain.prototype.bind = function(cb, interceptError) {
return cb.apply(this, arguments);
self.emit('error', er);
var len = arguments.length;
self.enter();
var ret = cb.apply(this, args);
self.exit();
self.enter();
var ret = cb.apply(this, arguments);
self.exit();
b.domain = this;
Domain.prototype.dispose = function() {
this.exit();
this.emit('dispose');
this.removeAllListeners();
this.on('error', function() {});
this.members.forEach(function(m) {
m.removeAllListeners();
m.on('error', function() {});
endMethods.forEach(function(method) {
if (this.domain) this.domain.remove(this);
this.members.length = 0;
exports.usingDomains = false;
this.domain = null;
if (exports.usingDomains) {
if (domain.active && !(this instanceof domain.Domain)) {
this.domain = domain.active;
exports.EventEmitter = EventEmitter;
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
EventEmitter.prototype.emit = function emit(type) {
if (!this._events.error ||
(typeof this._events.error === 'object' &&
!this._events.error.length)) {
if (this.domain) {
er.domainEmitter = this;
er.domain = this.domain;
er.domainThrown = false;
this.domain.emit('error', er);
if (this.domain && this !== process)
this.domain.enter();
switch (arguments.length) {
handler.call(this);
handler.call(this, arguments[1]);
handler.call(this, arguments[1], arguments[2]);
len = arguments.length;
handler.apply(this, args);
len = arguments.length;
listeners = handler.slice();
len = listeners.length;
listeners[i].apply(this, args);
this.domain.exit();
EventEmitter.prototype.addListener = function addListener(type, listener) {
if (this._events.newListener)
this.emit('newListener', type, typeof listener.listener === 'function' ?
listener.listener : listener);
this._events[type].push(listener);
if (typeof this._events[type] === 'object' && !this._events[type].warned) {
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory '  
'leak detected. %d listeners added. '  
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
console.trace();
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.once = function once(type, listener) {
this.removeListener(type, g);
listener.apply(this, arguments);
g.listener = listener;
this.on(type, g);
EventEmitter.prototype.removeListener =
length = list.length;
(typeof list.listener === 'function' && list.listener === listener)) {
if (this._events.removeListener)
this.emit('removeListener', type, listener);
(list[i].listener && list[i].listener === listener)) {
if (list.length === 1) {
list.length = 0;
list.splice(position, 1);
EventEmitter.prototype.removeAllListeners =
var key, listeners;
if (!this._events.removeListener) {
if (arguments.length === 0)
if (arguments.length === 0) {
for (key in this._events) {
if (key === 'removeListener') continue;
this.removeAllListeners(key);
this.removeAllListeners('removeListener');
this.removeListener(type, listeners);
} else if (Array.isArray(listeners)) {
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
EventEmitter.prototype.listeners = function listeners(type) {
ret = this._events[type].slice();
EventEmitter.listenerCount = function(emitter, type) {
ret = emitter._events[type].length;
exports.FreeList = function(name, max, constructor) {
this.name = name;
this.constructor = constructor;
this.max = max;
this.list = [];
exports.FreeList.prototype.alloc = function() {
//debug("alloc "   this.name   " "   this.list.length);
return this.list.length ? this.list.shift() :
this.constructor.apply(this, arguments);
exports.FreeList.prototype.free = function(obj) {
//debug("free "   this.name   " "   this.list.length);
if (this.list.length < this.max) {
this.list.push(obj);
var binding = process.binding('fs');
var constants = process.binding('constants');
var fs = exports;
var Stream = require('stream').Stream;
var Readable = Stream.Readable;
var Writable = Stream.Writable;
var isWindows = process.platform === 'win32';
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
backtrace.message = err.message;
else if (!process.noDeprecation) {
var msg = 'fs: missing callback '   (err.stack || err.message);
if (process.traceDeprecation)
console.trace(msg);
console.error(msg);
// for callbacks that are passed to the binding layer, callbacks that are
return cb.apply(null, arguments);
if (encoding && !Buffer.isEncoding(encoding)) {
if ((''   path).indexOf('\u0000') !== -1) {
fs.Stats = binding.Stats;
fs.Stats.prototype._checkModeProperty = function(property) {
return ((this.mode & constants.S_IFMT) === property);
fs.Stats.prototype.isDirectory = function() {
fs.Stats.prototype.isFile = function() {
fs.Stats.prototype.isBlockDevice = function() {
fs.Stats.prototype.isCharacterDevice = function() {
fs.Stats.prototype.isSymbolicLink = function() {
fs.Stats.prototype.isFIFO = function() {
fs.Stats.prototype.isSocket = function() {
fs.exists = function(path, callback) {
binding.stat(pathModule._makeLong(path), cb);
fs.existsSync = function(path) {
binding.stat(pathModule._makeLong(path));
fs.readFile = function(path, options, callback_) {
var callback = maybeCallback(arguments[arguments.length - 1]);
var encoding = options.encoding;
var flag = options.flag || 'r';
fs.open(path, flag, 438 /*=0666*/, function(er, fd_) {
fs.fstat(fd, function(er, st) {
return fs.close(fd, function() {
size = st.size;
fs.read(fd, buffer, 0, 8192, -1, afterRead);
fs.read(fd, buffer, pos, size - pos, -1, afterRead);
return fs.close(fd, function(er2) {
buffers.push(buffer.slice(0, bytesRead));
fs.close(fd, function(er) {
buffer = Buffer.concat(buffers, pos);
buffer = buffer.slice(0, pos);
if (encoding) buffer = buffer.toString(encoding);
fs.readFileSync = function(path, options) {
var fd = fs.openSync(path, flag, 438 /*=0666*/);
size = fs.fstatSync(fd).size;
if (threw) fs.closeSync(fd);
var bytesRead = fs.readSync(fd, buffer, pos, size - pos);
var bytesRead = fs.readSync(fd, buffer, 0, 8192);
buffers.push(buffer.slice(0, bytesRead));
if (threw) fs.closeSync(fd);
fs.closeSync(fd);
buffer = Buffer.concat(buffers, pos);
buffer = buffer.slice(0, pos);
if (encoding) buffer = buffer.toString(encoding);
// Used by binding.open and friends
// O_EXCL is mandated by POSIX, Windows supports it too.
if (!O_EXCL && ~flag.indexOf('x')) {
throw errnoException('ENOSYS', 'fs.open(O_EXCL)');
// exported but hidden, only used by test/simple/test-fs-open-flags.js
Object.defineProperty(exports, '_stringToFlags', {
fs.close = function(fd, callback) {
binding.close(fd, makeCallback(callback));
fs.closeSync = function(fd) {
return binding.close(fd);
fs.open = function(path, flags, mode, callback) {
callback = makeCallback(arguments[arguments.length - 1]);
binding.open(pathModule._makeLong(path),
fs.openSync = function(path, flags, mode) {
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
fs.read = function(fd, buffer, offset, length, position, callback) {
if (!Buffer.isBuffer(buffer)) {
var str = (bytesRead > 0) ? buffer.toString(encoding, 0, bytesRead) : '';
binding.read(fd, buffer, offset, length, position, wrapper);
fs.readSync = function(fd, buffer, offset, length, position) {
var r = binding.read(fd, buffer, offset, length, position);
var str = (r > 0) ? buffer.toString(encoding, 0, r) : '';
fs.write = function(fd, buffer, offset, length, position, callback) {
length = buffer.length;
binding.write(fd, buffer, offset, length, position, wrapper);
fs.writeSync = function(fd, buffer, offset, length, position) {
return binding.write(fd, buffer, offset, length, position);
fs.rename = function(oldPath, newPath, callback) {
binding.rename(pathModule._makeLong(oldPath),
fs.renameSync = function(oldPath, newPath) {
return binding.rename(pathModule._makeLong(oldPath),
fs.truncate = function(path, len, callback) {
return fs.ftruncate(path, len, callback);
fs.open(path, 'r ', function(er, fd) {
binding.ftruncate(fd, len, function(er) {
fs.close(fd, function(er2) {
fs.truncateSync = function(path, len) {
return fs.ftruncateSync(path, len);
var fd = fs.openSync(path, 'r ');
var ret = fs.ftruncateSync(fd, len);
fs.closeSync(fd);
fs.ftruncate = function(fd, len, callback) {
binding.ftruncate(fd, len, makeCallback(callback));
fs.ftruncateSync = function(fd, len) {
return binding.ftruncate(fd, len);
fs.rmdir = function(path, callback) {
binding.rmdir(pathModule._makeLong(path), callback);
fs.rmdirSync = function(path) {
return binding.rmdir(pathModule._makeLong(path));
fs.fdatasync = function(fd, callback) {
binding.fdatasync(fd, makeCallback(callback));
fs.fdatasyncSync = function(fd) {
return binding.fdatasync(fd);
fs.fsync = function(fd, callback) {
binding.fsync(fd, makeCallback(callback));
fs.fsyncSync = function(fd) {
return binding.fsync(fd);
fs.mkdir = function(path, mode, callback) {
binding.mkdir(pathModule._makeLong(path),
fs.mkdirSync = function(path, mode) {
return binding.mkdir(pathModule._makeLong(path),
fs.readdir = function(path, callback) {
binding.readdir(pathModule._makeLong(path), callback);
fs.readdirSync = function(path) {
return binding.readdir(pathModule._makeLong(path));
fs.fstat = function(fd, callback) {
binding.fstat(fd, makeCallback(callback));
fs.lstat = function(path, callback) {
binding.lstat(pathModule._makeLong(path), callback);
fs.stat = function(path, callback) {
binding.stat(pathModule._makeLong(path), callback);
fs.fstatSync = function(fd) {
return binding.fstat(fd);
fs.lstatSync = function(path) {
return binding.lstat(pathModule._makeLong(path));
fs.statSync = function(path) {
return binding.stat(pathModule._makeLong(path));
fs.readlink = function(path, callback) {
binding.readlink(pathModule._makeLong(path), callback);
fs.readlinkSync = function(path) {
return binding.readlink(pathModule._makeLong(path));
if (!isWindows) {
// Junctions paths need to be absolute and \\?\-prefixed.
// Windows symlinks don't tolerate forward slashes.
return (''   path).replace(/\//g, '\\');
fs.symlink = function(destination, path, type_, callback) {
var callback = makeCallback(arguments[arguments.length - 1]);
binding.symlink(preprocessSymlinkDestination(destination, type),
fs.symlinkSync = function(destination, path, type) {
return binding.symlink(preprocessSymlinkDestination(destination, type),
fs.link = function(srcpath, dstpath, callback) {
binding.link(pathModule._makeLong(srcpath),
fs.linkSync = function(srcpath, dstpath) {
return binding.link(pathModule._makeLong(srcpath),
fs.unlink = function(path, callback) {
binding.unlink(pathModule._makeLong(path), callback);
fs.unlinkSync = function(path) {
return binding.unlink(pathModule._makeLong(path));
fs.fchmod = function(fd, mode, callback) {
binding.fchmod(fd, modeNum(mode), makeCallback(callback));
fs.fchmodSync = function(fd, mode) {
return binding.fchmod(fd, modeNum(mode));
if (constants.hasOwnProperty('O_SYMLINK')) {
fs.lchmod = function(path, mode, callback) {
fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) {
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function(err) {
fs.close(fd, function(err2) {
fs.lchmodSync = function(path, mode) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK);
// but still try to close, and report closing errors if they occur.
var ret = fs.fchmodSync(fd, mode);
fs.closeSync(fd);
fs.chmod = function(path, mode, callback) {
binding.chmod(pathModule._makeLong(path),
fs.chmodSync = function(path, mode) {
return binding.chmod(pathModule._makeLong(path), modeNum(mode));
fs.lchown = function(path, uid, gid, callback) {
fs.fchown(fd, uid, gid, callback);
fs.lchownSync = function(path, uid, gid) {
return fs.fchownSync(fd, uid, gid);
fs.fchown = function(fd, uid, gid, callback) {
binding.fchown(fd, uid, gid, makeCallback(callback));
fs.fchownSync = function(fd, uid, gid) {
return binding.fchown(fd, uid, gid);
fs.chown = function(path, uid, gid, callback) {
binding.chown(pathModule._makeLong(path), uid, gid, callback);
fs.chownSync = function(path, uid, gid) {
return binding.chown(pathModule._makeLong(path), uid, gid);
return time.getTime() / 1000;
// exported for unit tests, not for public consumption
fs.utimes = function(path, atime, mtime, callback) {
binding.utimes(pathModule._makeLong(path),
fs.utimesSync = function(path, atime, mtime) {
binding.utimes(pathModule._makeLong(path), atime, mtime);
fs.futimes = function(fd, atime, mtime, callback) {
binding.futimes(fd, atime, mtime, makeCallback(callback));
fs.futimesSync = function(fd, atime, mtime) {
binding.futimes(fd, atime, mtime);
callback = maybeCallback(arguments[arguments.length - 1]);
fs.write(fd, buffer, offset, length, position, function(writeErr, written) {
fs.close(fd, function() {
fs.close(fd, callback);
fs.writeFile = function(path, data, options, callback) {
assertEncoding(options.encoding);
var flag = options.flag || 'w';
fs.open(path, flag, options.mode, function(openErr, fd) {
var buffer = Buffer.isBuffer(data) ? data : new Buffer(''   data,
options.encoding || 'utf8');
var position = /a/.test(flag) ? null : 0;
writeAll(fd, buffer, 0, buffer.length, position, callback);
fs.writeFileSync = function(path, data, options) {
var fd = fs.openSync(path, flag, options.mode);
if (!Buffer.isBuffer(data)) {
data = new Buffer(''   data, options.encoding || 'utf8');
var length = data.length;
var position = /a/.test(flag) ? null : 0;
written  = fs.writeSync(fd, data, written, length - written, position);
fs.appendFile = function(path, data, options, callback_) {
if (!options.flag)
fs.writeFile(path, data, options, callback);
fs.appendFileSync = function(path, data, options) {
fs.writeFileSync(path, data, options);
var FSEvent = process.binding('fs_event_wrap').FSEvent;
this._handle.onchange = function(status, event, filename) {
self._handle.close();
self.emit('error', errnoException(process._errno, 'watch'));
self.emit('change', event, filename);
util.inherits(FSWatcher, EventEmitter);
FSWatcher.prototype.start = function(filename, persistent) {
var r = this._handle.start(pathModule._makeLong(filename), persistent);
FSWatcher.prototype.close = function() {
fs.watch = function(filename) {
if (options.persistent === undefined) options.persistent = true;
watcher.start(filename, options.persistent);
watcher.addListener('change', listener);
this._handle = new binding.StatWatcher();
this._handle.onchange = function(current, previous, newStatus) {
current.nlink === previous.nlink) return;
self.emit('change', current, previous);
this._handle.onstop = function() {
self.emit('stop');
util.inherits(StatWatcher, EventEmitter);
StatWatcher.prototype.start = function(filename, persistent, interval) {
this._handle.start(pathModule._makeLong(filename), persistent, interval);
StatWatcher.prototype.stop = function() {
this._handle.stop();
return Object.prototype.hasOwnProperty.call(statWatchers, filename) &&
fs.watchFile = function(filename) {
filename = pathModule.resolve(filename);
stat.start(filename, options.persistent, options.interval);
stat.addListener('change', listener);
fs.unwatchFile = function(filename, listener) {
stat.removeListener('change', listener);
stat.removeAllListeners('change');
if (EventEmitter.listenerCount(stat, 'change') === 0) {
stat.stop();
// See: hXXp://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
var normalize = pathModule.normalize;
if (isWindows) {
fs.realpathSync = function realpathSync(p, cache) {
p = pathModule.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
var m = splitRootRe.exec(p);
pos = m[0].length;
// On windows, check that the root exists. On unix there is no need.
if (isWindows && !knownHard[base]) {
fs.lstatSync(base);
// NB: p.length changes.
while (pos < p.length) {
nextPartRe.lastIndex = pos;
var result = nextPartRe.exec(p);
pos = nextPartRe.lastIndex;
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
var stat = fs.lstatSync(base);
if (!stat.isSymbolicLink()) {
// dev/ino always return 0 on windows, so skip the check.
if (!isWindows) {
var id = stat.dev.toString(32)   ':'   stat.ino.toString(32);
if (seenLinks.hasOwnProperty(id)) {
fs.statSync(base);
linkTarget = fs.readlinkSync(base);
resolvedLink = pathModule.resolve(previous, linkTarget);
if (!isWindows) seenLinks[id] = linkTarget;
p = pathModule.resolve(resolvedLink, p.slice(pos));
fs.realpath = function realpath(p, cache, cb) {
return process.nextTick(cb.bind(null, null, cache[p]));
fs.lstat(base, function(err) {
process.nextTick(LOOP);
if (pos >= p.length) {
return process.nextTick(LOOP);
return fs.lstat(base, gotStat);
if (!stat.isSymbolicLink()) {
// dev/ino always return 0 on windows, so skip the check.
if (!isWindows) {
var id = stat.dev.toString(32)   ':'   stat.ino.toString(32);
if (seenLinks.hasOwnProperty(id)) {
fs.stat(base, function(err) {
fs.readlink(base, function(err, target) {
if (!isWindows) seenLinks[id] = target;
var resolvedLink = pathModule.resolve(previous, target);
fs.createReadStream = function(path, options) {
util.inherits(ReadStream, Readable);
fs.ReadStream = ReadStream;
Readable.call(this, options);
this.path = path;
this.fd = options.hasOwnProperty('fd') ? options.fd : null;
this.flags = options.hasOwnProperty('flags') ? options.flags : 'r';
this.mode = options.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/
this.start = options.hasOwnProperty('start') ? options.start : undefined;
this.end = options.hasOwnProperty('end') ? options.end : undefined;
this.autoClose = options.hasOwnProperty('autoClose') ?
options.autoClose : true;
this.pos = undefined;
if (this.start !== undefined) {
if ('number' !== typeof this.start) {
if (this.end === undefined) {
this.end = Infinity;
} else if ('number' !== typeof this.end) {
if (this.start > this.end) {
this.pos = this.start;
if (typeof this.fd !== 'number')
this.open();
this.on('end', function() {
if (this.autoClose) {
this.destroy();
fs.FileReadStream = fs.ReadStream; // support the legacy name
ReadStream.prototype.open = function() {
fs.open(this.path, this.flags, this.mode, function(er, fd) {
if (self.autoClose) {
self.destroy();
self.fd = fd;
self.emit('open', fd);
self.read();
ReadStream.prototype._read = function(n) {
return this.once('open', function() {
if (this.destroyed)
if (!pool || pool.length - pool.used < kMinPoolSpace) {
allocNewPool(this._readableState.highWaterMark);
var toRead = Math.min(pool.length - pool.used, n);
var start = pool.used;
if (this.pos !== undefined)
toRead = Math.min(this.end - this.pos   1, toRead);
return this.push(null);
fs.read(this.fd, pool, pool.used, toRead, this.pos, onread);
this.pos  = toRead;
pool.used  = toRead;
b = thisPool.slice(start, start   bytesRead);
self.push(b);
ReadStream.prototype.destroy = function() {
this.destroyed = true;
if ('number' === typeof this.fd)
this.close();
ReadStream.prototype.close = function(cb) {
this.once('close', cb);
if (this.closed || 'number' !== typeof this.fd) {
if ('number' !== typeof this.fd) {
this.once('open', close);
return process.nextTick(this.emit.bind(this, 'close'));
this.closed = true;
fs.close(fd || self.fd, function(er) {
self.emit('error', er);
self.emit('close');
self.fd = null;
fs.createWriteStream = function(path, options) {
util.inherits(WriteStream, Writable);
fs.WriteStream = WriteStream;
Writable.call(this, options);
this.fd = null;
this.flags = options.hasOwnProperty('flags') ? options.flags : 'w';
this.bytesWritten = 0;
if (this.start < 0) {
if ('number' !== typeof this.fd)
this.once('finish', this.close);
fs.FileWriteStream = fs.WriteStream; // support the legacy name
WriteStream.prototype.open = function() {
this.fd = fd;
this.emit('open', fd);
}.bind(this));
WriteStream.prototype._write = function(data, encoding, cb) {
if (!Buffer.isBuffer(data))
return this.emit('error', new Error('Invalid data'));
fs.write(this.fd, data, 0, data.length, this.pos, function(er, bytes) {
self.destroy();
self.bytesWritten  = bytes;
this.pos  = data.length;
WriteStream.prototype.destroy = ReadStream.prototype.destroy;
WriteStream.prototype.close = ReadStream.prototype.close;
WriteStream.prototype.destroySoon = WriteStream.prototype.end;
// Temporary hack for process.stdout and process.stderr when piped to files.
Stream.call(this);
this.fd = fd;
this.writable = true;
this.readable = false;
util.inherits(SyncWriteStream, Stream);
// Export
fs.SyncWriteStream = SyncWriteStream;
SyncWriteStream.prototype.write = function(data, arg1, arg2) {
fs.writeSync(this.fd, data, 0, data.length);
process.nextTick(cb);
SyncWriteStream.prototype.end = function(data, arg1, arg2) {
this.write(data, arg1, arg2);
this.destroy();
SyncWriteStream.prototype.destroy = function() {
if (this.autoClose)
fs.closeSync(this.fd);
SyncWriteStream.prototype.destroySoon = SyncWriteStream.prototype.destroy;
var url = require('url');
var FreeList = require('freelist').FreeList;
var HTTPParser = process.binding('http_parser').HTTPParser;
var assert = require('assert').ok;
if (process.env.NODE_DEBUG && /http/.test(process.env.NODE_DEBUG)) {
debug = function(x) { console.error('HTTP: %s', x); };
if (!socket || !socket._handle || !socket._handle.readStart || socket._paused)
socket._handle.readStart();
if (!socket || !socket._handle || !socket._handle.readStop) return;
socket._handle.readStop();
// across multiple TCP packets or too large to be
// called to process trailing HTTP headers.
function parserOnHeaders(headers, url) {
if (this.maxHeaderPairs <= 0 ||
this._headers.length < this.maxHeaderPairs) {
this._headers = this._headers.concat(headers);
this._url  = url;
// info.headers and info.url are set only if .onHeaders()
// info.url is not set for response parsers but that's not
var headers = info.headers;
var url = info.url;
if (!url) {
url = parser._url;
parser._url = '';
parser.incoming = new IncomingMessage(parser.socket);
parser.incoming.httpVersionMajor = info.versionMajor;
parser.incoming.httpVersionMinor = info.versionMinor;
parser.incoming.httpVersion = info.versionMajor   '.'   info.versionMinor;
parser.incoming.url = url;
var n = headers.length;
// If parser.maxHeaderPairs <= 0 - assume that there're no limit
if (parser.maxHeaderPairs > 0) {
n = Math.min(n, parser.maxHeaderPairs);
parser.incoming._addHeaderLine(k, v);
if (info.method) {
parser.incoming.method = info.method;
parser.incoming.statusCode = info.statusCode;
parser.incoming.upgrade = info.upgrade;
if (!info.upgrade) {
// we'll emit this after parser.execute
skipBody = parser.onIncoming(parser.incoming, info.shouldKeepAlive);
// TODO: http.Parser should be a Writable emits request/response events.
var stream = parser.incoming;
var socket = stream.socket;
var slice = b.slice(start, start   len);
var ret = stream.push(slice);
stream.complete = true;
for (var i = 0, n = headers.length; i < n; i  = 2) {
parser.incoming._addHeaderLine(k, v);
parser._url = '';
if (!stream.upgrade)
// For upgraded connections, also emit this after parser.execute
stream.push(null);
if (stream && !parser.incoming._pendings.length) {
stream.push(null);
readStart(parser.socket);
var parser = new HTTPParser(HTTPParser.REQUEST);
parser._url = '';
// across multiple TCP packets or too large to be
// called to process trailing HTTP headers.
parser.onHeaders = parserOnHeaders;
parser.onHeadersComplete = parserOnHeadersComplete;
parser.onBody = parserOnBody;
parser.onMessageComplete = parserOnMessageComplete;
exports.parsers = parsers;
var STATUS_CODES = exports.STATUS_CODES = {
415 : 'Unsupported Media Type',
505 : 'HTTP Version Not Supported',
dateCache = d.toUTCString();
timers.enroll(utcDate, 1000 - d.getMilliseconds());
Stream.Readable.call(this);
this.socket = socket;
this.connection = socket;
this.httpVersion = null;
this.complete = false;
this.headers = {};
this.trailers = {};
this.readable = true;
this.url = '';
this.method = null;
this.statusCode = null;
this.client = this.socket;
util.inherits(IncomingMessage, Stream.Readable);
exports.IncomingMessage = IncomingMessage;
IncomingMessage.prototype.setTimeout = function(msecs, callback) {
this.on('timeout', callback);
this.socket.setTimeout(msecs);
IncomingMessage.prototype.read = function(n) {
this.read = Stream.Readable.prototype.read;
return this.read(n);
IncomingMessage.prototype._read = function(n) {
if (this.socket.readable)
readStart(this.socket);
IncomingMessage.prototype.destroy = function(error) {
if (this.socket)
this.socket.destroy(error);
// Per RFC2616, section 4.2 it is acceptable to join multiple instances of the
// same header with a ', ' if the header in question supports specification of
// always joined.
IncomingMessage.prototype._addHeaderLine = function(field, value) {
var dest = this.complete ? this.trailers : this.headers;
field = field.toLowerCase();
dest[field].push(value);
case 'sec-websocket-extensions':
case 'sec-websocket-protocol':
if (field.slice(0, 2) == 'x-') {
IncomingMessage.prototype._dump = function() {
if (this.socket.parser) this.socket.parser.incoming = null;
this.push(null);
this.read();
this.output = [];
this.outputEncodings = [];
this.chunkedEncoding = false;
this.shouldKeepAlive = true;
this.useChunkedEncodingByDefault = true;
this.sendDate = false;
this.finished = false;
this.socket = null;
this.connection = null;
util.inherits(OutgoingMessage, Stream);
exports.OutgoingMessage = OutgoingMessage;
OutgoingMessage.prototype.setTimeout = function(msecs, callback) {
if (!this.socket) {
this.once('socket', function(socket) {
socket.setTimeout(msecs);
this.socket.setTimeout(msecs);
OutgoingMessage.prototype.destroy = function(error) {
socket.destroy(error);
OutgoingMessage.prototype._send = function(data, encoding) {
this.output.unshift(this._header);
this.outputEncodings.unshift('ascii');
OutgoingMessage.prototype._writeRaw = function(data, encoding) {
if (data.length === 0) {
if (this.connection &&
this.connection._httpMessage === this &&
this.connection.writable &&
!this.connection.destroyed) {
// There might be pending data in the this.output buffer.
while (this.output.length) {
if (!this.connection.writable) {
var c = this.output.shift();
var e = this.outputEncodings.shift();
this.connection.write(c, e);
return this.connection.write(data, encoding);
} else if (this.connection && this.connection.destroyed) {
OutgoingMessage.prototype._buffer = function(data, encoding) {
this.output.push(data);
this.outputEncodings.push(encoding);
OutgoingMessage.prototype._storeHeader = function(firstLine, headers) {
// firstLine in the case of request is: 'GET /index.html HTTP/1.1\r\n'
// in the case of response it is: 'HTTP/1.1 200 OK\r\n'
var keys = Object.keys(headers);
var isArray = (Array.isArray(headers));
for (var i = 0, l = keys.length; i < l; i  ) {
var key = keys[i];
field = headers[key][0];
value = headers[key][1];
field = key;
value = headers[key];
if (Array.isArray(value)) {
for (var j = 0; j < value.length; j  ) {
if (this.sendDate == true && state.sentDateHeader == false) {
state.messageHeader  = 'Date: '   utcDate()   CRLF;
// node.js used to send out a zero chunk anyway to accommodate clients
var statusCode = this.statusCode;
this.chunkedEncoding === true) {
this.chunkedEncoding = false;
this.shouldKeepAlive = false;
if (state.sentConnectionHeader === false) {
var shouldSendKeepAlive = this.shouldKeepAlive &&
(state.sentContentLengthHeader ||
this.useChunkedEncodingByDefault ||
this.agent);
state.messageHeader  = 'Connection: keep-alive\r\n';
state.messageHeader  = 'Connection: close\r\n';
if (state.sentContentLengthHeader == false &&
state.sentTransferEncodingHeader == false) {
if (this.useChunkedEncodingByDefault) {
state.messageHeader  = 'Transfer-Encoding: chunked\r\n';
this.chunkedEncoding = true;
this.chunkedEncoding = false;
this._header = state.messageHeader   CRLF;
if (state.sentExpect) this._send('');
if (/[\r\n]/.test(value))
value = value.replace(/[\r\n] [ \t]*/g, '');
state.messageHeader  = field   ': '   value   CRLF;
if (connectionExpression.test(field)) {
state.sentConnectionHeader = true;
if (closeExpression.test(value)) {
self.shouldKeepAlive = true;
} else if (transferEncodingExpression.test(field)) {
state.sentTransferEncodingHeader = true;
if (chunkExpression.test(value)) self.chunkedEncoding = true;
} else if (contentLengthExpression.test(field)) {
state.sentContentLengthHeader = true;
} else if (dateExpression.test(field)) {
state.sentDateHeader = true;
} else if (expectExpression.test(field)) {
state.sentExpect = true;
OutgoingMessage.prototype.setHeader = function(name, value) {
if (arguments.length < 2) {
var key = name.toLowerCase();
this._headers[key] = value;
this._headerNames[key] = name;
OutgoingMessage.prototype.getHeader = function(name) {
if (arguments.length < 1) {
return this._headers[key];
OutgoingMessage.prototype.removeHeader = function(name) {
delete this._headers[key];
delete this._headerNames[key];
OutgoingMessage.prototype._renderHeaders = function() {
var keys = Object.keys(this._headers);
for (var i = 0, l = keys.length; i < l; i  ) {
var key = keys[i];
headers[this._headerNames[key]] = this._headers[key];
Object.defineProperty(OutgoingMessage.prototype, 'headersSent', {
var chunklen = chunk.length;
// Skip expensive Buffer.byteLength() calls; only ISO-8859-1 characters
// are allowed in HTTP headers, therefore:
// headers.length == Buffer.byteLength(headers.length)
// trailers.length == Buffer.byteLength(trailers.length)
// a violation of the spec but de facto correct because many HTTP
if (headers !== '') buflen  = headers.length;
if (trailers !== '') buflen  = trailers.length;
buf.write(headers, 0, headers.length, 'ascii');
offset = headers.length;
chunk.copy(buf, offset);
buf.write(trailers, offset, trailers.length, 'ascii');
OutgoingMessage.prototype.write = function(chunk, encoding) {
if (typeof chunk !== 'string' && !Buffer.isBuffer(chunk)) {
if (chunk.length === 0) return true;
if (this.chunkedEncoding) {
len = Buffer.byteLength(chunk, encoding);
chunk = len.toString(16)   CRLF   chunk   CRLF;
} else if (Buffer.isBuffer(chunk)) {
len = Buffer.byteLength(chunk, encoding);
len = chunk.length;
this._send(len.toString(16)   CRLF, 'ascii');
OutgoingMessage.prototype.addTrailers = function(headers) {
var keys = Object.keys(headers);
var isArray = (Array.isArray(headers));
field = headers[key][0];
value = headers[key][1];
field = key;
value = headers[key];
OutgoingMessage.prototype.end = function(data, encoding) {
if (this.finished) {
'Ignoring data passed to end().');
(data && data.length > 0) &&
this.output.length === 0 &&
this.connection &&
this.connection.writable &&
this.connection._httpMessage === this;
// magic numbers are awful, but slow http responses are worse.
if (hot && Buffer.isBuffer(data) && data.length > 120 * 1024)
// res.writeHead();
// res.end(blah);
if (this.chunkedEncoding) {
var l = Buffer.byteLength(data, encoding).toString(16);
ret = this.connection.write(this._header   l   CRLF  
ret = this.connection.write(this._header   data, encoding);
} else if (Buffer.isBuffer(data)) {
ret = this.connection.write(buf);
var header_len = this._header.length;
var buf = new Buffer(header_len   data.length);
buf.write(this._header, 0, header_len, 'ascii');
data.copy(buf, header_len);
ret = this.write(data, encoding);
if (this.chunkedEncoding) {
this.finished = true;
if (this.output.length === 0 && this.connection._httpMessage === this) {
OutgoingMessage.prototype._finish = function() {
assert(this.connection);
this.emit('finish');
OutgoingMessage.prototype._flush = function() {
// In both HTTP servers and clients it is possible to queue up several
// req1 = client.request('GET', '/');
// req2 = client.request('POST', '/');
// req2.write('hello world\n');
if (!this.socket) return;
while (this.output.length) {
if (!this.socket.writable) return; // XXX Necessary?
var data = this.output.shift();
var encoding = this.outputEncodings.shift();
ret = this.socket.write(data, encoding);
// This is necessary to prevent https from breaking
this.emit('drain');
OutgoingMessage.call(this);
if (req.method === 'HEAD') this._hasBody = false;
this.sendDate = true;
if (req.httpVersionMajor < 1 || req.httpVersionMinor < 1) {
this.useChunkedEncodingByDefault = chunkExpression.test(req.headers.te);
util.inherits(ServerResponse, OutgoingMessage);
exports.ServerResponse = ServerResponse;
ServerResponse.prototype.statusCode = 200;
// EventEmitter.emit makes a copy of the 'close' listeners array before
// var obj = new events.EventEmitter;
// obj.on('event', a);
// obj.on('event', b);
// function a() { obj.removeListener('event', b) }
// obj.emit('event'); // throws
if (this._httpMessage) this._httpMessage.emit('close');
ServerResponse.prototype.assignSocket = function(socket) {
assert(!socket._httpMessage);
socket._httpMessage = this;
socket.on('close', onServerResponseClose);
this.emit('socket', socket);
ServerResponse.prototype.detachSocket = function(socket) {
assert(socket._httpMessage == this);
socket.removeListener('close', onServerResponseClose);
socket._httpMessage = null;
this.socket = this.connection = null;
ServerResponse.prototype.writeContinue = function() {
this._writeRaw('HTTP/1.1 100 Continue'   CRLF   CRLF, 'ascii');
ServerResponse.prototype._implicitHeader = function() {
this.writeHead(this.statusCode);
ServerResponse.prototype.writeHead = function(statusCode) {
this.statusCode = statusCode;
// Slow-case: when progressive API and header fields are passed.
if (Array.isArray(obj)) {
for (var i = 0, len = obj.length; i < len;   i) {
obj.push([field, headers[field]]);
var keys = Object.keys(obj);
for (var i = 0; i < keys.length; i  ) {
var k = keys[i];
var statusLine = 'HTTP/1.1 '   statusCode.toString()   ' '  
// RFC 2616, 10.2.5:
// RFC 2616, 10.3.5:
ServerResponse.prototype.writeHeader = function() {
this.writeHead.apply(this, arguments);
// an Agent instance holds connections for a variable number of host:ports.
// Another departure is that all code related to HTTP parsing is in
// ClientRequest.onSocket(). The Agent is now *strictly*
self.options = options || {};
self.requests = {};
self.sockets = {};
self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets;
self.on('free', function(socket, host, port, localAddress) {
var name = host   ':'   port;
if (!socket.destroyed &&
self.requests[name] && self.requests[name].length) {
self.requests[name].shift().onSocket(socket);
if (self.requests[name].length === 0) {
delete self.requests[name];
socket.destroy();
self.createConnection = net.createConnection;
util.inherits(Agent, EventEmitter);
exports.Agent = Agent;
Agent.defaultMaxSockets = 5;
Agent.prototype.defaultPort = 80;
Agent.prototype.addRequest = function(req, host, port, localAddress) {
var name = host   ':'   port;
if (!this.sockets[name]) {
this.sockets[name] = [];
if (this.sockets[name].length < this.maxSockets) {
req.onSocket(this.createSocket(name, host, port, localAddress, req));
if (!this.requests[name]) {
this.requests[name] = [];
this.requests[name].push(req);
Agent.prototype.createSocket = function(name, host, port, localAddress, req) {
var options = util._extend({}, self.options);
options.port = port;
options.host = host;
options.localAddress = localAddress;
options.servername = host;
var hostHeader = req.getHeader('host');
options.servername = hostHeader.replace(/:.*$/, '');
var s = self.createConnection(options);
if (!self.sockets[name]) {
self.sockets[name] = [];
this.sockets[name].push(s);
self.emit('free', s, host, port, localAddress);
s.on('free', onFree);
self.removeSocket(s, name, host, port, localAddress);
s.on('close', onClose);
// We need this function for cases like HTTP 'upgrade'
// (defined by WebSockets) where we need to remove a socket from the pool
s.removeListener('close', onClose);
s.removeListener('free', onFree);
s.removeListener('agentRemove', onRemove);
s.on('agentRemove', onRemove);
Agent.prototype.removeSocket = function(s, name, host, port, localAddress) {
if (this.sockets[name]) {
var index = this.sockets[name].indexOf(s);
this.sockets[name].splice(index, 1);
if (this.sockets[name].length === 0) {
delete this.sockets[name];
if (this.requests[name] && this.requests[name].length) {
var req = this.requests[name][0];
this.createSocket(name, host, port, localAddress, req).emit('free');
exports.globalAgent = globalAgent;
OutgoingMessage.call(self);
self.agent = options.agent;
if (!options.agent && options.agent !== false && !options.createConnection)
self.agent = globalAgent;
var defaultPort = options.defaultPort || 80;
var port = options.port || defaultPort;
var host = options.hostname || options.host || 'localhost';
if (options.setHost === undefined) {
self.socketPath = options.socketPath;
var method = self.method = (options.method || 'GET').toUpperCase();
self.path = options.path || '/';
self.once('response', cb);
if (!Array.isArray(options.headers)) {
if (options.headers) {
var keys = Object.keys(options.headers);
for (var i = 0, l = keys.length; i < l; i  ) {
var key = keys[i];
self.setHeader(key, options.headers[key]);
if (host && !this.getHeader('host') && setHost) {
if (port &&  port !== defaultPort) {
hostHeader  = ':'   port;
this.setHeader('Host', hostHeader);
if (options.auth && !this.getHeader('Authorization')) {
this.setHeader('Authorization', 'Basic '  
new Buffer(options.auth).toString('base64'));
self.useChunkedEncodingByDefault = false;
self.useChunkedEncodingByDefault = true;
if (Array.isArray(options.headers)) {
self._storeHeader(self.method   ' '   self.path   ' HTTP/1.1\r\n',
options.headers);
} else if (self.getHeader('expect')) {
if (self.socketPath) {
self.shouldKeepAlive = false;
if (options.createConnection) {
self.onSocket(options.createConnection(self.socketPath));
self.onSocket(net.createConnection(self.socketPath));
} else if (self.agent) {
self.shouldKeepAlive = true;
self.agent.addRequest(self, host, port, options.localAddress);
options.port = port;
options.host = host;
var conn = options.createConnection(options);
var conn = net.createConnection({
port: port,
localAddress: options.localAddress
self.onSocket(conn);
util.inherits(ClientRequest, OutgoingMessage);
exports.ClientRequest = ClientRequest;
ClientRequest.prototype._implicitHeader = function() {
this._storeHeader(this.method   ' '   this.path   ' HTTP/1.1\r\n',
ClientRequest.prototype.abort = function() {
if (this.res)
this.res._dump();
this.once('response', function(res) {
if (this.socket) {
this.socket.destroy();
error.code = 'ECONNRESET';
// up by doing `parser.data = {}`, which should
// be done in FreeList.free. `parsers.free(parser)`
parser.onIncoming = null;
if (parser.socket) {
parser.socket.onend = null;
parser.socket.ondata = null;
parser.socket.parser = null;
parser.socket = null;
parser.incoming = null;
parsers.free(parser);
req.parser = null;
var parser = socket.parser;
var req = socket._httpMessage;
debug('HTTP socket close');
req.emit('close');
if (req.res && req.res.readable) {
req.res.emit('aborted');
var res = req.res;
res.on('end', function() {
res.emit('close');
res.push(null);
} else if (!req.res && !req._hadError) {
req.emit('error', createHangUpError());
if (req.output)
req.output.length = 0;
if (req.outputEncodings)
req.outputEncodings.length = 0;
parser.finish();
debug('HTTP SOCKET ERROR: '   err.message   '\n'   err.stack);
req.emit('error', err);
socket.destroy();
var req = this._httpMessage;
var parser = this.parser;
if (!req.res) {
var ret = parser.execute(d, start, end - start);
socket.destroy();
req.emit('error', ret);
} else if (parser.incoming && parser.incoming.upgrade) {
var res = parser.incoming;
req.res = res;
socket.ondata = null;
socket.onend = null;
var bodyHead = d.slice(start   bytesParsed, end);
var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade';
if (EventEmitter.listenerCount(req, eventName) > 0) {
req.upgradeOrConnect = true;
socket.emit('agentRemove');
socket.removeListener('close', socketCloseListener);
socket.removeListener('error', socketErrorListener);
req.emit(eventName, res, socket, bodyHead);
req.emit('close');
} else if (parser.incoming && parser.incoming.complete &&
parser.incoming.statusCode !== 100) {
var socket = this.socket;
if (req.domain && !res.domain) {
debug('setting "res.domain"');
res.domain = req.domain;
if (req.res) {
req.res = res;
if (req.method === 'CONNECT') {
res.upgrade = true;
var isHeadResponse = req.method == 'HEAD';
if (res.statusCode == 100) {
delete req.res; // Clear res so that we don't hit double-responses.
req.emit('continue');
if (req.shouldKeepAlive && !shouldKeepAlive && !req.upgradeOrConnect) {
// If we've been upgraded (via WebSockets) we also shouldn't try to
req.shouldKeepAlive = false;
res.req = req;
res.on('end', responseOnEnd);
var handled = req.emit('response', res);
var req = res.req;
var socket = req.socket;
if (!req.shouldKeepAlive) {
if (socket.writable) {
debug('AGENT socket.destroySoon()');
socket.destroySoon();
assert(!socket.writable);
if (req.timeoutCb) {
socket.setTimeout(0, req.timeoutCb);
req.timeoutCb = null;
socket.removeListener('close', socketCloseListener);
socket.removeListener('error', socketErrorListener);
socket.emit('free');
ClientRequest.prototype.onSocket = function(socket) {
var parser = parsers.alloc();
req.socket = socket;
req.connection = socket;
parser.reinitialize(HTTPParser.RESPONSE);
parser.socket = socket;
req.parser = parser;
socket.parser = parser;
socket._httpMessage = req;
httpSocketSetup(socket);
if (typeof req.maxHeadersCount === 'number') {
parser.maxHeaderPairs = req.maxHeadersCount << 1;
parser.maxHeaderPairs = 2000;
socket.on('error', socketErrorListener);
socket.ondata = socketOnData;
socket.onend = socketOnEnd;
socket.on('close', socketCloseListener);
parser.onIncoming = parserOnIncomingClient;
req.emit('socket', socket);
ClientRequest.prototype._deferToConnect = function(method, arguments_, cb) {
// connected and writable. It's an important promisy thing for all the socket
if (self.socket.writable) {
self.socket[method].apply(self.socket, arguments_);
self.socket.once('connect', function() {
self.socket[method].apply(self.socket, arguments_);
if (!self.socket) {
self.once('socket', onSocket);
ClientRequest.prototype.setTimeout = function(msecs, callback) {
if (callback) this.once('timeout', callback);
self.emit('timeout');
if (this.socket && this.socket.writable) {
if (this.timeoutCb)
this.socket.setTimeout(0, this.timeoutCb);
this.timeoutCb = emitTimeout;
this.socket.setTimeout(msecs, emitTimeout);
this.timeoutCb = emitTimeout;
var sock = this.socket;
this.socket.once('connect', function() {
sock.setTimeout(msecs, emitTimeout);
this.once('socket', function(sock) {
sock.setTimeout(msecs, emitTimeout);
ClientRequest.prototype.setNoDelay = function() {
ClientRequest.prototype.setSocketKeepAlive = function() {
ClientRequest.prototype.clearTimeout = function(cb) {
this.setTimeout(0, cb);
exports.request = function(options, cb) {
options = url.parse(options);
if (options.protocol && options.protocol !== 'http:') {
throw new Error('Protocol:'   options.protocol   ' not supported.');
exports.get = function(options, cb) {
var req = exports.request(options, cb);
req.end();
if (this._httpMessage) this._httpMessage.emit('drain');
function httpSocketSetup(socket) {
socket.removeListener('drain', ondrain);
socket.on('drain', ondrain);
net.Server.call(this, { allowHalfOpen: true });
this.addListener('request', requestListener);
// hXXp://VVV.squid-cache.org/Doc/config/half_closed_clients/
// hXXp://wiki.squid-cache.org/SquidFaq/InnerWorkings#What_is_a_half-closed_filedescriptor.3F
this.httpAllowHalfOpen = false;
this.addListener('connection', connectionListener);
this.addListener('clientError', function(err, conn) {
conn.destroy(err);
this.timeout = 2 * 60 * 1000;
util.inherits(Server, net.Server);
Server.prototype.setTimeout = function(msecs, callback) {
this.timeout = msecs;
exports.Server = Server;
exports.createServer = function(requestListener) {
while (incoming.length) {
var req = incoming.shift();
req.emit('aborted');
// abort socket._httpMessage ?
if (this.parser)
freeParser(this.parser);
debug('SERVER new http connection');
httpSocketSetup(socket);
if (self.timeout)
socket.setTimeout(self.timeout);
socket.on('timeout', function() {
var req = socket.parser && socket.parser.incoming;
var reqTimeout = req && !req.complete && req.emit('timeout', socket);
var res = socket._httpMessage;
var resTimeout = res && res.emit('timeout', socket);
var serverTimeout = self.emit('timeout', socket);
var parser = parsers.alloc();
parser.reinitialize(HTTPParser.REQUEST);
parser.socket = socket;
socket.parser = parser;
parser.incoming = null;
if (typeof this.maxHeadersCount === 'number') {
parser.maxHeaderPairs = this.maxHeadersCount << 1;
parser.maxHeaderPairs = 2000;
socket.addListener('error', function(e) {
self.emit('clientError', e, this);
socket.ondata = function(d, start, end) {
var ret = parser.execute(d, start, end - start);
socket.destroy(ret);
} else if (parser.incoming && parser.incoming.upgrade) {
var req = parser.incoming;
socket.ondata = null;
socket.onend = null;
socket.removeListener('close', serverSocketCloseListener);
parser.finish();
var bodyHead = d.slice(start   bytesParsed, end);
var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade';
if (EventEmitter.listenerCount(self, eventName) > 0) {
self.emit(eventName, req, req.socket, bodyHead);
socket.destroy();
socket.parser.pause();
socket.onend = function() {
var ret = parser.finish();
if (!self.httpAllowHalfOpen) {
if (socket.writable) socket.end();
} else if (outgoing.length) {
outgoing[outgoing.length - 1]._last = true;
} else if (socket._httpMessage) {
socket._httpMessage._last = true;
socket.addListener('close', serverSocketCloseListener);
// new message. In this callback we setup the response object and pass it
socket.parser.resume();
socket.on('drain', socketOnDrain);
parser.onIncoming = function(req, shouldKeepAlive) {
incoming.push(req);
// pipelined requests that may never be resolved.
var needPause = socket._writableState.needDrain;
// the call to execute, because we may still be processing the last
res.shouldKeepAlive = shouldKeepAlive;
if (socket._httpMessage) {
outgoing.push(res);
res.assignSocket(socket);
res.on('finish', function() {
assert(incoming.length == 0 || incoming[0] === req);
incoming.shift();
// if the user never called req.read(), and didn't pipe() or
// .resume() or .on('data'), then we call req._dump() so that the
if (!req._consuming && !req._readableState.oldMode)
res.detachSocket(socket);
socket.destroySoon();
var m = outgoing.shift();
m.assignSocket(socket);
if (req.headers.expect !== undefined &&
(req.httpVersionMajor == 1 && req.httpVersionMinor == 1) &&
continueExpression.test(req.headers['expect'])) {
if (EventEmitter.listenerCount(self, 'checkContinue') > 0) {
self.emit('checkContinue', req, res);
res.writeContinue();
self.emit('request', req, res);
self.emit('request', req, res);
exports._connectionListener = connectionListener;
function Client(port, host) {
if (!(this instanceof Client)) return new Client(port, host);
port = port || 80;
this.host = host;
this.port = port;
this.agent = new Agent({ host: host, port: port, maxSockets: 1 });
util.inherits(Client, EventEmitter);
Client.prototype.request = function(method, path, headers) {
options.host = self.host;
options.port = self.port;
options.method = method;
options.path = path;
options.headers = headers;
options.agent = self.agent;
c.on('error', function(e) {
self.emit('error', e);
// This doesn't map to how we want things to operate in the future
c.on('socket', function(s) {
s.on('end', function() {
var ret = self._decoder.end();
self.emit('data', ret);
self.emit('end');
exports.Client = util.deprecate(Client,
'http.Client will be removed soon. Do not use it.');
exports.createClient = util.deprecate(function(port, host) {
return new Client(port, host);
}, 'http.createClient is deprecated. Use `http.request` instead.');
var http = require('http');
var inherits = require('util').inherits;
if (process.features.tls_npn && !opts.NPNProtocols) {
opts.NPNProtocols = ['http/1.1', 'http/1.0'];
tls.Server.call(this, opts, http._connectionListener);
inherits(Server, tls.Server);
exports.createServer = function(opts, requestListener) {
// HTTPS agents.
function createConnection(port, host, options) {
if (typeof port === 'object') {
options = port;
if (typeof port === 'number') {
options.port = port;
options.host = host;
return tls.connect(options);
http.Agent.call(this, options);
this.createConnection = createConnection;
inherits(Agent, http.Agent);
Agent.prototype.defaultPort = 443;
if (options.protocol && options.protocol !== 'https:') {
defaultPort: 443
if (typeof options.agent === 'undefined') {
if (typeof options.ca === 'undefined' &&
typeof options.cert === 'undefined' &&
typeof options.ciphers === 'undefined' &&
typeof options.key === 'undefined' &&
typeof options.passphrase === 'undefined' &&
typeof options.pfx === 'undefined' &&
typeof options.rejectUnauthorized === 'undefined') {
options.agent = globalAgent;
options.agent = new Agent(options);
return new http.ClientRequest(options, cb);
var Script = process.binding('evals').NodeScript;
var runInThisContext = Script.runInThisContext;
var runInNewContext = Script.runInNewContext;
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: hXXps://github.com/joyent/node/issues/1707
return Object.prototype.hasOwnProperty.call(obj, prop);
this.id = id;
this.exports = {};
this.parent = parent;
if (parent && parent.children) {
parent.children.push(this);
this.filename = null;
this.loaded = false;
this.children = [];
module.exports = Module;
Module._contextLoad = ( process.env['NODE_MODULE_CONTEXTS'] > 0);
Module.globalPaths = [];
Module.wrapper = NativeModule.wrapper;
Module.wrap = NativeModule.wrap;
var path = NativeModule.require('path');
if (process.env.NODE_DEBUG && /module/.test(process.env.NODE_DEBUG)) {
console.error(x);
var fs = NativeModule.require('fs');
return fs.statSync(path);
// check if the directory is a package.json dir
var jsonPath = path.resolve(requestPath, 'package.json');
var json = fs.readFileSync(jsonPath, 'utf8');
var pkg = packageMainCache[requestPath] = JSON.parse(json).main;
e.path = jsonPath;
e.message = 'Error parsing '   jsonPath   ': '   e.message;
var filename = path.resolve(requestPath, pkg);
tryExtensions(path.resolve(filename, 'index'), exts);
if (stats && !stats.isDirectory()) {
return fs.realpathSync(requestPath, Module._realpathCache);
for (var i = 0, EL = exts.length; i < EL; i  ) {
var exts = Object.keys(Module._extensions);
if (request.charAt(0) === '/') {
var trailingSlash = (request.slice(-1) === '/');
var cacheKey = JSON.stringify({request: request, paths: paths});
if (Module._pathCache[cacheKey]) {
return Module._pathCache[cacheKey];
for (var i = 0, PL = paths.length; i < PL; i  ) {
var basePath = path.resolve(paths[i], request);
// try to join the request to the path
filename = tryExtensions(path.resolve(basePath, 'index'), exts);
Module._pathCache[cacheKey] = filename;
from = path.resolve(from);
// to be absolute. Doing a fully-edge-case-correct path.split
// that works on both Windows and Posix is non-trivial.
var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\//;
var joiner = process.platform === 'win32' ? '\\' : '/';
var parts = from.split(splitRe);
for (var tip = parts.length - 1; tip >= 0; tip--) {
var dir = parts.slice(0, tip   1).concat('node_modules').join(joiner);
paths.push(dir);
if (NativeModule.exists(request)) {
var start = request.substring(0, 2);
if (!parent.paths) parent.paths = [];
paths = parent.paths.concat(paths);
// with --eval, parent.id is not set and parent.filename is null
if (!parent || !parent.id || !parent.filename) {
var mainPaths = ['.'].concat(modulePaths);
mainPaths = Module._nodeModulePaths('.').concat(mainPaths);
var isIndex = /^index\.\w ?$/.test(path.basename(parent.filename));
var parentIdPath = isIndex ? parent.id : path.dirname(parent.id);
var id = path.resolve(parentIdPath, request);
if (parentIdPath === '.' && id.indexOf('/') === -1) {
' set ID to: '   id   ' from '   parent.id);
return [id, [path.dirname(parent.filename)]];
debug('Module._load REQUEST '   (request)   ' parent: '   parent.id);
return cachedModule.exports;
if (NativeModule.exists(filename)) {
replModule._compile(NativeModule.getSource('repl'), 'repl.js');
NativeModule._cache.repl = replModule;
return replModule.exports;
return NativeModule.require(filename);
process.mainModule = module;
module.id = '.';
module.load(filename);
return module.exports;
// look up the filename first, since that's the cache key.
debug('looking for '   JSON.stringify(id)  
' in '   JSON.stringify(paths));
err.code = 'MODULE_NOT_FOUND';
Module.prototype.load = function(filename) {
debug('load '   JSON.stringify(filename)  
' for module '   JSON.stringify(this.id));
assert(!this.loaded);
this.filename = filename;
this.paths = Module._nodeModulePaths(path.dirname(filename));
var extension = path.extname(filename) || '.js';
if (!Module._extensions[extension]) extension = '.js';
this.loaded = true;
Module.prototype.require = function(path) {
// Resolved path to process.argv[1] will be lazily placed here
Module.prototype._compile = function(content, filename) {
content = content.replace(/^\#\!.*/, '');
return self.require(path);
require.resolve = function(request) {
Object.defineProperty(require, 'paths', { get: function() {
throw new Error('require.paths is removed. Use '  
require.main = process.mainModule;
// Enable support to add extra extension types
require.extensions = Module._extensions;
require.registerExtension = function() {
throw new Error('require.registerExtension() removed. Use '  
'require.extensions instead.');
require.cache = Module._cache;
var dirname = path.dirname(filename);
if (self.id !== '.') {
sandbox.require = require;
sandbox.exports = self.exports;
sandbox.module = self;
sandbox.global = sandbox;
sandbox.root = root;
global.require = require;
global.exports = self.exports;
global.module = self;
var wrapper = Module.wrap(content);
if (process.argv[1]) {
resolvedArgv = Module._resolveFilename(process.argv[1], null);
global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0);
var args = [self.exports, require, self, filename, dirname];
return compiledWrapper.apply(self.exports, args);
// because the buffer-to-string conversion in `fs.readFileSync()`
if (content.charCodeAt(0) === 0xFEFF) {
content = content.slice(1);
// Native extension for .js
Module._extensions['.js'] = function(module, filename) {
var content = NativeModule.require('fs').readFileSync(filename, 'utf8');
// Native extension for .json
Module._extensions['.json'] = function(module, filename) {
module.exports = JSON.parse(stripBOM(content));
err.message = filename   ': '   err.message;
//Native extension for .node
Module._extensions['.node'] = process.dlopen;
Module.runMain = function() {
Module._load(process.argv[1], null, true);
var isWindows = process.platform === 'win32';
if (isWindows) {
var homeDir = process.env.USERPROFILE;
var homeDir = process.env.HOME;
var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
paths.unshift(path.resolve(homeDir, '.node_libraries'));
paths.unshift(path.resolve(homeDir, '.node_modules'));
if (process.env['NODE_PATH']) {
var splitter = isWindows ? ';' : ':';
paths = process.env['NODE_PATH'].split(splitter).concat(paths);
Module.globalPaths = modulePaths.slice(0);
Module.requireRepl = function() {
Module.Module = Module;
var cares = process.binding('cares_wrap');
function createPipe() {
var Pipe = process.binding('pipe_wrap').Pipe;
return new Pipe();
function createTCP() {
var TCP = process.binding('tcp_wrap').TCP;
return new TCP();
var tty = process.binding('tty_wrap');
var type = tty.guessHandleType(fd);
if (type === 'PIPE') return createPipe();
if (type === 'TCP') return createTCP();
throw new TypeError('Unsupported fd type: '   type);
if (process.env.NODE_DEBUG && /net/.test(process.env.NODE_DEBUG)) {
var pid = process.pid;
if (!console.error)
console.error('NET: %d', pid,
util.format.apply(util, arguments).slice(0, 500));
function isPipeName(s) {
exports.createServer = function() {
// var s = net.connect({port: 80, host: 'google.com'}, function() {
// connect(port, [host], [cb])
exports.connect = exports.createConnection = function() {
return Socket.prototype.connect.apply(s, args);
// It is the same as the argument of Socket.prototype.connect().
} else if (isPipeName(args[0])) {
options.path = args[0];
// connect(port, [host], [cb])
options.port = args[0];
options.host = args[1];
var cb = args[args.length - 1];
exports._normalizeConnectArgs = normalizeConnectArgs;
self.destroyed = false;
self.bytesRead = 0;
self._handle.owner = self;
self._handle.onread = onread;
stream.Duplex.call(this, options);
if (options.handle) {
this._handle = options.handle; // private
} else if (typeof options.fd !== 'undefined') {
this._handle = createHandle(options.fd);
this._handle.open(options.fd);
this.readable = options.readable !== false;
this.writable = options.writable !== false;
this.readable = this.writable = false;
this.onend = null;
this.on('finish', onSocketFinish);
this.on('_socketEnd', onSocketEnd);
this._writableState.decodeStrings = false;
this.allowHalfOpen = options && options.allowHalfOpen || false;
if (this._handle && options.readable !== false)
this.read(0);
util.inherits(Socket, stream.Duplex);
// the user has called .end(), and all the bytes have been
return this.once('connect', onSocketFinish);
if (!this.readable || this._readableState.ended) {
return this.destroy();
if (!this._handle || !this._handle.shutdown)
var shutdownReq = this._handle.shutdown();
shutdownReq.oncomplete = afterShutdown;
debug('afterShutdown destroyed=%j', self.destroyed,
if (self.destroyed)
if (self._readableState.ended) {
self.destroy();
self.once('_socketEnd', self.destroy);
this._readableState.ended = true;
if (this._readableState.endEmitted) {
this.readable = false;
this.once('end', function() {
this.readable = false;
if (!this.allowHalfOpen) {
this.write = writeAfterFIN;
this.destroySoon();
er.code = 'EPIPE';
self.emit('error', er);
exports.Stream = Socket; // Legacy naming.
Socket.prototype.read = function(n) {
return stream.Readable.prototype.read.call(this, n);
this.read = stream.Readable.prototype.read;
Socket.prototype.listen = function() {
debug('socket.listen');
self.on('connection', arguments[0]);
Socket.prototype.setTimeout = function(msecs, callback) {
timers.enroll(this, msecs);
this.once('timeout', callback);
timers.unenroll(this);
this.removeListener('timeout', callback);
Socket.prototype._onTimeout = function() {
this.emit('timeout');
Socket.prototype.setNoDelay = function(enable) {
if (this._handle && this._handle.setNoDelay)
this._handle.setNoDelay(typeof enable === 'undefined' ? true : !!enable);
Socket.prototype.setKeepAlive = function(setting, msecs) {
if (this._handle && this._handle.setKeepAlive)
this._handle.setKeepAlive(setting, ~~(msecs / 1000));
if (this._handle && this._handle.getsockname) {
return this._handle.getsockname();
Object.defineProperty(Socket.prototype, 'readyState', {
} else if (this.readable && this.writable) {
} else if (this.readable && !this.writable) {
} else if (!this.readable && this.writable) {
Object.defineProperty(Socket.prototype, 'bufferSize', {
return this._handle.writeQueueSize   this._writableState.length;
// Just call handle.readStart until we have enough in the buffer
Socket.prototype._read = function(n) {
this.once('connect', this._read.bind(this, n));
} else if (!this._handle.reading) {
this._handle.reading = true;
var r = this._handle.readStart();
Socket.prototype.end = function(data, encoding) {
stream.Duplex.prototype.end.call(this, data, encoding);
this.writable = false;
if (this.readable && !this._readableState.endEmitted)
if (!socket.readable &&
!socket.writable &&
!socket.destroyed &&
!socket._writableState.length) {
Socket.prototype.destroySoon = function() {
if (this.writable)
this.end();
if (this._writableState.finished)
this.destroy();
this.once('finish', this.destroy);
Socket.prototype._destroy = function(exception, cb) {
if (exception && !self._writableState.errorEmitted) {
self.emit('error', exception);
self._writableState.errorEmitted = true;
if (this.destroyed) {
this.readable = this.writable = false;
timers.unenroll(this);
if (this !== process.stderr)
this._handle.close(function() {
self.emit('close', isException);
this._handle.onread = noop;
// to make it re-entrance safe in case Socket.prototype.destroy()
if (this.server) {
this.server._connections--;
if (this.server._emitCloseIfDrained) {
this.server._emitCloseIfDrained();
Socket.prototype.destroy = function(exception) {
// if it's not enough data, we'll just call handle.readStart()
self.bytesRead  = length;
if (self.ondata) self.ondata(buffer, offset, end);
else ret = self.push(buffer.slice(offset, end));
if (handle.reading && !ret) {
handle.reading = false;
var r = handle.readStop();
if (self._readableState.length === 0) {
self.readable = false;
if (self.onend) self.once('end', self.onend);
self.push(null);
self.emit('_socketEnd');
Socket.prototype._getpeername = function() {
if (!this._handle || !this._handle.getpeername) {
this._peername = this._handle.getpeername();
Socket.prototype.__defineGetter__('remoteAddress', function() {
return this._getpeername().address;
Socket.prototype.__defineGetter__('remotePort', function() {
return this._getpeername().port;
Socket.prototype._getsockname = function() {
if (!this._handle || !this._handle.getsockname) {
this._sockname = this._handle.getsockname();
Socket.prototype.__defineGetter__('localAddress', function() {
return this._getsockname().address;
Socket.prototype.__defineGetter__('localPort', function() {
return this._getsockname().port;
Socket.prototype.write = function(chunk, encoding, cb) {
if (typeof chunk !== 'string' && !Buffer.isBuffer(chunk))
return stream.Duplex.prototype.write.apply(this, arguments);
Socket.prototype._write = function(data, encoding, cb) {
this.once('connect', function() {
var enc = Buffer.isBuffer(data) ? 'buffer' : encoding;
writeReq.oncomplete = afterWrite;
this._bytesDispatched  = writeReq.bytes;
if (this._handle.writeQueueSize === 0)
writeReq.cb = cb;
return handle.writeBuffer(data);
return handle.writeUtf8String(data);
return handle.writeAsciiString(data);
return handle.writeUcs2String(data);
return handle.writeBuffer(new Buffer(data, encoding));
Socket.prototype.__defineGetter__('bytesWritten', function() {
state.buffer.forEach(function(el) {
if (Buffer.isBuffer(el.chunk))
bytes  = el.chunk.length;
bytes  = Buffer.byteLength(el.chunk, el.encoding);
if (Buffer.isBuffer(data))
bytes  = data.length;
bytes  = Buffer.byteLength(data, encoding);
if (self !== process.stderr && self !== process.stdout)
if (self.destroyed) {
self._destroy(errnoException(process._errno, 'write'), req.cb);
req.cb.call(self);
function connect(self, address, port, addressType, localAddress) {
// TODO return promise from Socket.prototype.connect which
assert.ok(self._connecting);
r = self._handle.bind6(localAddress);
r = self._handle.bind(localAddress);
connectReq = self._handle.connect6(address, port);
connectReq = self._handle.connect(address, port);
connectReq = self._handle.connect(address, afterConnect);
connectReq.oncomplete = afterConnect;
Socket.prototype.connect = function(options, cb) {
if (this.write !== Socket.prototype.write)
this.write = Socket.prototype.write;
return Socket.prototype.connect.apply(this, args);
this._readableState.reading = false;
this._readableState.ended = false;
this._readableState.endEmitted = false;
this._writableState.ended = false;
this._writableState.ending = false;
this._writableState.finished = false;
this.destroyed = false;
var pipe = !!options.path;
this._handle = pipe ? createPipe() : createTCP();
self.once('connect', cb);
self.writable = true;
if (pipe) {
connect(self, options.path);
} else if (!options.host) {
connect(self, '127.0.0.1', options.port, 4);
var host = options.host;
require('dns').lookup(host, function(err, ip, addressType) {
// net.createConnection() creates a net.Socket object and
// immediately calls net.Socket.connect() on it (that's us).
self.emit('error', err);
// node_net.cc handles null host names graciously but user land
ip = ip || (addressType === 4 ? '127.0.0.1' : '0:0:0:0:0:0:0:1');
connect(self, ip, options.port, addressType, options.localAddress);
self.readable = readable;
self.writable = writable;
self.emit('connect');
self.read(0);
self.on('connection', arguments[0]);
self.on('connection', arguments[1]);
Object.defineProperty(this, 'connections', {
get: util.deprecate(function() {
set: util.deprecate(function(val) {
this.allowHalfOpen = options.allowHalfOpen || false;
util.inherits(Server, events.EventEmitter);
var createServerHandle = exports._createServerHandle =
function(address, port, addressType, fd) {
debug('listen invalid fd='   fd   ': '   e.message);
handle.open(fd);
handle.readable = true;
handle.writable = true;
} else if (port == -1 && addressType == -1) {
handle = createPipe();
var instances = parseInt(process.env.NODE_PENDING_PIPE_INSTANCES);
handle.setPendingInstances(instances);
handle = createTCP();
if (address || port) {
r = handle.bind6(address, port);
r = handle.bind(address, port);
handle.close();
Server.prototype._listen2 = function(address, port, addressType, backlog, fd) {
debug('listen2', address, port, addressType, backlog);
self._handle = createServerHandle(address, port, addressType, fd);
self.emit('error', error);
self._handle.onconnection = onconnection;
self._handle.owner = self;
// Use a backlog of 512 entries. We pass 511 to the listen() call because
r = self._handle.listen(backlog || 511);
self.emit('error', ex);
// generate connection key, this should be unique to the connection
this._connectionKey = addressType   ':'   address   ':'   port;
self.emit('listening');
function listen(self, address, port, addressType, backlog, fd) {
self._listen2(address, port, addressType, backlog, fd);
cluster._getServer(self, address, port, addressType, fd, function(handle,
self.emit('error', errnoException(err, 'bind'));
// Some operating systems (notably OS X and Solaris) don't report
// actual port matches what we requested and if not, raise an error.
// The exception is when port == 0 because that means "any random
// port".
if (port && handle.getsockname && port != handle.getsockname().port) {
self.emit('error', errnoException('EADDRINUSE', 'bind'));
self._listen2(address, port, addressType, backlog, fd);
Server.prototype.listen = function() {
var lastArg = arguments[arguments.length - 1];
self.once('listening', lastArg);
var port = toNumber(arguments[0]);
if (arguments.length == 0 || typeof arguments[0] == 'function') {
// Bind to a random port.
listen(self, '0.0.0.0', 0, null, backlog);
} else if (h.handle) {
h = h.handle;
if (h instanceof TCP) {
} else if (typeof h.fd === 'number' && h.fd >= 0) {
listen(self, null, null, null, backlog, h.fd);
} else if (isPipeName(arguments[0])) {
// UNIX socket or Windows pipe.
var pipeName = self._pipeName = arguments[0];
listen(self, pipeName, -1, -1, backlog);
// The first argument is the port, no IP given.
listen(self, '0.0.0.0', port, 4, backlog);
// The first argument is the port, the second an IP.
require('dns').lookup(arguments[1], function(err, ip, addressType) {
self.emit('error', err);
listen(self, ip || '0.0.0.0', port, ip ? addressType : 4, backlog);
Server.prototype.address = function() {
} else if (this._pipeName) {
return this._pipeName;
self.emit('error', errnoException(process._errno, 'accept'));
if (self.maxConnections && self._connections >= self.maxConnections) {
clientHandle.close();
allowHalfOpen: self.allowHalfOpen
socket.readable = socket.writable = true;
socket.server = self;
self.emit('connection', socket);
Server.prototype.getConnections = function(cb) {
var left = this._slaves.length,
this._slaves.forEach(function(slave) {
slave.getConnections(oncount);
Server.prototype.close = function(cb) {
left = this._slaves.length;
this._slaves.forEach(function(slave) {
slave.close(onSlaveClose);
Server.prototype._emitCloseIfDrained = function() {
debug('SERVER handle? %j connections? %d',
self.emit('close');
Server.prototype.listenFD = util.deprecate(function(fd, type) {
return this.listen({ fd: fd });
Server.prototype._setupSlave = function(socketList) {
this._slaves.push(socketList);
Server.prototype.ref = function() {
Server.prototype.unref = function() {
exports.isIP = cares.isIP;
exports.isIPv4 = function(input) {
return exports.isIP(input) === 4;
exports.isIPv6 = function(input) {
return exports.isIP(input) === 6;
if (process.platform === 'win32') {
exports._setSimultaneousAccepts = function(handle) {
simultaneousAccepts = (process.env.NODE_MANY_ACCEPTS &&
process.env.NODE_MANY_ACCEPTS !== '0');
handle.setSimultaneousAccepts(simultaneousAccepts);
exports._setSimultaneousAccepts = function(handle) {};
var binding = process.binding('os');
exports.endianness = binding.getEndianness;
exports.hostname = binding.getHostname;
exports.loadavg = binding.getLoadAvg;
exports.uptime = binding.getUptime;
exports.freemem = binding.getFreeMem;
exports.totalmem = binding.getTotalMem;
exports.cpus = binding.getCPUs;
exports.type = binding.getOSType;
exports.release = binding.getOSRelease;
exports.networkInterfaces = binding.getInterfaceAddresses;
exports.arch = function() {
return process.arch;
exports.platform = function() {
return process.platform;
exports.tmpdir = function() {
return process.env.TMPDIR ||
process.env.TMP ||
process.env.TEMP ||
(process.platform === 'win32' ? 'c:\\windows\\temp' : '/tmp');
exports.tmpDir = exports.tmpdir;
exports.getNetworkInterfaces = util.deprecate(function() {
return exports.networkInterfaces();
}, 'getNetworkInterfaces is now called `os.networkInterfaces`.');
exports.EOL = process.platform === 'win32' ? '\r\n' : '\n';
for (var i = parts.length - 1; i >= 0; i--) {
parts.splice(i, 1);
parts.unshift('..');
// Regex to split a windows path into three parts: [*, device, slash,
// tail] windows-only
// windows version
var result = splitDeviceRe.exec(filename),
var result2 = splitTailRe.exec(tail),
return '\\\\'   device.replace(/^[\\\/] /, '').replace(/[\\\/] /g, '\\');
// path.resolve([from ...], to)
exports.resolve = function() {
for (var i = arguments.length - 1; i >= -1; i--) {
path = process.cwd();
// Windows has the concept of drive-specific current working
path = process.env['='   resolvedDevice];
if (!path || path.substr(0, 3).toLowerCase() !==
resolvedDevice.toLowerCase()   '\\') {
throw new TypeError('Arguments to path.resolve must be strings');
var result = splitDeviceRe.exec(path),
isUnc = device && device.charAt(1) !== ':',
device.toLowerCase() !== resolvedDevice.toLowerCase()) {
// but handle relative paths to be safe (might happen when process.cwd()
resolvedTail = normalizeArray(resolvedTail.split(/[\\\/] /).filter(f),
!resolvedAbsolute).join('\\');
exports.normalize = function(path) {
var result = splitDeviceRe.exec(path),
isUnc = device && device.charAt(1) !== ':',
trailingSlash = /[\\\/]$/.test(tail);
tail = normalizeArray(tail.split(/[\\\/] /).filter(function(p) {
}), !isAbsolute).join('\\');
exports.join = function() {
throw new TypeError('Arguments to path.join must be strings');
var paths = Array.prototype.filter.call(arguments, f);
var joined = paths.join('\\');
// Make sure that the joined path doesn't start with two slashes, because
// This means that the user can use join to construct UNC paths from
// path.join('//server', 'share') -> '\\\\server\\share\')
if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) {
joined = joined.replace(/^[\\\/]{2,}/, '\\');
return exports.normalize(joined);
// path.relative(from, to)
exports.relative = function(from, to) {
from = exports.resolve(from);
to = exports.resolve(to);
// windows is not case sensitive
var lowerFrom = from.toLowerCase();
var lowerTo = to.toLowerCase();
for (; start < arr.length; start  ) {
var end = arr.length - 1;
return arr.slice(start, end - start   1);
var toParts = trim(to.split('\\'));
var lowerFromParts = trim(lowerFrom.split('\\'));
var lowerToParts = trim(lowerTo.split('\\'));
var length = Math.min(lowerFromParts.length, lowerToParts.length);
for (var i = samePartsLength; i < lowerFromParts.length; i  ) {
outputParts.push('..');
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('\\');
exports.sep = '\\';
exports.delimiter = ';';
return splitPathRe.exec(filename).slice(1);
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
resolvedAbsolute = path.charAt(0) === '/';
// handle relative paths to be safe (might happen when process.cwd() fails)
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function(p) {
}), !resolvedAbsolute).join('/');
// path.normalize(path)
var isAbsolute = path.charAt(0) === '/',
trailingSlash = path.substr(-1) === '/';
path = normalizeArray(path.split('/').filter(function(p) {
}), !isAbsolute).join('/');
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(paths.filter(function(p, index) {
}).join('/'));
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
for (var i = samePartsLength; i < fromParts.length; i  ) {
return outputParts.join('/');
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function(path) {
dir = dir.substr(0, dir.length - 1);
exports.basename = function(path, ext) {
// TODO: make this comparison case-insensitive on windows?
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
exports.extname = function(path) {
exports.exists = util.deprecate(function(path, callback) {
require('fs').exists(path, callback);
}, 'path.exists is now called `fs.exists`.');
exports.existsSync = util.deprecate(function(path) {
return require('fs').existsSync(path);
}, 'path.existsSync is now called `fs.existsSync`.');
exports._makeLong = function(path) {
var resolvedPath = exports.resolve(path);
if (/^[a-zA-Z]\:\\/.test(resolvedPath)) {
return '\\\\?\\'   resolvedPath;
} else if (/^\\\\[^?.]/.test(resolvedPath)) {
return '\\\\?\\UNC\\'   resolvedPath.substring(2);
/*! hXXp://mths.be/punycode v1.2.0 by @mathias */
/** Detect free variables `define`, `exports`, `module` and `require` */
freeDefine = typeof define == 'function' && typeof define.amd == 'object' &&
define.amd && define,
freeExports = typeof exports == 'object' && exports,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
var length = array.length;
return map(string.split(regexSeparators), fn).join('.');
* @see `punycode.ucs2.encode`
* @see <hXXp://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
length = string.length,
value = string.charCodeAt(counter  );
extra = string.charCodeAt(counter  );
output.push(((value & 0x3FF) << 10)   (extra & 0x3FF)   0x10000);
output.push(value, extra);
output.push(value);
* @see `punycode.ucs2.decode`
}).join('');
* hXXp://tools.ietf.org/html/rfc3492#section-3.4
inputLength = input.length,
basic = input.lastIndexOf(delimiter);
if (input.charCodeAt(j) >= 0x80) {
output.push(input.charCodeAt(j));
digit = basicToDigit(input.charCodeAt(index  ));
out = output.length   1;
output.splice(i  , 0, n);
inputLength = input.length;
output.push(stringFromCharCode(currentValue));
handledCPCount = basicLength = output.length;
output.push(delimiter);
output.push(
output.push(stringFromCharCode(digitToBasic(q, 0)));
return output.join('');
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
return regexNonASCII.test(string)
* A string representing the current Punycode.js version number.
'version': '1.2.0',
if (freeExports) {
if (freeModule && freeModule.exports == freeExports) {
// in Node.js or Ringo 0.8 
freeModule.exports = punycode;
for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
// via curl.js or RequireJS
root.punycode = punycode;
var QueryString = exports;
return c.charCodeAt(0);
QueryString.unescapeBuffer = function(s, decodeSpaces) {
var out = new Buffer(s.length);
for (var inIndex = 0, outIndex = 0; inIndex <= s.length; inIndex  ) {
var c = s.charCodeAt(inIndex);
// pass thru
// TODO support returning arbitrary buffers.
return out.slice(0, outIndex - 1);
QueryString.unescape = function(s, decodeSpaces) {
return QueryString.unescapeBuffer(s, decodeSpaces).toString();
QueryString.escape = function(str) {
QueryString.stringify = QueryString.encode = function(obj, sep, eq, name) {
return Object.keys(obj).map(function(k) {
var ks = QueryString.escape(stringifyPrimitive(k))   eq;
if (Array.isArray(obj[k])) {
return obj[k].map(function(v) {
return ks   QueryString.escape(stringifyPrimitive(v));
}).join(sep);
return ks   QueryString.escape(stringifyPrimitive(obj[k]));
}).join(sep);
return QueryString.escape(stringifyPrimitive(name))   eq  
QueryString.escape(stringifyPrimitive(obj));
// Parse a key=val string.
QueryString.parse = QueryString.decode = function(qs, sep, eq, options) {
if (typeof qs !== 'string' || qs.length === 0) {
qs = qs.split(sep);
var maxKeys = 1000;
if (options && typeof options.maxKeys === 'number') {
maxKeys = options.maxKeys;
var len = qs.length;
// maxKeys <= 0 means that we should not limit keys count
if (maxKeys > 0 && len > maxKeys) {
len = maxKeys;
var x = qs[i].replace(regexp, ' '),
idx = x.indexOf(eq),
kstr = x.substr(0, idx);
vstr = x.substr(idx   1);
k = QueryString.unescape(kstr, true);
v = QueryString.unescape(vstr, true);
} else if (Array.isArray(obj[k])) {
obj[k].push(v);
// hXXps://github.com/antirez/linenoise
// * hXXp://invisible-island.net/xterm/ctlseqs/ctlseqs.html
// * hXXp://VVV.3waylabs.com/nw/WWW/products/wizcon/vt220.html
exports.createInterface = function(input, output, completer, terminal) {
if (arguments.length === 1) {
output = input.output;
completer = input.completer;
terminal = input.terminal;
input = input.input;
terminal = !!output.isTTY;
this.output = output;
this.input = input;
this.completer = completer.length === 2 ? completer : function(v, callback) {
this.setPrompt('> ');
this.terminal = !!terminal;
self.close();
function onkeypress(s, key) {
self._ttyWrite(s, key);
if (!this.terminal) {
input.on('data', ondata);
input.on('end', onend);
self.once('close', function() {
input.removeListener('data', ondata);
input.removeListener('end', onend);
var StringDecoder = require('string_decoder').StringDecoder; // lazy load
exports.emitKeypressEvents(input);
input.on('keypress', onkeypress);
this.line = '';
this.terminal = true;
this.cursor = 0;
this.history = [];
this.historyIndex = -1;
output.on('resize', onresize);
input.removeListener('keypress', onkeypress);
output.removeListener('resize', onresize);
input.resume();
Interface.prototype.__defineGetter__('columns', function() {
return this.output.columns || Infinity;
Interface.prototype.setPrompt = function(prompt, length) {
var lines = prompt.split(/[\r\n]/);
var lastLine = lines[lines.length - 1];
this._promptLength = lastLine.length;
Interface.prototype._setRawMode = function(mode) {
if (typeof this.input.setRawMode === 'function') {
return this.input.setRawMode(mode);
Interface.prototype.prompt = function(preserveCursor) {
if (this.paused) this.resume();
if (this.terminal) {
if (!preserveCursor) this.cursor = 0;
this.output.write(this._prompt);
Interface.prototype.question = function(query, cb) {
this.prompt();
this.setPrompt(query);
Interface.prototype._onLine = function(line) {
this.setPrompt(this._oldPrompt);
this.emit('line', line);
Interface.prototype._addHistory = function() {
if (this.line.length === 0) return '';
if (this.history.length === 0 || this.history[0] !== this.line) {
this.history.unshift(this.line);
if (this.history.length > kHistorySize) this.history.pop();
this.historyIndex = -1;
return this.history[0];
Interface.prototype._refreshLine = function() {
var columns = this.columns;
var line = this._prompt   this.line;
var lineLength = line.length;
var prevRows = this.prevRows || 0;
exports.moveCursor(this.output, 0, -prevRows);
exports.cursorTo(this.output, 0);
exports.clearScreenDown(this.output);
this.output.write(line);
this.output.write(' ');
exports.cursorTo(this.output, cursorPos.cols);
var diff = lineRows - cursorPos.rows;
exports.moveCursor(this.output, 0, -diff);
this.prevRows = cursorPos.rows;
Interface.prototype.close = function() {
if (this.closed) return;
if (this.paused) return;
this.input.pause();
this.paused = true;
this.emit('pause');
Interface.prototype.resume = function() {
if (!this.paused) return;
this.input.resume();
this.paused = false;
this.emit('resume');
Interface.prototype.write = function(d, key) {
this.terminal ? this._ttyWrite(d, key) : this._normalWrite(d);
Interface.prototype._normalWrite = function(b) {
var string = this._decoder.write(b);
string = string.replace(/^\n/, '');
if (lineEnding.test(string)) {
this._sawReturn = /\r$/.test(string);
var lines = string.split(lineEnding);
// either '' or (concievably) the unfinished portion of the next line
string = lines.pop();
lines.forEach(function(line) {
Interface.prototype._insertString = function(c) {
if (this.cursor < this.line.length) {
var beg = this.line.slice(0, this.cursor);
var end = this.line.slice(this.cursor, this.line.length);
this.line = beg   c   end;
this.cursor  = c.length;
this.line  = c;
if (this._getCursorPos().cols === 0) {
this.output.write(c);
Interface.prototype._tabComplete = function() {
self.completer(self.line.slice(0, self.cursor), function(err, rv) {
if (completions && completions.length) {
if (completions.length === 1) {
self._insertString(completions[0].slice(completeOn.length));
self.output.write('\r\n');
var width = completions.reduce(function(a, b) {
return a.length > b.length ? a : b;
}).length   2; // 2 space padding
var maxColumns = Math.floor(self.columns / width) || 1;
for (var i = 0, compLen = completions.length; i < compLen; i  ) {
group.push(c);
// portion.
var f = completions.filter(function(e) { if (e) return e; });
if (prefix.length > completeOn.length) {
self._insertString(prefix.slice(completeOn.length));
if (group.length == 0) {
var minRows = Math.ceil(group.length / maxColumns);
if (idx >= group.length) {
self.output.write(item);
for (var s = 0, itemLen = item.length; s < width - itemLen;
self.output.write(' ');
self.output.write('\r\n');
self.output.write('\r\n');
if (!strings || strings.length == 0) {
var sorted = strings.slice().sort();
var max = sorted[sorted.length - 1];
for (var i = 0, len = min.length; i < len; i  ) {
return min.slice(0, i);
Interface.prototype._wordLeft = function() {
if (this.cursor > 0) {
var leading = this.line.slice(0, this.cursor);
var match = leading.match(/([^\w\s] |\w |)\s*$/);
this._moveCursor(-match[0].length);
Interface.prototype._wordRight = function() {
var trailing = this.line.slice(this.cursor);
var match = trailing.match(/^(\s |\W |\w )\s*/);
this._moveCursor(match[0].length);
Interface.prototype._deleteLeft = function() {
if (this.cursor > 0 && this.line.length > 0) {
this.line = this.line.slice(0, this.cursor - 1)  
this.line.slice(this.cursor, this.line.length);
this.cursor--;
Interface.prototype._deleteRight = function() {
this.line = this.line.slice(0, this.cursor)  
this.line.slice(this.cursor   1, this.line.length);
Interface.prototype._deleteWordLeft = function() {
leading = leading.slice(0, leading.length - match[0].length);
this.line = leading   this.line.slice(this.cursor, this.line.length);
this.cursor = leading.length;
Interface.prototype._deleteWordRight = function() {
this.line = this.line.slice(0, this.cursor)  
trailing.slice(match[0].length);
Interface.prototype._deleteLineLeft = function() {
this.line = this.line.slice(this.cursor);
this.cursor = 0;
Interface.prototype._deleteLineRight = function() {
this.line = this.line.slice(0, this.cursor);
Interface.prototype.clearLine = function() {
this.output.write('\r\n');
this.line = '';
this.prevRows = 0;
Interface.prototype._line = function() {
this.clearLine();
Interface.prototype._historyNext = function() {
if (this.historyIndex > 0) {
this.historyIndex--;
this.line = this.history[this.historyIndex];
this.cursor = this.line.length; // set cursor to end of line.
} else if (this.historyIndex === 0) {
Interface.prototype._historyPrev = function() {
if (this.historyIndex   1 < this.history.length) {
this.historyIndex  ;
Interface.prototype._getCursorPos = function() {
var cursorPos = this.cursor   this._promptLength;
Interface.prototype._moveCursor = function(dx) {
var oldcursor = this.cursor;
this.cursor  = dx;
if (this.cursor < 0) this.cursor = 0;
if (this.cursor > this.line.length) this.cursor = this.line.length;
if (oldPos.rows === newPos.rows) {
exports.moveCursor(this.output, this.cursor - oldcursor, 0);
this.prevRows = newPos.rows;
Interface.prototype._ttyWrite = function(s, key) {
key = key || {};
// Ignore escape key - Fixes #2876
if (key.name == 'escape') return;
if (key.ctrl && key.shift) {
switch (key.name) {
} else if (key.ctrl) {
/* Control key pressed */
if (EventEmitter.listenerCount(this, 'SIGINT') > 0) {
this.emit('SIGINT');
this.close();
if (this.cursor === 0 && this.line.length === 0) {
} else if (this.cursor < this.line.length) {
this.cursor = 0;
this.line = '';
exports.cursorTo(this.output, 0, 0);
exports.clearScreenDown(this.output);
if (process.platform == 'win32') break;
if (EventEmitter.listenerCount(this, 'SIGTSTP') > 0) {
this.emit('SIGTSTP');
process.once('SIGCONT', (function(self) {
if (!self.paused) {
self.pause();
self.emit('SIGCONT');
// See hXXps://github.com/joyent/node/issues/3295.
process.kill(process.pid, 'SIGTSTP');
} else if (key.meta) {
/* Meta key pressed */
/* No modifier keys used */
if (this._sawReturn && key.name !== 'enter')
if (Buffer.isBuffer(s))
s = s.toString('utf-8');
var lines = s.split(/\r\n|\n|\r/);
for (var i = 0, len = lines.length; i < len; i  ) {
exports.Interface = Interface;
* accepts a readable Stream instance and makes it emit "keypress" events
function emitKeypressEvents(stream) {
if (stream._keypressDecoder) return;
var StringDecoder = require('string_decoder').StringDecoder; // lazy load
stream._keypressDecoder = new StringDecoder('utf8');
if (EventEmitter.listenerCount(stream, 'keypress') > 0) {
var r = stream._keypressDecoder.write(b);
if (r) emitKey(stream, r);
stream.removeListener('data', onData);
stream.on('newListener', onNewListener);
if (event == 'keypress') {
stream.on('data', onData);
stream.removeListener('newListener', onNewListener);
if (EventEmitter.listenerCount(stream, 'keypress') > 0) {
stream.on('data', onData);
stream.on('newListener', onNewListener);
exports.emitKeypressEvents = emitKeypressEvents;
Some patterns seen in terminal key escape codes, derived from combos seen
at hXXp://VVV.midnight-commander.org/browser/lib/tty/key.c
// Regexes used for ansi escape code splitting
var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
var functionKeyCodeRe =
function emitKey(stream, s) {
key = {
if (Buffer.isBuffer(s)) {
s = '\x1b'   s.toString(stream.encoding || 'utf-8');
s = s.toString(stream.encoding || 'utf-8');
key.sequence = s;
key.name = 'return';
key.name = 'enter';
key.name = 'tab';
key.name = 'backspace';
key.meta = (s.charAt(0) === '\x1b');
// escape key
key.name = 'escape';
key.meta = (s.length === 2);
key.name = 'space';
} else if (s.length === 1 && s <= '\x1a') {
key.name = String.fromCharCode(s.charCodeAt(0)   'a'.charCodeAt(0) - 1);
key.ctrl = true;
} else if (s.length === 1 && s >= 'a' && s <= 'z') {
key.name = s;
} else if (s.length === 1 && s >= 'A' && s <= 'Z') {
key.name = s.toLowerCase();
key.shift = true;
} else if (parts = metaKeyCodeRe.exec(s)) {
// meta character key
key.name = parts[1].toLowerCase();
key.meta = true;
key.shift = /^[A-Z]$/.test(parts[1]);
} else if (parts = functionKeyCodeRe.exec(s)) {
// reassemble the key code leaving out leading \x1b's,
// the modifier key bitflag and any meaningless "1;" sequence
// Parse the key modifier
key.ctrl = !!(modifier & 4);
key.meta = !!(modifier & 10);
key.shift = !!(modifier & 1);
key.code = code;
// Parse the key itself
case 'OP': key.name = 'f1'; break;
case 'OQ': key.name = 'f2'; break;
case 'OR': key.name = 'f3'; break;
case 'OS': key.name = 'f4'; break;
case '[11~': key.name = 'f1'; break;
case '[12~': key.name = 'f2'; break;
case '[13~': key.name = 'f3'; break;
case '[14~': key.name = 'f4'; break;
case '[[A': key.name = 'f1'; break;
case '[[B': key.name = 'f2'; break;
case '[[C': key.name = 'f3'; break;
case '[[D': key.name = 'f4'; break;
case '[[E': key.name = 'f5'; break;
case '[15~': key.name = 'f5'; break;
case '[17~': key.name = 'f6'; break;
case '[18~': key.name = 'f7'; break;
case '[19~': key.name = 'f8'; break;
case '[20~': key.name = 'f9'; break;
case '[21~': key.name = 'f10'; break;
case '[23~': key.name = 'f11'; break;
case '[24~': key.name = 'f12'; break;
case '[A': key.name = 'up'; break;
case '[B': key.name = 'down'; break;
case '[C': key.name = 'right'; break;
case '[D': key.name = 'left'; break;
case '[E': key.name = 'clear'; break;
case '[F': key.name = 'end'; break;
case '[H': key.name = 'home'; break;
case 'OA': key.name = 'up'; break;
case 'OB': key.name = 'down'; break;
case 'OC': key.name = 'right'; break;
case 'OD': key.name = 'left'; break;
case 'OE': key.name = 'clear'; break;
case 'OF': key.name = 'end'; break;
case 'OH': key.name = 'home'; break;
case '[1~': key.name = 'home'; break;
case '[2~': key.name = 'insert'; break;
case '[3~': key.name = 'delete'; break;
case '[4~': key.name = 'end'; break;
case '[5~': key.name = 'pageup'; break;
case '[6~': key.name = 'pagedown'; break;
case '[[5~': key.name = 'pageup'; break;
case '[[6~': key.name = 'pagedown'; break;
case '[7~': key.name = 'home'; break;
case '[8~': key.name = 'end'; break;
/* rxvt keys with modifiers */
case '[a': key.name = 'up'; key.shift = true; break;
case '[b': key.name = 'down'; key.shift = true; break;
case '[c': key.name = 'right'; key.shift = true; break;
case '[d': key.name = 'left'; key.shift = true; break;
case '[e': key.name = 'clear'; key.shift = true; break;
case '[2$': key.name = 'insert'; key.shift = true; break;
case '[3$': key.name = 'delete'; key.shift = true; break;
case '[5$': key.name = 'pageup'; key.shift = true; break;
case '[6$': key.name = 'pagedown'; key.shift = true; break;
case '[7$': key.name = 'home'; key.shift = true; break;
case '[8$': key.name = 'end'; key.shift = true; break;
case 'Oa': key.name = 'up'; key.ctrl = true; break;
case 'Ob': key.name = 'down'; key.ctrl = true; break;
case 'Oc': key.name = 'right'; key.ctrl = true; break;
case 'Od': key.name = 'left'; key.ctrl = true; break;
case 'Oe': key.name = 'clear'; key.ctrl = true; break;
case '[2^': key.name = 'insert'; key.ctrl = true; break;
case '[3^': key.name = 'delete'; key.ctrl = true; break;
case '[5^': key.name = 'pageup'; key.ctrl = true; break;
case '[6^': key.name = 'pagedown'; key.ctrl = true; break;
case '[7^': key.name = 'home'; key.ctrl = true; break;
case '[8^': key.name = 'end'; key.ctrl = true; break;
case '[Z': key.name = 'tab'; key.shift = true; break;
default: key.name = 'undefined'; break;
} else if (s.length > 1 && s[0] !== '\x1b') {
Array.prototype.forEach.call(s, function(c) {
emitKey(stream, c);
// Don't emit a key if no name was found
if (key.name === undefined) {
key = undefined;
if (s.length === 1) {
if (key || ch) {
stream.emit('keypress', ch, key);
stream.write('\x1b['   (x   1)   'G');
stream.write('\x1b['   (y   1)   ';'   (x   1)   'H');
exports.cursorTo = cursorTo;
stream.write('\x1b['   (-dx)   'D');
stream.write('\x1b['   dx   'C');
stream.write('\x1b['   (-dy)   'A');
stream.write('\x1b['   dy   'B');
exports.moveCursor = moveCursor;
stream.write('\x1b[1K');
stream.write('\x1b[0K');
stream.write('\x1b[2K');
exports.clearLine = clearLine;
stream.write('\x1b[0J');
exports.clearScreenDown = clearScreenDown;
* repl.start("prompt> ");
* net.createServer(function(socket) {
* repl.start("node via Unix socket> ", socket);
* }).listen("/tmp/node-repl-sock");
* // listen for TCP socket connections and start repl on them
* repl.start("node via TCP socket> ", socket);
* }).listen(5001);
* repl.start("node > ").context.foo = "stdin is fun";
var Console = require('console').Console;
// hack for require.resolve("./relative") to work properly.
module.filename = path.resolve('repl');
module.paths = require('module')._nodeModulePaths(module.filename);
// Can overridden with custom print functions, such as `probe` or `eyes.js`.
// This is the default "writer" value if none is passed in the REPL options.
exports.writer = util.inspect;
exports._builtinLibs = ['assert', 'buffer', 'child_process', 'cluster',
'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'net',
'string_decoder', 'tls', 'tty', 'url', 'util', 'vm', 'zlib'];
stream = options.stream || options.socket;
input = options.input;
output = options.output;
eval_ = options.eval;
useGlobal = options.useGlobal;
ignoreUndefined = options.ignoreUndefined;
prompt = options.prompt;
self.useGlobal = !!useGlobal;
self.ignoreUndefined = !!ignoreUndefined;
self.eval = eval_ || function(code, context, file, cb) {
if (self.useGlobal) {
result = vm.runInThisContext(code, file);
result = vm.runInContext(code, context, file);
if (err && process.domain) {
process.domain.emit('error', err);
process.domain.exit();
// legacy API, passing a 'stream'/'socket' option
if (stream.stdin && stream.stdout) {
input = stream.stdin;
output = stream.stdout;
// We're given a duplex readable/writable Stream, like a `net.Socket`
self.inputStream = input;
self.outputStream = output;
self.resetContext();
self.bufferedCommand = '';
self.prompt = (prompt != undefined ? prompt : '> ');
self.complete(text, callback);
var rli = rl.createInterface({
input: self.inputStream,
output: self.outputStream,
terminal: options.terminal
self.rli = rli;
this.commands = {};
self.writer = options.writer || exports.writer;
if (typeof options.useColors === 'undefined') {
options.useColors = rli.terminal;
self.useColors = !!options.useColors;
if (self.useColors && self.writer === util.inspect) {
self.writer = function(obj, showHidden, depth) {
return util.inspect(obj, showHidden, depth, true);
rli.setPrompt(self.prompt);
rli.on('close', function() {
self.emit('exit');
rli.on('SIGINT', function() {
var empty = rli.line.length === 0;
rli.clearLine();
if (!(self.bufferedCommand && self.bufferedCommand.length > 0) && empty) {
rli.close();
rli.output.write('(^C again to quit)\n');
self.bufferedCommand = '';
self.displayPrompt();
rli.on('line', function(cmd) {
cmd = trimWhitespace(cmd);
// Check to see if a REPL keyword was used. If it returns true,
if (cmd && cmd.charAt(0) === '.' && isNaN(parseFloat(cmd))) {
var matches = cmd.match(/^(\.[^\s] )\s*(.*)$/);
var keyword = matches && matches[1];
if (self.parseREPLKeyword(keyword, rest) === true) {
self.outputStream.write('Invalid REPL keyword\n');
var evalCmd = self.bufferedCommand   cmd   '\n';
// 'for (var i = 0; i < 10; i  ) console.log(i);'
self.eval('('   evalCmd   ')',
self.context,
/^[\r\n\s]*function/.test(evalCmd) ||
self.eval(evalCmd, self.context, 'repl', finish);
self.memory(cmd);
// If error was SyntaxError and not JSON.parse error
if (!self.bufferedCommand && cmd.trim().match(/^npm /)) {
self.outputStream.write('npm should be run outside of the '  
self.bufferedCommand = '';
self.displayPrompt();
// ... }
self.bufferedCommand  = cmd   '\n';
self.displayPrompt();
self.outputStream.write((e.stack || e)   '\n');
self.bufferedCommand = '';
if (!e && (!self.ignoreUndefined || ret !== undefined)) {
self.context._ = ret;
self.outputStream.write(self.writer(ret)   '\n');
self.displayPrompt();
rli.on('SIGCONT', function() {
self.displayPrompt(true);
self.displayPrompt();
exports.REPLServer = REPLServer;
exports.start = function(prompt, source, eval_, useGlobal, ignoreUndefined) {
if (!exports.repl) exports.repl = repl;
REPLServer.prototype.createContext = function() {
if (this.useGlobal) {
context = vm.createContext();
context.console = new Console(this.outputStream);
context.global = context;
context.global.global = context;
context.module = module;
context.require = require;
this.lines = [];
this.lines.level = [];
exports._builtinLibs.forEach(function(name) {
Object.defineProperty(context, name, {
REPLServer.prototype.resetContext = function() {
this.context = this.createContext();
REPLServer.prototype.displayPrompt = function(preserveCursor) {
var prompt = this.prompt;
if (this.bufferedCommand.length) {
var levelInd = new Array(this.lines.level.length).join('..');
this.rli.setPrompt(prompt);
this.rli.prompt(preserveCursor);
// used in REPLServer.complete
this.run = function(data) {
data.forEach(function(line) {
self.emit('data', line   '\n');
util.inherits(ArrayStream, Stream);
ArrayStream.prototype.readable = true;
ArrayStream.prototype.writable = true;
ArrayStream.prototype.resume = function() {};
ArrayStream.prototype.write = function() {};
// -> [['util.print', 'util.debug', 'util.log', 'util.inspect', 'util.pump'],
// Warning: This eval's code like "foo.bar.baz", so it will run property
REPLServer.prototype.complete = function(line, callback) {
if (this.bufferedCommand != undefined && this.bufferedCommand.length) {
var tmp = this.lines.slice();
this.lines.level.forEach(function(kill) {
if (kill.isFunction) {
tmp[kill.line] = '';
magic.context = magic.createContext();
flat.run(tmp); // eval the flattened code
if (!magic.bufferedCommand) {
return magic.complete(line, callback);
// REPL commands (e.g. ".break").
match = line.match(/^\s*(\.\w*)$/);
completionGroups.push(Object.keys(this.commands));
if (match[1].length > 1) {
} else if (match = line.match(requireRE)) {
var exts = Object.keys(require.extensions);
var indexRe = new RegExp('^index('   exts.map(regexpEscape).join('|')  
var paths = module.paths.concat(require('module').globalPaths);
for (i = 0; i < paths.length; i  ) {
dir = path.resolve(paths[i], subdir);
files = fs.readdirSync(dir);
for (f = 0; f < files.length; f  ) {
ext = path.extname(name);
base = name.slice(0, -ext.length);
if (base.match(/-\d \.\d (\.\d )?/) || name === '.npm') {
if (exts.indexOf(ext) !== -1) {
group.push(subdir   base);
abs = path.resolve(dir, name);
if (fs.statSync(abs).isDirectory()) {
group.push(subdir   name   '/');
subfiles = fs.readdirSync(abs);
for (s = 0; s < subfiles.length; s  ) {
if (indexRe.test(subfiles[s])) {
group.push(subdir   name);
if (group.length) {
completionGroups.push(group);
completionGroups.push(exports._builtinLibs);
// We support simple chained expressions like the following (no function
// foo.bar<|> # completions for 'foo' with filter 'bar'
// spam.eggs.<|> # completions for 'spam.eggs' with filter ''
} else if (line.length === 0 || line[line.length - 1].match(/\w|\.|\$/)) {
match = simpleExpressionRE.exec(line);
if (line.length === 0 || match) {
if (line.length === 0) {
} else if (line[line.length - 1] === '.') {
expr = match[0].slice(0, match[0].length - 1);
var bits = match[0].split('.');
filter = bits.pop();
expr = bits.join('.');
// If context is instance of vm.ScriptContext
if (this.useGlobal ||
this.context.constructor &&
this.context.constructor.name === 'Context') {
var contextProto = this.context;
while (contextProto = Object.getPrototypeOf(contextProto)) {
completionGroups.push(Object.getOwnPropertyNames(contextProto));
completionGroups.push(Object.getOwnPropertyNames(this.context));
this.eval('.scope', this.context, 'repl', function(err, globals) {
} else if (Array.isArray(globals[0])) {
globals.forEach(function(group) {
completionGroups.push(group);
completionGroups.push(globals);
this.eval(expr, this.context, 'repl', function(e, obj) {
// if (e) console.log(e);
memberGroups.push(Object.getOwnPropertyNames(obj));
p = Object.getPrototypeOf(obj);
p = obj.constructor ? obj.constructor.prototype : null;
memberGroups.push(Object.getOwnPropertyNames(p));
p = Object.getPrototypeOf(p);
//console.log("completion error walking prototype chain:"   e);
if (memberGroups.length) {
for (i = 0; i < memberGroups.length; i  ) {
completionGroups.push(memberGroups[i].map(function(member) {
if (completionGroups.length && filter) {
for (i = 0; i < completionGroups.length; i  ) {
group = completionGroups[i].filter(function(elem) {
return elem.indexOf(filter) == 0;
if (group.length) {
newCompletionGroups.push(group);
if (completionGroups.length) {
for (i = completionGroups.length - 1; i >= 0; i--) {
group.sort();
for (var j = 0; j < group.length; j  ) {
completions.push(c);
completions.push(''); // separator btwn groups
while (completions.length && completions[completions.length - 1] === '') {
completions.pop();
* Used to parse and execute the Node REPL commands.
* @param {keyword} keyword The command entered to check.
REPLServer.prototype.parseREPLKeyword = function(keyword, rest) {
var cmd = this.commands[keyword];
if (cmd) {
cmd.action.call(this, rest);
REPLServer.prototype.defineCommand = function(keyword, cmd) {
if (typeof cmd === 'function') {
cmd = {action: cmd};
} else if (typeof cmd.action !== 'function') {
this.commands['.'   keyword] = cmd;
REPLServer.prototype.memory = function memory(cmd) {
self.lines = self.lines || [];
self.lines.level = self.lines.level || [];
self.lines.push(new Array(self.lines.level.length).join(' ')   cmd);
self.lines.push('');
var dw = cmd.match(/{|\(/g);
var up = cmd.match(/}|\)/g);
up = up ? up.length : 0;
dw = dw ? dw.length : 0;
self.lines.level.push({
line: self.lines.length - 1,
isFunction: /\s*function\s*/.test(cmd)
var curr = self.lines.level.pop();
var tmp = curr.depth   depth;
depth  = curr.depth;
curr.depth  = depth;
self.lines.level.push(curr);
// self.lines.level.length === 0
// be cleared on .break and in the case of a syntax error?
self.lines.level = [];
// (hXXp://VVV.ecma-international.org/publications/standards/Ecma-262.htm)
completionGroups.push(['NaN', 'Infinity', 'undefined',
// Common keywords. Exclude for completion on the empty string, b/c
completionGroups.push(['break', 'case', 'catch', 'const',
'export', 'false', 'finally', 'for', 'function', 'if',
'import', 'in', 'instanceof', 'let', 'new', 'null', 'return',
repl.defineCommand('break', {
this.bufferedCommand = '';
this.displayPrompt();
if (repl.useGlobal) {
clearMessage = 'Alias for .break';
repl.defineCommand('clear', {
if (!this.useGlobal) {
this.outputStream.write('Clearing context...\n');
this.resetContext();
repl.defineCommand('exit', {
this.rli.close();
repl.defineCommand('help', {
Object.keys(this.commands).sort().forEach(function(name) {
var cmd = self.commands[name];
self.outputStream.write(name   '\t'   (cmd.help || '')   '\n');
repl.defineCommand('save', {
fs.writeFileSync(file, this.lines.join('\n')   '\n');
this.outputStream.write('Session saved to:'   file   '\n');
this.outputStream.write('Failed to save:'   file   '\n');
repl.defineCommand('load', {
var stats = fs.statSync(file);
if (stats && stats.isFile()) {
var data = fs.readFileSync(file, 'utf8');
var lines = data.split('\n');
this.displayPrompt();
lines.forEach(function(line) {
self.rli.write(line   '\n');
this.outputStream.write('Failed to load:'   file   '\n');
function trimWhitespace(cmd) {
matches = trimmer.exec(cmd);
if (matches && matches.length === 2) {
return s.replace(/[-[\]{}()* ?.,\\^$|#\s]/g, '\\$&');
* local exports.context when evaled. This provides a local context
* @param {String} cmd The cmd to convert.
REPLServer.prototype.convertToContext = function(cmd) {
// Replaces: var foo = "bar"; with: self.context.foo = bar;
matches = scopeVar.exec(cmd);
if (matches && matches.length === 3) {
return 'self.context.'   matches[1]   matches[2];
matches = scopeFunc.exec(self.bufferedCommand);
return matches[1]   ' = '   self.bufferedCommand;
return cmd;
* This function filters out false positives likes JSON.parse() errors and
e = e && (e.stack || e.toString());
return e && e.match(/^SyntaxError/) &&
!e.match(/^SyntaxError: Invalid regular expression/) &&
!e.match(/^SyntaxError: Invalid flags supplied to RegExp constructor/) &&
!e.match(/^SyntaxError: .*strict mode.*/i) &&
// JSON.parse() error
!e.match(/\n {4}at Object.parse \(native\)\n/);
module.exports = Stream;
var EE = require('events').EventEmitter;
util.inherits(Stream, EE);
Stream.Readable = require('_stream_readable');
Stream.Writable = require('_stream_writable');
Stream.Duplex = require('_stream_duplex');
Stream.Transform = require('_stream_transform');
Stream.PassThrough = require('_stream_passthrough');
Stream.Stream = Stream;
// old-style streams. Note that the pipe method (the only relevant
EE.call(this);
Stream.prototype.pipe = function(dest, options) {
if (dest.writable) {
if (false === dest.write(chunk) && source.pause) {
source.pause();
source.on('data', ondata);
if (source.readable && source.resume) {
source.resume();
dest.on('drain', ondrain);
// If the 'end' option is not supplied, dest.end() will be called when
// source gets the 'end' or 'close' events. Only dest.end() once.
if (!dest._isStdio && (!options || options.end !== false)) {
source.on('end', onend);
source.on('close', onclose);
dest.end();
if (typeof dest.destroy === 'function') dest.destroy();
// don't leave dangling pipes when there are errors.
if (EE.listenerCount(this, 'error') === 0) {
throw er; // Unhandled stream error in pipe.
source.on('error', onerror);
dest.on('error', onerror);
source.removeListener('data', ondata);
dest.removeListener('drain', ondrain);
source.removeListener('end', onend);
source.removeListener('close', onclose);
source.removeListener('error', onerror);
dest.removeListener('error', onerror);
source.removeListener('end', cleanup);
source.removeListener('close', cleanup);
dest.removeListener('close', cleanup);
source.on('end', cleanup);
source.on('close', cleanup);
dest.on('close', cleanup);
dest.emit('pipe', source);
// Allow for unix-like usage: A.pipe(B).pipe(C)
module.exports = Readable;
Readable.ReadableState = ReadableState;
util.inherits(Readable, Stream);
var hwm = options.highWaterMark;
this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
this.highWaterMark = ~~this.highWaterMark;
this.buffer = [];
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
this.flowing = false;
this.ended = false;
this.endEmitted = false;
this.reading = false;
this.calledRead = false;
this.sync = true;
this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
this.objectMode = !!options.objectMode;
this.defaultEncoding = options.defaultEncoding || 'utf8';
this.ranOut = false;
// the number of writers that are awaiting a drain event in .pipe()s
this.awaitDrain = 0;
this.readingMore = false;
this.oldMode = false;
this.decoder = null;
this.encoding = null;
if (options.encoding) {
StringDecoder = require('string_decoder').StringDecoder;
this.decoder = new StringDecoder(options.encoding);
this.encoding = options.encoding;
// similar to how Writable.write() returns true if you should
Readable.prototype.push = function(chunk, encoding) {
if (typeof chunk === 'string' && !state.objectMode) {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
Readable.prototype.unshift = function(chunk) {
stream.emit('error', er);
state.reading = false;
if (!state.ended)
} else if (state.objectMode || chunk && chunk.length > 0) {
if (state.ended && !addToFront) {
var e = new Error('stream.push() after EOF');
stream.emit('error', e);
} else if (state.endEmitted && addToFront) {
var e = new Error('stream.unshift() after end event');
if (state.decoder && !addToFront && !encoding)
chunk = state.decoder.write(chunk);
state.length  = state.objectMode ? 1 : chunk.length;
state.buffer.unshift(chunk);
state.reading = false;
state.buffer.push(chunk);
if (state.needReadable)
return !state.ended &&
(state.needReadable ||
state.length < state.highWaterMark ||
state.length === 0);
Readable.prototype.setEncoding = function(enc) {
StringDecoder = require('string_decoder').StringDecoder;
this._readableState.decoder = new StringDecoder(enc);
this._readableState.encoding = enc;
if (state.length === 0 && state.ended)
if (state.objectMode)
if (state.flowing && state.buffer.length)
return state.buffer[0].length;
return state.length;
if (n > state.highWaterMark)
state.highWaterMark = roundUpToNextPowerOf2(n);
if (n > state.length) {
if (!state.ended) {
state.needReadable = true;
Readable.prototype.read = function(n) {
state.calledRead = true;
state.emittedReadable = false;
state.needReadable &&
(state.length >= state.highWaterMark || state.ended)) {
if (n === 0 && state.ended) {
if (state.length === 0)
// *below* the call to _read. The reason is that in certain
// synthetic stream cases, such as passthrough streams, _read
// may be a completely synchronous operation which may change
var doRead = state.needReadable;
if (state.length - n <= state.highWaterMark)
if (state.ended || state.reading)
state.reading = true;
state.sync = true;
this._read(state.highWaterMark);
state.sync = false;
if (doRead && !state.reading)
state.needReadable = true;
state.length -= n;
if (state.length === 0 && !state.ended)
if (state.ended && !state.endEmitted && state.length === 0)
if (!Buffer.isBuffer(chunk) &&
!state.objectMode) {
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.ended = true;
if (state.length > 0)
state.needReadable = false;
if (state.emittedReadable)
state.emittedReadable = true;
if (state.sync)
stream.emit('readable');
if (!state.readingMore) {
state.readingMore = true;
var len = state.length;
while (!state.reading && !state.flowing && !state.ended &&
state.length < state.highWaterMark) {
stream.read(0);
if (len === state.length)
len = state.length;
state.readingMore = false;
Readable.prototype._read = function(n) {
this.emit('error', new Error('not implemented'));
Readable.prototype.pipe = function(dest, pipeOpts) {
switch (state.pipesCount) {
state.pipes = dest;
state.pipes = [state.pipes, dest];
state.pipes.push(dest);
state.pipesCount  = 1;
var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
dest !== process.stdout &&
dest !== process.stderr;
if (state.endEmitted)
process.nextTick(endFn);
src.once('end', endFn);
dest.on('unpipe', onunpipe);
function onunpipe(readable) {
// on the source. This would be more elegant with a .once()
var ondrain = pipeOnDrain(src);
// cleanup event handlers once the pipe is broken
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
dest.removeListener('unpipe', onunpipe);
src.removeListener('end', onend);
src.removeListener('end', cleanup);
if (!dest._writableState || dest._writableState.needDrain)
unpipe();
if (EE.listenerCount(dest, 'error') === 0)
dest.emit('error', er);
if (!dest._events || !dest._events.error)
dest.on('error', onerror);
else if (Array.isArray(dest._events.error))
dest._events.error.unshift(onerror);
dest._events.error = [onerror, dest._events.error];
// Both close and finish should trigger unpipe, but only once.
dest.once('close', onclose);
dest.once('finish', onfinish);
function unpipe() {
src.unpipe(dest);
// tell the dest that it's being piped to
dest.emit('pipe', src);
if (!state.flowing) {
// This would be easier to follow with a .once() handler
this.on('readable', pipeOnReadable);
state.flowing = true;
function pipeOnDrain(src) {
state.awaitDrain--;
if (state.awaitDrain === 0)
state.awaitDrain = 0;
var written = dest.write(chunk);
state.awaitDrain  ;
while (state.pipesCount && null !== (chunk = src.read())) {
if (state.pipesCount === 1)
write(state.pipes, 0, null);
state.pipes.forEach(write);
src.emit('data', chunk);
if (state.awaitDrain > 0)
// if every destination was unpiped, either before entering this
if (state.pipesCount === 0) {
state.flowing = false;
if (EE.listenerCount(src, 'data') > 0)
state.ranOut = true;
function pipeOnReadable() {
if (this._readableState.ranOut) {
this._readableState.ranOut = false;
Readable.prototype.unpipe = function(dest) {
if (state.pipesCount === 0)
if (state.pipesCount === 1) {
// passed in one, but it's not the right one.
if (dest && dest !== state.pipes)
dest = state.pipes;
state.pipes = null;
state.pipesCount = 0;
this.removeListener('readable', pipeOnReadable);
dest.emit('unpipe', this);
// slow case. multiple pipe destinations.
var dests = state.pipes;
var len = state.pipesCount;
dests[i].emit('unpipe', this);
var i = state.pipes.indexOf(dest);
state.pipes.splice(i, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1)
state.pipes = state.pipes[0];
dest.emit('unpipe', this);
Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
if (ev === 'data' && !this._readableState.flowing)
if (ev === 'readable' && this.readable) {
if (!state.readableListening) {
state.readableListening = true;
state.emittedReadable = false;
if (!state.reading) {
this.read(0);
} else if (state.length) {
Readable.prototype.addListener = Readable.prototype.on;
Readable.prototype.resume = function() {
this.read(0);
Readable.prototype.pause = function() {
if (state.flowing) {
// hXXps://github.com/isaacs/readable-stream/issues/16
stream.readable = true;
stream.pipe = Stream.prototype.pipe;
stream.on = stream.addListener = Stream.prototype.on;
stream.on('readable', function() {
while (!paused && (null !== (c = stream.read())))
stream.emit('data', c);
stream._readableState.needReadable = true;
stream.pause = function() {
this.emit('pause');
stream.resume = function() {
stream.emit('readable');
this.read(0);
this.emit('resume');
stream.emit('readable');
state.oldMode = true;
Readable.prototype.wrap = function(stream) {
stream.on('end', function() {
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length)
self.push(chunk);
stream.on('data', function(chunk) {
if (state.decoder)
chunk = state.decoder.write(chunk);
if (!chunk || !state.objectMode && !chunk.length)
var ret = self.push(chunk);
stream.pause();
// important when wrapping filters and duplexes.
return stream[method].apply(stream, arguments);
// proxy certain important events.
events.forEach(function(ev) {
stream.on(ev, self.emit.bind(self, ev));
stream.resume();
var list = state.buffer;
var length = state.length;
var stringMode = !!state.decoder;
var objectMode = !!state.objectMode;
if (list.length === 0)
ret = list.shift();
ret = list.join('');
ret = Buffer.concat(list, length);
list.length = 0;
if (n < list[0].length) {
ret = buf.slice(0, n);
list[0] = buf.slice(n);
} else if (n === list[0].length) {
ret = list.shift();
for (var i = 0, l = list.length; i < l && c < n; i  ) {
var cpy = Math.min(n - c, buf.length);
ret  = buf.slice(0, cpy);
buf.copy(ret, c, 0, cpy);
if (cpy < buf.length)
list[0] = buf.slice(cpy);
list.shift();
if (!state.endEmitted && state.calledRead) {
state.ended = true;
if (!state.endEmitted && state.length === 0) {
state.endEmitted = true;
stream.emit('end');
module.exports = Writable;
Writable.WritableState = WritableState;
util.inherits(Writable, Stream);
this.chunk = chunk;
this.encoding = encoding;
this.callback = cb;
this.needDrain = false;
this.ending = false;
// should we decode strings into buffers before passing to _write?
var noDecode = options.decodeStrings === false;
this.decodeStrings = !noDecode;
this.writing = false;
this.bufferProcessing = false;
// the callback that's passed to _write(chunk,cb)
this.onwrite = function(er) {
this.writecb = null;
this.writelen = 0;
this.errorEmitted = false;
// Writable ctor is applied to Duplexes, though they're not
if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
this.emit('error', new Error('Cannot pipe. Not readable.'));
stream.emit('error', er);
Writable.prototype.write = function(chunk, encoding, cb) {
if (Buffer.isBuffer(chunk))
encoding = state.defaultEncoding;
if (state.ended)
if (!state.objectMode &&
state.decodeStrings !== false &&
var len = state.objectMode ? 1 : chunk.length;
state.length  = len;
var ret = state.length < state.highWaterMark;
state.needDrain = true;
if (state.writing)
state.buffer.push(new WriteReq(chunk, encoding, cb));
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
stream._write(chunk, encoding, state.onwrite);
state.sync = false;
stream._writableState.errorEmitted = true;
state.writing = false;
state.writecb = null;
state.length -= state.writelen;
state.writelen = 0;
var sync = state.sync;
var cb = state.writecb;
if (!finished && !state.bufferProcessing && state.buffer.length)
if (state.length === 0 && state.needDrain) {
state.needDrain = false;
stream.emit('drain');
state.bufferProcessing = true;
for (var c = 0; c < state.buffer.length; c  ) {
var entry = state.buffer[c];
var chunk = entry.chunk;
var encoding = entry.encoding;
var cb = entry.callback;
var len = state.objectMode ? 1 : chunk.length;
if (state.writing) {
state.bufferProcessing = false;
if (c < state.buffer.length)
state.buffer = state.buffer.slice(c);
state.buffer.length = 0;
Writable.prototype._write = function(chunk, encoding, cb) {
Writable.prototype.end = function(chunk, encoding, cb) {
this.write(chunk, encoding);
if (!state.ending && !state.finished)
return (state.ending &&
state.length === 0 &&
!state.finished &&
!state.writing);
state.finished = true;
stream.emit('finish');
state.ending = true;
if (state.finished)
process.nextTick(cb);
stream.once('finish', cb);
module.exports = Duplex;
util.inherits(Duplex, Readable);
Object.keys(Writable.prototype).forEach(function(method) {
if (!Duplex.prototype[method])
Duplex.prototype[method] = Writable.prototype[method];
if (options && options.readable === false)
if (options && options.writable === false)
this.writable = false;
this.allowHalfOpen = true;
if (options && options.allowHalfOpen === false)
this.allowHalfOpen = false;
this.once('end', onend);
if (this.allowHalfOpen || this._writableState.ended)
process.nextTick(this.end.bind(this));
// some bits pass through, and others are simply ignored. (That would
module.exports = Transform;
util.inherits(Transform, Duplex);
this.afterTransform = function(er, data) {
this.needTransform = false;
this.transforming = false;
this.writechunk = null;
ts.transforming = false;
var cb = ts.writecb;
return stream.emit('error', new Error('no writecb in Transform class'));
ts.writechunk = null;
ts.writecb = null;
stream.push(data);
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
stream._read(rs.highWaterMark);
Duplex.call(this, options);
this._readableState.needReadable = true;
this._readableState.sync = false;
this.once('finish', function() {
Transform.prototype.push = function(chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
// Call `push(newChunk)` to pass along transformed output
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
Transform.prototype._transform = function(chunk, encoding, cb) {
Transform.prototype._write = function(chunk, encoding, cb) {
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
if (!ts.transforming) {
if (ts.needTransform ||
rs.needReadable ||
rs.length < rs.highWaterMark)
this._read(rs.highWaterMark);
Transform.prototype._read = function(n) {
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
ts.needTransform = true;
return stream.emit('error', er);
if (ws.length)
throw new Error('calling transform done when ws.length != 0');
if (ts.transforming)
return stream.push(null);
// a passthrough stream.
module.exports = PassThrough;
util.inherits(PassThrough, Transform);
function PassThrough(options) {
if (!(this instanceof PassThrough))
return new PassThrough(options);
Transform.call(this, options);
PassThrough.prototype._transform = function(chunk, encoding, cb) {
var StringDecoder = exports.StringDecoder = function(encoding) {
this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
switch (this.encoding) {
this.surrogateSize = 3;
this.surrogateSize = 2;
this.detectIncompleteChar = utf16DetectIncompleteChar;
this.detectIncompleteChar = base64DetectIncompleteChar;
this.write = passThroughWrite;
this.charBuffer = new Buffer(6);
this.charReceived = 0;
this.charLength = 0;
// replacement character. See hXXps://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
while (this.charLength) {
var available = (buffer.length >= this.charLength - this.charReceived) ?
this.charLength - this.charReceived :
buffer.length;
buffer.copy(this.charBuffer, this.charReceived, 0, available);
this.charReceived  = available;
if (this.charReceived < this.charLength) {
buffer = buffer.slice(available, buffer.length);
charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
var charCode = charStr.charCodeAt(charStr.length - 1);
this.charLength  = this.surrogateSize;
this.charReceived = this.charLength = 0;
if (buffer.length === 0) {
this.detectIncompleteChar(buffer);
var end = buffer.length;
if (this.charLength) {
buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
end -= this.charReceived;
charStr  = buffer.toString(this.encoding, 0, end);
var end = charStr.length - 1;
var charCode = charStr.charCodeAt(end);
var size = this.surrogateSize;
this.charLength  = size;
this.charReceived  = size;
this.charBuffer.copy(this.charBuffer, size, 0, size);
buffer.copy(this.charBuffer, 0, 0, size);
return charStr.substring(0, end);
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
var i = (buffer.length >= 3) ? 3 : buffer.length;
var c = buffer[buffer.length - i];
// See hXXp://en.wikipedia.org/wiki/UTF-8#Description
this.charLength = 2;
this.charLength = 3;
this.charLength = 4;
this.charReceived = i;
StringDecoder.prototype.end = function(buffer) {
if (buffer && buffer.length)
res = this.write(buffer);
if (this.charReceived) {
var cr = this.charReceived;
var buf = this.charBuffer;
var enc = this.encoding;
res  = buf.slice(0, cr).toString(enc);
function passThroughWrite(buffer) {
return buffer.toString(this.encoding);
this.charReceived = buffer.length % 2;
this.charLength = this.charReceived ? 2 : 0;
this.charReceived = buffer.length % 3;
this.charLength = this.charReceived ? 3 : 0;
module.exports = require('util');
var Timer = process.binding('timer_wrap').Timer;
if (process.env.NODE_DEBUG && /timer/.test(process.env.NODE_DEBUG)) {
debug = function() { require('util').error.apply(this, arguments); };
// hXXp://pod.tst.eu/hXXp://cvs.schmorp.de/libev/ev.pod#Be_smart_about_timeouts
// key = time in milliseconds
item._idleStart = Date.now();
list.start(msecs, 0);
L.init(list);
list.msecs = msecs;
list.ontimeout = listOnTimeout;
L.append(list, item);
assert(!L.isEmpty(list)); // list is not empty
var msecs = this.msecs;
var now = Date.now();
while (first = L.peek(list)) {
list.start(msecs - diff, 0);
L.remove(first);
assert(first !== L.peek(list));
// hXXps://github.com/joyent/node/issues/2631
var domain = first.domain;
domain.enter();
domain.exit();
var oldDomain = process.domain;
process.domain = null;
process.nextTick(function() {
list.ontimeout();
process.domain = oldDomain;
assert(L.isEmpty(list));
list.close();
var unenroll = exports.unenroll = function(item) {
L.remove(item);
if (list && L.isEmpty(list)) {
list.close();
exports.enroll = function(item, msecs) {
L.init(item);
exports.active = function(item) {
if (!list || L.isEmpty(list)) {
item._idleStart = Date.now();
L.append(list, item);
exports.setTimeout = function(callback, after) {
if (arguments.length <= 2) {
var args = Array.prototype.slice.call(arguments, 2);
callback.apply(timer, args);
if (process.domain) timer.domain = process.domain;
exports.active(timer);
exports.clearTimeout = function(timer) {
if (timer && (timer.ontimeout || timer._onTimeout)) {
timer.ontimeout = timer._onTimeout = null;
timer.close(); // for after === 0
exports.unenroll(timer);
exports.setInterval = function(callback, repeat) {
var args = Array.prototype.slice.call(arguments, 2);
callback.apply(this, args);
this._handle.start(repeat, 0);
exports.active(timer);
exports.clearInterval = function(timer) {
Timeout.prototype.unref = function() {
var now = Date.now();
exports.unenroll(this);
this._handle.ontimeout = this._onTimeout;
this._handle.start(delay, 0);
this._handle.domain = this.domain;
Timeout.prototype.ref = function() {
Timeout.prototype.close = function() {
this._handle.ontimeout = null;
L.init(immediateQueue);
var immediate = L.shift(immediateQueue);
if (L.isEmpty(immediateQueue)) {
if (immediate.domain) immediate.domain.enter();
if (immediate.domain) immediate.domain.exit();
exports.setImmediate = function(callback) {
L.init(immediate);
if (arguments.length > 1) {
args = Array.prototype.slice.call(arguments, 1);
callback.apply(immediate, args);
if (process.domain) immediate.domain = process.domain;
L.append(immediateQueue, immediate);
exports.clearImmediate = function(immediate) {
L.remove(immediate);
// timers.active as internal timeouts shouldn't hold the loop open
while (first = L.peek(unrefList)) {
unrefTimer.start(diff, 0);
unrefTimer.when = now   diff;
L.remove(first);
var domain = first.domain;
if (domain) domain.enter();
if (domain) domain.exit();
if (threw) process.nextTick(unrefTimeout);
unrefTimer.when = -1;
exports._unrefActive = function(item) {
L.init(unrefList);
unrefTimer.unref();
unrefTimer.when = -1;
unrefTimer.ontimeout = unrefTimeout;
if (L.isEmpty(unrefList)) {
L.append(unrefList, item);
unrefTimer.start(msecs, 0);
unrefTimer.when = now   msecs;
L.append(cur, item);
if (unrefTimer.when > when) {
unrefTimer.start(msecs, 0);
unrefTimer.when = when;
L.append(unrefList, item);
exports.CLIENT_RENEG_LIMIT = 3;
exports.CLIENT_RENEG_WINDOW = 600;
exports.SLAB_BUFFER_SIZE = 10 * 1024 * 1024;
var names = process.binding('crypto').getSSLCiphers();
if (/^[0-9A-Z\-] $/.test(name)) name = name.toLowerCase();
return Object.getOwnPropertyNames(ctx).sort();
if (process.env.NODE_DEBUG && /tls/.test(process.env.NODE_DEBUG)) {
debug = function(a) { console.error('TLS:', a); };
Connection = process.binding('crypto').Connection;
throw new Error('node.js not compiled with openssl crypto support.');
// ("\x06spdy/2\x08http/1.1\x08http/1.0")
if (Array.isArray(NPNProtocols)) {
var buff = new Buffer(NPNProtocols.reduce(function(p, c) {
return p   1   Buffer.byteLength(c);
NPNProtocols.reduce(function(offset, c) {
var clen = Buffer.byteLength(c);
buff.write(c, offset   1);
if (Buffer.isBuffer(NPNProtocols)) {
out.NPNProtocols = NPNProtocols;
function checkServerIdentity(host, cert) {
if (!/\.$/.test(host)) host  = '.';
// or if there are less than two dots after wildcard (i.e. *.com or *d.com)
// left-most label (e.g., do not match bar.*.example.net)."
if (!wildcards && /\*/.test(host) || /[\.\*].*\*/.test(host) ||
/\*/.test(host) && !/\*.*\.. \.. /.test(host)) {
var re = host.replace(
// CN and altnames in certificate extension
if (cert.subjectaltname) {
cert.subjectaltname.split(/, /g).forEach(function(altname) {
if (/^DNS:/.test(altname)) {
dnsNames.push(altname.slice(4));
} else if (/^IP Address:/.test(altname)) {
ips.push(altname.slice(11));
} else if (/^URI:/.test(altname)) {
var uri = url.parse(altname.slice(4));
if (uri) uriNames.push(uri.hostname);
if (net.isIP(host)) {
valid = ips.some(function(ip) {
// Otherwise check all DNS/URI records from certificate
dnsNames = dnsNames.map(function(name) {
uriNames = uriNames.map(function(name) {
dnsNames = dnsNames.concat(uriNames);
if (dnsNames.length > 0) matchCN = false;
// Match against Common Name (CN) only if no supported identifiers are
// URI-ID, or any application-specific identifier types supported by the
var commonNames = cert.subject.CN;
if (Array.isArray(commonNames)) {
for (var i = 0, k = commonNames.length; i < k;   i) {
dnsNames.push(regexpify(commonNames[i], true));
dnsNames.push(regexpify(commonNames, true));
valid = dnsNames.some(function(re) {
return re.test(host);
exports.checkServerIdentity = checkServerIdentity;
this.create();
SlabBuffer.prototype.create = function create() {
this.isFull = false;
this.pool = new Buffer(exports.SLAB_BUFFER_SIZE);
this.offset = 0;
this.remaining = this.pool.length;
SlabBuffer.prototype.use = function use(context, fn, size) {
if (this.remaining === 0) {
this.isFull = true;
var actualSize = this.remaining;
if (size !== null) actualSize = Math.min(size, actualSize);
var bytes = fn.call(context, this.pool, this.offset, actualSize);
this.offset  = bytes;
this.remaining -= bytes;
assert(this.remaining >= 0);
this.pair = pair;
this.once('finish', onCryptoStreamFinish);
// net.Socket calls .onend too
this.once('end', onCryptoStreamEnd);
util.inherits(CryptoStream, stream.Duplex);
if (this === this.pair.cleartext) {
debug('cleartext.onfinish');
if (this.pair.ssl) {
if (this.pair.ssl.shutdown() !== 1) {
if (this.pair.ssl && this.pair.ssl.error)
return this.pair.error();
this.pair.ssl.shutdown();
if (this.pair.ssl && this.pair.ssl.error)
return this.pair.error();
debug('encrypted.onfinish');
if (this._opposite.readable) this._opposite.read(0);
if (this === this.pair.cleartext) this._opposite._done();
debug('cleartext.onend');
debug('encrypted.onend');
if (this.onend) this.onend();
CryptoStream.prototype.init = function init() {
this._opposite.on('sslOutEnd', function() {
CryptoStream.prototype._write = function write(data, encoding, cb) {
if (!this.pair.ssl) return cb(null);
if (this === this.pair.cleartext) {
debug('cleartext.write called with '   data.length   ' bytes');
written = this.pair.ssl.clearIn(data, 0, data.length);
debug('encrypted.write called with '   data.length   ' bytes');
written = this.pair.ssl.encIn(data, 0, data.length);
// Handle and report errors
if (this.pair.ssl && this.pair.ssl.error) {
return cb(this.pair.error(true));
this.pair.cleartext.read(0);
if (this.pair.encrypted._internallyPendingBytes())
this.pair.encrypted.read(0);
this.pair.maybeInitFinished();
if (written === data.length) {
if (this === this.pair.cleartext) {
debug('cleartext.write succeed with '   written   ' bytes');
debug('encrypted.write succeed with '   written   ' bytes');
this._write(data.slice(written), encoding, cb);
debug('cleartext.write queue is full');
debug('cleartext.write queued with '   data.length   ' bytes');
debug('encrypted.write queued with '   data.length   ' bytes');
CryptoStream.prototype._writePending = function writePending() {
CryptoStream.prototype._read = function read(size) {
if (!this.pair.ssl) return this.push(null);
if (this._resumingSession || !this._reading) return this.push('');
debug('cleartext.read called with '   size   ' bytes');
out = this.pair.ssl.clearOut;
debug('encrypted.read called with '   size   ' bytes');
out = this.pair.ssl.encOut;
start = this._buffer.offset,
assert(last === this._buffer.offset);
var read = this._buffer.use(this.pair.ssl, out, size - bytesRead);
last = this._buffer.offset;
this.pair.error();
!this._buffer.isFull &&
this.pair.ssl !== null);
this.pair.maybeInitFinished();
var pool = this._buffer.pool;
if (this._buffer.isFull) this._buffer.create();
debug('cleartext.read succeed with '   bytesRead   ' bytes');
debug('encrypted.read succeed with '   bytesRead   ' bytes');
this.pair.ssl && this.pair.ssl.receivedShutdown) {
this.push(null);
} else if (!this.pair.ssl || !this.pair.ssl.receivedShutdown) {
this.push('');
if (this.ondata) {
this.ondata(pool, start, start   bytesRead);
// Force state.reading to set to false
this.push(pool.slice(start, start   bytesRead));
debug('cleartext.sslOutEnd');
debug('encrypted.sslOutEnd');
this.emit('sslOutEnd');
CryptoStream.prototype.setTimeout = function(timeout, callback) {
if (this.socket) this.socket.setTimeout(timeout, callback);
CryptoStream.prototype.setNoDelay = function(noDelay) {
if (this.socket) this.socket.setNoDelay(noDelay);
CryptoStream.prototype.setKeepAlive = function(enable, initialDelay) {
if (this.socket) this.socket.setKeepAlive(enable, initialDelay);
CryptoStream.prototype.__defineGetter__('bytesWritten', function() {
return this.socket ? this.socket.bytesWritten : 0;
// C=US\nST=CA\nL=SF\nO=Joyent\nOU=Node.js\nCN=ca1\nemailAddress=ry@clouds.org
function parseCertString(s) {
var parts = s.split('\n');
for (var i = 0, len = parts.length; i < len; i  ) {
var sepIndex = parts[i].indexOf('=');
var key = parts[i].slice(0, sepIndex);
var value = parts[i].slice(sepIndex   1);
if (key in out) {
if (!Array.isArray(out[key])) {
out[key] = [out[key]];
out[key].push(value);
out[key] = value;
CryptoStream.prototype.getPeerCertificate = function() {
if (this.pair.ssl) {
var c = this.pair.ssl.getPeerCertificate();
if (c.issuer) c.issuer = parseCertString(c.issuer);
if (c.subject) c.subject = parseCertString(c.subject);
CryptoStream.prototype.getSession = function() {
return this.pair.ssl.getSession();
CryptoStream.prototype.isSessionReused = function() {
return this.pair.ssl.isSessionReused();
CryptoStream.prototype.getCipher = function(err) {
return this.pair.ssl.getCurrentCipher();
CryptoStream.prototype.end = function(chunk, encoding) {
debug('cleartext.end');
debug('encrypted.end');
stream.Duplex.prototype.end.call(this, chunk, encoding);
CryptoStream.prototype.destroySoon = function(err) {
debug('cleartext.destroySoon');
debug('encrypted.destroySoon');
if (this._writableState.finished && this._opposite._ended) {
this._opposite.once('end', finish);
this.once('finish', finish);
if (--waiting === 0) self.destroy();
CryptoStream.prototype.destroy = function(err) {
debug('cleartext.destroy');
debug('encrypted.destroy');
this._opposite.destroy();
self.emit('close', err ? true : false);
CryptoStream.prototype._done = function() {
if (this === this.pair.encrypted && !this.pair._secureEstablished)
return this.pair.error();
if (this.pair.cleartext._doneFlag &&
this.pair.encrypted._doneFlag &&
!this.pair._doneFlag) {
this.pair.destroy();
Object.defineProperty(CryptoStream.prototype, 'readyState', {
CryptoStream.call(this, pair, options);
// This is a fake kludge to support how the http impl sits
if (self._reading && self._readableState.length > 0) return;
if (self._opposite.readable) self._opposite.read(0);
util.inherits(CleartextStream, CryptoStream);
CleartextStream.prototype._internallyPendingBytes = function() {
return this.pair.ssl.clearPending();
CleartextStream.prototype.address = function() {
return this.socket && this.socket.address();
CleartextStream.prototype.__defineGetter__('remoteAddress', function() {
return this.socket && this.socket.remoteAddress;
CleartextStream.prototype.__defineGetter__('remotePort', function() {
return this.socket && this.socket.remotePort;
util.inherits(EncryptedStream, CryptoStream);
EncryptedStream.prototype._internallyPendingBytes = function() {
return this.pair.ssl.encPending();
var ssl = self.ssl;
assert(now >= ssl.lastHandshakeTime);
if ((now - ssl.lastHandshakeTime) >= exports.CLIENT_RENEG_WINDOW * 1000) {
ssl.handshakes = 0;
var first = (ssl.lastHandshakeTime === 0);
ssl.lastHandshakeTime = now;
if (  ssl.handshakes > exports.CLIENT_RENEG_LIMIT) {
if (self.cleartext) self.cleartext.emit('error', err);
if (err) return self.socket.destroy(err);
self.ssl.loadSession(session);
self.cleartext.read(0);
self.encrypted.read(0);
if (hello.sessionId.length <= 0 ||
!this.server ||
!this.server.emit('resumeSession', hello.sessionId, callback)) {
function onnewsession(key, session) {
if (!this.server) return;
this.server.emit('newSession', key, session);
function SecurePair(credentials, isServer, requestCert, rejectUnauthorized,
requestCert,
this.server = options.server;
this.credentials = crypto.createCredentials();
this.credentials = credentials;
requestCert = true;
this._requestCert = requestCert ? true : false;
this.ssl = new Connection(this.credentials.context,
this._isServer ? this._requestCert :
options.servername,
this.ssl.onhandshakestart = onhandshakestart.bind(this);
this.ssl.onhandshakedone = onhandshakedone.bind(this);
this.ssl.onclienthello = onclienthello.bind(this);
this.ssl.onnewsession = onnewsession.bind(this);
this.ssl.lastHandshakeTime = 0;
this.ssl.handshakes = 0;
if (process.features.tls_sni) {
if (this._isServer && options.SNICallback) {
this.ssl.setSNICallback(options.SNICallback);
this.servername = null;
if (process.features.tls_npn && options.NPNProtocols) {
this.ssl.setNPNProtocols(options.NPNProtocols);
this.npnProtocol = null;
this.cleartext = new CleartextStream(this, options.cleartext);
this.encrypted = new EncryptedStream(this, options.encrypted);
this.cleartext._opposite = this.encrypted;
this.encrypted._opposite = this.cleartext;
this.cleartext.init();
this.encrypted.init();
if (self.ssl) {
self.ssl.start();
if (self.ssl && self.ssl.error)
self.error();
util.inherits(SecurePair, events.EventEmitter);
exports.createSecurePair = function(credentials,
requestCert,
requestCert,
SecurePair.prototype.maybeInitFinished = function() {
if (this.ssl && !this._secureEstablished && this.ssl.isInitFinished()) {
if (process.features.tls_npn) {
this.npnProtocol = this.ssl.getNegotiatedProtocol();
if (process.features.tls_sni) {
this.servername = this.ssl.getServername();
this.emit('secure');
SecurePair.prototype.destroy = function() {
debug('SecurePair.destroy');
this.cleartext.destroy();
this.encrypted.destroy();
this.ssl.error = null;
this.ssl.close();
this.ssl = null;
SecurePair.prototype.error = function(returnOnly) {
var err = this.ssl.error;
this.ssl.error = null;
if (!err || err.message === 'ZERO_RETURN') {
connReset.code = 'ECONNRESET';
connReset.sslError = err && err.message;
if (!returnOnly) this.emit('error', err);
/peer did not return a certificate/.test(err.message)) {
if (!returnOnly) this.cleartext.emit('error', err);
// TODO: support anonymous (nocert) and PSK
// There are several levels of authentication that TLS/SSL supports.
// 1. The server sends a certificate to the client but does not request a
// cert from the client. This is common for most HTTPS servers. The browser
// the client is. Authenticating the client is usually done over HTTP using
// login boxes and cookies and stuff.
// 2. The server sends a cert to the client and requests that the client
// also send it a cert. The client knows who the server is and the server is
// A) verifyError returns null meaning the client's certificate is signed
// B) For some reason the client's certificate is not acceptable -
// requestCert
// If true the server requests a certificate from client connections. For
// the common HTTPS case, users will want this to be false, which is what
// If true clients whose certificates are invalid for any reason will not
// - requestCert. Send verify request. Default to false.
// - key. string.
// - cert: string.
// "UNABLE_TO_GET_ISSUER_CERT", "UNABLE_TO_GET_CRL",
// "UNABLE_TO_DECRYPT_CERT_SIGNATURE", "UNABLE_TO_DECRYPT_CRL_SIGNATURE",
// "UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY", "CERT_SIGNATURE_FAILURE",
// "CRL_SIGNATURE_FAILURE", "CERT_NOT_YET_VALID" "CERT_HAS_EXPIRED",
// "CRL_NOT_YET_VALID", "CRL_HAS_EXPIRED" "ERROR_IN_CERT_NOT_BEFORE_FIELD",
// "ERROR_IN_CERT_NOT_AFTER_FIELD", "ERROR_IN_CRL_LAST_UPDATE_FIELD",
// "DEPTH_ZERO_SELF_SIGNED_CERT", "SELF_SIGNED_CERT_IN_CHAIN",
// "UNABLE_TO_GET_ISSUER_CERT_LOCALLY", "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
// "CERT_CHAIN_TOO_LONG", "CERT_REVOKED" "INVALID_CA",
// "PATH_LENGTH_EXCEEDED", "INVALID_PURPOSE" "CERT_UNTRUSTED",
// "CERT_REJECTED"
// cleartext.credentials (by mirroring from pair object)
// cleartext.getCertificate() (by mirroring from pair.credentials.context)
this.setOptions(options);
if (!self.pfx && (!self.cert || !self.key)) {
throw new Error('Missing PFX or certificate   private key.');
var sharedCreds = crypto.createCredentials({
pfx: self.pfx,
key: self.key,
passphrase: self.passphrase,
cert: self.cert,
ca: self.ca,
ciphers: self.ciphers || DEFAULT_CIPHERS,
secureProtocol: self.secureProtocol,
secureOptions: self.secureOptions,
crl: self.crl,
sessionIdContext: self.sessionIdContext
var timeout = options.handshakeTimeout || (120 * 1000);
net.Server.call(this, function(socket) {
var creds = crypto.createCredentials(null, sharedCreds.context);
self.requestCert,
self.rejectUnauthorized,
NPNProtocols: self.NPNProtocols,
SNICallback: self.SNICallback,
var cleartext = pipe(pair, socket);
pair.emit('error', new Error('TLS handshake timeout'));
socket.setTimeout(timeout, listener);
pair.once('secure', function() {
socket.setTimeout(0, listener);
pair.cleartext.authorized = false;
pair.cleartext.npnProtocol = pair.npnProtocol;
pair.cleartext.servername = pair.servername;
if (!self.requestCert) {
self.emit('secureConnection', pair.cleartext, pair.encrypted);
var verifyError = pair.ssl.verifyError();
pair.cleartext.authorizationError = verifyError.message;
if (self.rejectUnauthorized) {
socket.destroy();
pair.destroy();
self.emit('secureConnection', pair.cleartext, pair.encrypted);
pair.cleartext.authorized = true;
self.emit('secureConnection', pair.cleartext, pair.encrypted);
pair.on('error', function(err) {
self.emit('clientError', err, this);
this.on('secureConnection', listener);
exports.createServer = function(options, listener) {
Server.prototype.setOptions = function(options) {
if (typeof options.requestCert == 'boolean') {
this.requestCert = options.requestCert;
this.requestCert = false;
if (typeof options.rejectUnauthorized == 'boolean') {
this.rejectUnauthorized = options.rejectUnauthorized;
this.rejectUnauthorized = false;
if (options.pfx) this.pfx = options.pfx;
if (options.key) this.key = options.key;
if (options.passphrase) this.passphrase = options.passphrase;
if (options.cert) this.cert = options.cert;
if (options.ca) this.ca = options.ca;
if (options.secureProtocol) this.secureProtocol = options.secureProtocol;
if (options.crl) this.crl = options.crl;
if (options.ciphers) this.ciphers = options.ciphers;
var secureOptions = options.secureOptions || 0;
if (options.honorCipherOrder) {
secureOptions |= constants.SSL_OP_CIPHER_SERVER_PREFERENCE;
if (secureOptions) this.secureOptions = secureOptions;
if (options.NPNProtocols) convertNPNProtocols(options.NPNProtocols, this);
if (options.SNICallback) {
this.SNICallback = options.SNICallback;
this.SNICallback = this.SNICallback.bind(this);
this.sessionIdContext = options.sessionIdContext;
} else if (this.requestCert) {
this.sessionIdContext = crypto.createHash('md5')
.update(process.argv.join(' '))
.digest('hex');
if (options.cleartext) this.cleartext = options.cleartext;
if (options.encrypted) this.encrypted = options.encrypted;
Server.prototype.addContext = function(servername, credentials) {
throw 'Servername is required parameter for Server.addContext';
servername.replace(/([\.^$ ?\-\\[\]{}])/g, '\\$1')
.replace(/\*/g, '.*')  
this._contexts.push([re, crypto.createCredentials(credentials).context]);
Server.prototype.SNICallback = function(servername) {
this._contexts.some(function(elem) {
if (servername.match(elem[0]) !== null) {
// var s = tls.connect({port: 8000, host: "google.com"}, function() {
// if (!s.authorized) {
// s.destroy();
// // s.socket;
// s.end("hello world\n");
exports.connect = function(/* [port, host], options, cb */) {
rejectUnauthorized: '0' !== process.env.NODE_TLS_REJECT_UNAUTHORIZED
var socket = options.socket ? options.socket : new net.Stream();
var sslcontext = crypto.createCredentials(options);
convertNPNProtocols(options.NPNProtocols, NPN);
var hostname = options.servername || options.host || 'localhost',
options.rejectUnauthorized === true ? true : false,
NPNProtocols: NPN.NPNProtocols,
cleartext: options.cleartext,
encrypted: options.encrypted
if (options.session) {
var session = options.session;
pair.ssl.setSession(session);
var cleartext = pipe(pair, socket);
cleartext.once('secureConnect', cb);
if (!options.socket) {
var connect_opt = (options.path && !options.port) ? {path: options.path} : {
port: options.port,
host: options.host,
localAddress: options.localAddress
socket.connect(connect_opt);
pair.on('secure', function() {
var verifyError = pair.ssl.verifyError();
cleartext.npnProtocol = pair.npnProtocol;
// Verify that server's identity matches it's certificate's names
var validCert = checkServerIdentity(hostname,
pair.cleartext.getPeerCertificate());
if (!validCert) {
verifyError = new Error('Hostname/IP doesn\'t match certificate\'s '  
cleartext.authorized = false;
cleartext.authorizationError = verifyError.message;
cleartext.emit('error', verifyError);
pair.destroy();
cleartext.emit('secureConnect');
cleartext.authorized = true;
cleartext.emit('secureConnect');
pair.on('error', function(err) {
cleartext.emit('error', err);
function pipe(pair, socket) {
pair.encrypted.pipe(socket);
socket.pipe(pair.encrypted);
pair.encrypted.on('close', function() {
// Encrypted should be unpiped from socket to prevent possible
pair.encrypted.unpipe(socket);
pair.fd = socket.fd;
var cleartext = pair.cleartext;
cleartext.socket = socket;
cleartext.encrypted = pair.encrypted;
cleartext.authorized = false;
// be handled by the fact that pipe() triggers read() calls
// on writable.drain, but CryptoStreams are a bit more
socket.on('drain', function() {
if (pair.encrypted._pending)
pair.encrypted._writePending();
if (pair.cleartext._pending)
pair.cleartext._writePending();
pair.encrypted.read(0);
pair.cleartext.read(0);
cleartext.emit('error', e);
socket.removeListener('error', onerror);
socket.removeListener('timeout', ontimeout);
cleartext.emit('timeout');
socket.on('error', onerror);
socket.on('close', onclose);
socket.on('timeout', ontimeout);
var TTY = process.binding('tty_wrap').TTY;
var isTTY = process.binding('tty_wrap').isTTY;
exports.isatty = function(fd) {
exports.setRawMode = util.deprecate(function(flag) {
if (!process.stdin.isTTY) {
process.stdin.setRawMode(flag);
}, 'tty.setRawMode: Use `process.stdin.setRawMode()` instead.');
net.Socket.call(this, options);
this.isRaw = false;
this.isTTY = true;
inherits(ReadStream, net.Socket);
exports.ReadStream = ReadStream;
ReadStream.prototype.setRawMode = function(flag) {
this._handle.setRawMode(flag);
this.isRaw = flag;
net.Socket.call(this, {
var winSize = this._handle.getWindowSize();
this.columns = winSize[0];
this.rows = winSize[1];
inherits(WriteStream, net.Socket);
exports.WriteStream = WriteStream;
WriteStream.prototype.isTTY = true;
WriteStream.prototype._refreshSize = function() {
var oldCols = this.columns;
var oldRows = this.rows;
this.emit('error', errnoException(process._errno, 'getWindowSize'));
this.columns = newCols;
this.rows = newRows;
this.emit('resize');
WriteStream.prototype.cursorTo = function(x, y) {
require('readline').cursorTo(this, x, y);
WriteStream.prototype.moveCursor = function(dx, dy) {
require('readline').moveCursor(this, dx, dy);
WriteStream.prototype.clearLine = function(dir) {
require('readline').clearLine(this, dir);
WriteStream.prototype.clearScreenDown = function() {
require('readline').clearScreenDown(this);
WriteStream.prototype.getWindowSize = function() {
return [this.columns, this.rows];
exports.parse = urlParse;
exports.resolve = urlResolve;
exports.resolveObject = urlResolveObject;
exports.format = urlFormat;
exports.Url = Url;
function Url() {
this.protocol = null;
this.slashes = null;
this.auth = null;
this.host = null;
this.port = null;
this.hostname = null;
this.hash = null;
this.search = null;
this.query = null;
this.pathname = null;
this.path = null;
this.href = null;
portPattern = /:[0-9]*$/,
// RFC 2396: characters reserved for delimiting URLs.
unwise = ['{', '}', '|', '\\', '^', '~', '`'].concat(delims),
autoEscape = ['\''].concat(delims),
.concat(unwise).concat(autoEscape),
'http': true,
'https': true,
'ftp': true,
'http:': true,
'https:': true,
'ftp:': true,
function urlParse(url, parseQueryString, slashesDenoteHost) {
if (url && typeof(url) === 'object' && url instanceof Url) return url;
var u = new Url;
u.parse(url, parseQueryString, slashesDenoteHost);
Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
if (typeof url !== 'string') {
throw new TypeError("Parameter 'url' must be a string, not "   typeof url);
// Copy chrome, IE, opera backslash-handling behavior.
// See: hXXps://code.google.com/p/chromium/issues/detail?id=25916
var hashSplit = url.split('#');
hashSplit[0] = hashSplit[0].replace(/\\/g, '/');
url = hashSplit.join('#');
var rest = url;
// This is to support parse stuff like " hXXp://foo.com \n"
rest = rest.trim();
var proto = protocolPattern.exec(rest);
var lowerProto = proto.toLowerCase();
this.protocol = lowerProto;
rest = rest.substr(proto.length);
// user@server is *always* interpreted as a hostname, and url
// how the browser resolves relative URLs.
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/] @[^@\/] /)) {
var slashes = rest.substr(0, 2) === '//';
rest = rest.substr(2);
this.slashes = true;
// URLs are obnoxious.
// hXXp://a@b@c/ => user:a@b host:c
// hXXp://a@b?@c => user:a host:c path:/?@c
// v0.12 TODO(isaacs): This is not quite how Chrome does things.
for (var i = 0; i < hostEndingChars.length; i  ) {
var hec = rest.indexOf(hostEndingChars[i]);
// auth portion cannot go past, or the last @ char is the decider.
atSign = rest.lastIndexOf('@');
// atSign must be in auth portion.
// hXXp://a@b/c@d => host:b auth:a path:/c@d
atSign = rest.lastIndexOf('@', hostEnd);
// Now we have a portion which is definitely the auth.
auth = rest.slice(0, atSign);
rest = rest.slice(atSign   1);
this.auth = decodeURIComponent(auth);
for (var i = 0; i < nonHostChars.length; i  ) {
var hec = rest.indexOf(nonHostChars[i]);
hostEnd = rest.length;
this.host = rest.slice(0, hostEnd);
rest = rest.slice(hostEnd);
// pull out port.
this.parseHost();
this.hostname = this.hostname || '';
var ipv6Hostname = this.hostname[0] === '[' &&
this.hostname[this.hostname.length - 1] === ']';
var hostparts = this.hostname.split(/\./);
for (var i = 0, l = hostparts.length; i < l; i  ) {
if (!part.match(hostnamePartPattern)) {
for (var j = 0, k = part.length; j < k; j  ) {
if (part.charCodeAt(j) > 127) {
if (!newpart.match(hostnamePartPattern)) {
var validParts = hostparts.slice(0, i);
var notHost = hostparts.slice(i   1);
var bit = part.match(hostnamePartStart);
validParts.push(bit[1]);
notHost.unshift(bit[2]);
if (notHost.length) {
rest = '/'   notHost.join('.')   rest;
this.hostname = validParts.join('.');
if (this.hostname.length > hostnameMaxLen) {
this.hostname = '';
this.hostname = this.hostname.toLowerCase();
// IDNA Support: Returns a puny coded representation of "domain".
var domainArray = this.hostname.split('.');
for (var i = 0; i < domainArray.length;   i) {
newOut.push(s.match(/[^A-Za-z0-9_-]/) ?
'xn--'   punycode.encode(s) : s);
this.hostname = newOut.join('.');
var p = this.port ? ':'   this.port : '';
var h = this.hostname || '';
this.host = h   p;
this.href  = this.host;
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
for (var i = 0, l = autoEscape.length; i < l; i  ) {
rest = rest.split(ae).join(esc);
var hash = rest.indexOf('#');
this.hash = rest.substr(hash);
rest = rest.slice(0, hash);
var qm = rest.indexOf('?');
this.search = rest.substr(qm);
this.query = rest.substr(qm   1);
this.query = querystring.parse(this.query);
rest = rest.slice(0, qm);
this.search = '';
this.query = {};
if (rest) this.pathname = rest;
this.hostname && !this.pathname) {
this.pathname = '/';
//to support http.request
if (this.pathname || this.search) {
var p = this.pathname || '';
var s = this.search || '';
this.path = p   s;
this.href = this.format();
// format a parsed object into a url string
function urlFormat(obj) {
// ensure it's an object, and not a string url.
// this way, you can call url_format() on strings
// to clean up potentially wonky urls.
if (typeof(obj) === 'string') obj = urlParse(obj);
if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
return obj.format();
Url.prototype.format = function() {
var auth = this.auth || '';
auth = auth.replace(/:/i, ':');
var protocol = this.protocol || '',
pathname = this.pathname || '',
hash = this.hash || '',
if (this.host) {
host = auth   this.host;
} else if (this.hostname) {
host = auth   (this.hostname.indexOf(':') === -1 ?
this.hostname :
'['   this.hostname   ']');
if (this.port) {
host  = ':'   this.port;
if (this.query && typeof this.query === 'object' &&
Object.keys(this.query).length) {
query = querystring.stringify(this.query);
var search = this.search || (query && ('?'   query)) || '';
if (protocol && protocol.substr(-1) !== ':') protocol  = ':';
if (this.slashes ||
if (pathname && pathname.charAt(0) !== '/') pathname = '/'   pathname;
if (hash && hash.charAt(0) !== '#') hash = '#'   hash;
if (search && search.charAt(0) !== '?') search = '?'   search;
pathname = pathname.replace(/[?#]/g, function(match) {
search = search.replace('#', '#');
function urlResolve(source, relative) {
return urlParse(source, false, true).resolve(relative);
Url.prototype.resolve = function(relative) {
return this.resolveObject(urlParse(relative, false, true)).format();
function urlResolveObject(source, relative) {
return urlParse(source, false, true).resolveObject(relative);
Url.prototype.resolveObject = function(relative) {
var rel = new Url();
rel.parse(relative, false, true);
var result = new Url();
Object.keys(this).forEach(function(k) {
result.hash = relative.hash;
// if the relative url is empty, then there's nothing left to do here.
if (relative.href === '') {
result.href = result.format();
if (relative.slashes && !relative.protocol) {
Object.keys(relative).forEach(function(k) {
//urlParse appends trailing / to urls like hXXp://VVV.example.com
if (slashedProtocol[result.protocol] &&
result.hostname && !result.pathname) {
result.path = result.pathname = '/';
if (relative.protocol && relative.protocol !== result.protocol) {
// if it's a known url protocol, then changing
if (!slashedProtocol[relative.protocol]) {
Object.keys(relative).forEach(function(k) {
result.href = result.format();
result.protocol = relative.protocol;
if (!relative.host && !hostlessProtocol[relative.protocol]) {
var relPath = (relative.pathname || '').split('/');
while (relPath.length && !(relative.host = relPath.shift()));
if (!relative.host) relative.host = '';
if (!relative.hostname) relative.hostname = '';
if (relPath[0] !== '') relPath.unshift('');
if (relPath.length < 2) relPath.unshift('');
result.pathname = relPath.join('/');
result.pathname = relative.pathname;
result.search = relative.search;
result.query = relative.query;
result.host = relative.host || '';
result.auth = relative.auth;
result.hostname = relative.hostname || relative.host;
result.port = relative.port;
// to support http.request
if (result.pathname || result.search) {
var p = result.pathname || '';
var s = result.search || '';
result.path = p   s;
result.slashes = result.slashes || relative.slashes;
var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
relative.host ||
relative.pathname && relative.pathname.charAt(0) === '/'
(result.host && relative.pathname)),
srcPath = result.pathname && result.pathname.split('/') || [],
relPath = relative.pathname && relative.pathname.split('/') || [],
psychotic = result.protocol && !slashedProtocol[result.protocol];
// if the url is a non-slashed url, then relative
// result.protocol has already been set by now.
result.hostname = '';
result.port = null;
if (result.host) {
if (srcPath[0] === '') srcPath[0] = result.host;
else srcPath.unshift(result.host);
result.host = '';
if (relative.protocol) {
relative.hostname = null;
relative.port = null;
if (relative.host) {
if (relPath[0] === '') relPath[0] = relative.host;
else relPath.unshift(relative.host);
relative.host = null;
result.host = (relative.host || relative.host === '') ?
relative.host : result.host;
result.hostname = (relative.hostname || relative.hostname === '') ?
relative.hostname : result.hostname;
} else if (relPath.length) {
srcPath.pop();
srcPath = srcPath.concat(relPath);
} else if (relative.search !== null && relative.search !== undefined) {
result.hostname = result.host = srcPath.shift();
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
result.auth = authInHost.shift();
result.host = result.hostname = authInHost.shift();
//to support http.request
if (result.pathname !== null || result.search !== null) {
result.path = (result.pathname ? result.pathname : '')  
(result.search ? result.search : '');
if (!srcPath.length) {
result.pathname = null;
if (result.search) {
result.path = '/'   result.search;
result.path = null;
// if a url ENDs in . or .., then it must get a trailing slash.
var last = srcPath.slice(-1)[0];
(result.host || relative.host) && (last === '.' || last === '..') ||
for (var i = srcPath.length; i >= 0; i--) {
srcPath.splice(i, 1);
srcPath.unshift('..');
(!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
srcPath.unshift('');
if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
srcPath.push('');
(srcPath[0] && srcPath[0].charAt(0) === '/');
result.hostname = result.host = isAbsolute ? '' :
srcPath.length ? srcPath.shift() : '';
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
result.auth = authInHost.shift();
result.host = result.hostname = authInHost.shift();
mustEndAbs = mustEndAbs || (result.host && srcPath.length);
result.path = null;
result.pathname = srcPath.join('/');
//to support request.http
if (result.pathname !== null || result.search !== null) {
result.path = (result.pathname ? result.pathname : '')  
(result.search ? result.search : '');
result.auth = relative.auth || result.auth;
result.slashes = result.slashes || relative.slashes;
result.href = result.format();
Url.prototype.parseHost = function() {
var host = this.host;
var port = portPattern.exec(host);
if (port) {
port = port[0];
if (port !== ':') {
this.port = port.substr(1);
host = host.substr(0, host.length - port.length);
if (host) this.hostname = host;
exports.format = function(f) {
for (var i = 0; i < arguments.length; i  ) {
objects.push(inspect(arguments[i]));
return objects.join(' ');
var len = args.length;
var str = String(f).replace(formatRegExp, function(x) {
case '%s': return String(args[i  ]);
case '%d': return Number(args[i  ]);
case '%j': return JSON.stringify(args[i  ]);
exports.deprecate = function(fn, msg) {
if (process.noDeprecation === true) {
if (process.throwDeprecation) {
} else if (process.traceDeprecation) {
return fn.apply(this, arguments);
exports.print = function() {
for (var i = 0, len = arguments.length; i < len;   i) {
process.stdout.write(String(arguments[i]));
exports.puts = function() {
process.stdout.write(arguments[i]   '\n');
exports.debug = function(x) {
process.stderr.write('DEBUG: '   x   '\n');
var error = exports.error = function(x) {
process.stderr.write(arguments[i]   '\n');
if (arguments.length >= 3) ctx.depth = arguments[2];
if (arguments.length >= 4) ctx.colors = arguments[3];
ctx.showHidden = opts;
exports._extend(ctx, opts);
if (typeof ctx.showHidden === 'undefined') ctx.showHidden = false;
if (typeof ctx.depth === 'undefined') ctx.depth = 2;
if (typeof ctx.colors === 'undefined') ctx.colors = false;
if (typeof ctx.customInspect === 'undefined') ctx.customInspect = true;
if (ctx.colors) ctx.stylize = stylizeWithColor;
return formatValue(ctx, obj, ctx.depth);
exports.inspect = inspect;
// hXXp://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
var style = inspect.styles[styleType];
return '\u001b['   inspect.colors[style][0]   'm'   str  
'\u001b['   inspect.colors[style][1]   'm';
array.forEach(function(val, idx) {
if (ctx.customInspect && value && typeof value.inspect === 'function' &&
value.inspect !== exports.inspect &&
!(value.constructor && value.constructor.prototype === value)) {
return String(value.inspect(recurseTimes));
// Look up the keys of the object.
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);
if (ctx.showHidden) {
keys = Object.getOwnPropertyNames(value);
if (keys.length === 0) {
var name = value.name ? ': '   value.name : '';
return ctx.stylize('[Function'   name   ']', 'special');
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
return ctx.stylize(Date.prototype.toString.call(value), 'date');
var n = value.name ? ': '   value.name : '';
base = ' '   RegExp.prototype.toString.call(value);
base = ' '   Date.prototype.toUTCString.call(value);
if (keys.length === 0 && (!array || value.length == 0)) {
return ctx.stylize('[Object]', 'special');
ctx.seen.push(value);
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
output = keys.map(function(key) {
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
ctx.seen.pop();
return ctx.stylize('undefined', 'undefined');
var simple = '\''   JSON.stringify(value).replace(/^"|"$/g, '')
.replace(/'/g, "\\'")
.replace(/\\"/g, '"')   '\'';
return ctx.stylize(simple, 'string');
return ctx.stylize(''   value, 'number');
return ctx.stylize(''   value, 'boolean');
return ctx.stylize('null', 'null');
return '['   Error.prototype.toString.call(value)   ']';
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
for (var i = 0, l = value.length; i < l;   i) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
output.push('');
keys.forEach(function(key) {
if (!key.match(/^\d $/)) {
key, true));
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
if (desc.get) {
if (desc.set) {
str = ctx.stylize('[Getter/Setter]', 'special');
str = ctx.stylize('[Getter]', 'special');
str = ctx.stylize('[Setter]', 'special');
if (!hasOwnProperty(visibleKeys, key)) {
name = '['   key   ']';
if (ctx.seen.indexOf(desc.value) < 0) {
str = formatValue(ctx, desc.value, null);
str = formatValue(ctx, desc.value, recurseTimes - 1);
if (str.indexOf('\n') > -1) {
str = str.split('\n').map(function(line) {
}).join('\n').substr(2);
str = '\n'   str.split('\n').map(function(line) {
}).join('\n');
str = ctx.stylize('[Circular]', 'special');
if (array && key.match(/^\d $/)) {
name = JSON.stringify(''   key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = ctx.stylize(name, 'name');
name = name.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
name = ctx.stylize(name, 'string');
var length = output.reduce(function(prev, cur) {
if (cur.indexOf('\n') >= 0) numLinesEst  ;
return prev   cur.length   1;
output.join(',\n ')  
return braces[0]   base   ' '   output.join(', ')   ' '   braces[1];
// because it is fragile and can be easily faked with `Object.create()`.
return Array.isArray(ar) ||
exports.isArray = isArray;
exports.isRegExp = isRegExp;
exports.isDate = isDate;
exports.isError = isError;
return Object.prototype.toString.call(o);
exports.p = exports.deprecate(function() {
error(exports.inspect(arguments[i]));
}, 'util.p: Use console.error() instead.');
return n < 10 ? '0'   n.toString(10) : n.toString(10);
var time = [pad(d.getHours()),
pad(d.getMinutes()),
pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');
exports.log = function(msg) {
exports.puts(timestamp()   ' - '   msg.toString());
exports.exec = exports.deprecate(function() {
return require('child_process').exec.apply(this, arguments);
}, 'util.exec is now called `child_process.exec`.');
readStream.addListener('data', function(chunk) {
if (writeStream.write(chunk) === false) readStream.pause();
writeStream.addListener('drain', function() {
readStream.resume();
readStream.addListener('end', function() {
writeStream.end();
readStream.addListener('close', function() {
readStream.addListener('error', function(err) {
writeStream.addListener('error', function(err) {
readStream.destroy();
exports.pump = exports.deprecate(pump,
'util.pump() is deprecated. Use readableStream.pipe() instead.');
* The Function.prototype.inherits from lang.js rewritten as a standalone
* function (not on Function.prototype). NOTE: If this file is to be loaded
* expected during bootstrapping (see mirror.js in r114903).
exports.inherits = function(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
exports._extend = function(origin, add) {
var keys = Object.keys(add);
var i = keys.length;
origin[keys[i]] = add[keys[i]];
var binding = process.binding('evals');
module.exports = Script;
Script.Script = Script;
var ns = new binding.NodeScript(code, ctx, filename);
Object.keys(binding.NodeScript.prototype).forEach(function(f) {
if (typeof binding.NodeScript.prototype[f] === 'function') {
return ns[f].apply(ns, arguments);
Script.createScript = function(code, ctx, name) {
Script.createContext = binding.NodeScript.createContext;
Script.runInContext = binding.NodeScript.runInContext;
Script.runInThisContext = binding.NodeScript.runInThisContext;
Script.runInNewContext = binding.NodeScript.runInNewContext;
var binding = process.binding('zlib');
Object.keys(binding).forEach(function(k) {
if (k.match(/^Z/)) exports[k] = binding[k];
exports.codes = {
Object.keys(exports.codes).forEach(function(k) {
exports.codes[exports.codes[k]] = k;
exports.Deflate = Deflate;
exports.Inflate = Inflate;
exports.Gzip = Gzip;
exports.Gunzip = Gunzip;
exports.DeflateRaw = DeflateRaw;
exports.InflateRaw = InflateRaw;
exports.Unzip = Unzip;
exports.createDeflate = function(o) {
exports.createInflate = function(o) {
exports.createDeflateRaw = function(o) {
exports.createInflateRaw = function(o) {
exports.createGzip = function(o) {
exports.createGunzip = function(o) {
exports.createUnzip = function(o) {
exports.deflate = function(buffer, callback) {
exports.gzip = function(buffer, callback) {
exports.deflateRaw = function(buffer, callback) {
exports.unzip = function(buffer, callback) {
exports.inflate = function(buffer, callback) {
exports.gunzip = function(buffer, callback) {
exports.inflateRaw = function(buffer, callback) {
engine.on('error', onError);
engine.on('end', onEnd);
engine.end(buffer);
while (null !== (chunk = engine.read())) {
buffers.push(chunk);
nread  = chunk.length;
engine.once('readable', flow);
engine.removeListener('end', onEnd);
engine.removeListener('readable', flow);
var buf = Buffer.concat(buffers, nread);
engine.close();
Zlib.call(this, opts, binding.DEFLATE);
Zlib.call(this, opts, binding.INFLATE);
Zlib.call(this, opts, binding.GZIP);
Zlib.call(this, opts, binding.GUNZIP);
Zlib.call(this, opts, binding.DEFLATERAW);
Zlib.call(this, opts, binding.INFLATERAW);
Zlib.call(this, opts, binding.UNZIP);
// you call the .write() method.
this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK;
Transform.call(this, opts);
if (opts.flush) {
if (opts.flush !== binding.Z_NO_FLUSH &&
opts.flush !== binding.Z_PARTIAL_FLUSH &&
opts.flush !== binding.Z_SYNC_FLUSH &&
opts.flush !== binding.Z_FULL_FLUSH &&
opts.flush !== binding.Z_FINISH &&
opts.flush !== binding.Z_BLOCK) {
throw new Error('Invalid flush flag: '   opts.flush);
this._flushFlag = opts.flush || binding.Z_NO_FLUSH;
if (opts.chunkSize) {
if (opts.chunkSize < exports.Z_MIN_CHUNK ||
opts.chunkSize > exports.Z_MAX_CHUNK) {
throw new Error('Invalid chunk size: '   opts.chunkSize);
if (opts.windowBits) {
if (opts.windowBits < exports.Z_MIN_WINDOWBITS ||
opts.windowBits > exports.Z_MAX_WINDOWBITS) {
throw new Error('Invalid windowBits: '   opts.windowBits);
if (opts.level) {
if (opts.level < exports.Z_MIN_LEVEL ||
opts.level > exports.Z_MAX_LEVEL) {
throw new Error('Invalid compression level: '   opts.level);
if (opts.memLevel) {
if (opts.memLevel < exports.Z_MIN_MEMLEVEL ||
opts.memLevel > exports.Z_MAX_MEMLEVEL) {
throw new Error('Invalid memLevel: '   opts.memLevel);
if (opts.strategy) {
if (opts.strategy != exports.Z_FILTERED &&
opts.strategy != exports.Z_HUFFMAN_ONLY &&
opts.strategy != exports.Z_RLE &&
opts.strategy != exports.Z_FIXED &&
opts.strategy != exports.Z_DEFAULT_STRATEGY) {
throw new Error('Invalid strategy: '   opts.strategy);
if (opts.dictionary) {
if (!Buffer.isBuffer(opts.dictionary)) {
this._binding = new binding.Zlib(mode);
this._binding.onerror = function(message, errno) {
error.errno = errno;
error.code = exports.codes[errno];
self.emit('error', error);
var level = exports.Z_DEFAULT_COMPRESSION;
if (typeof opts.level === 'number') level = opts.level;
var strategy = exports.Z_DEFAULT_STRATEGY;
if (typeof opts.strategy === 'number') strategy = opts.strategy;
this._binding.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS,
opts.memLevel || exports.Z_DEFAULT_MEMLEVEL,
opts.dictionary);
this.once('end', this.close);
util.inherits(Zlib, Transform);
Zlib.prototype.reset = function reset() {
return this._binding.reset();
Zlib.prototype._flush = function(callback) {
Zlib.prototype.flush = function(callback) {
if (ws.ended) {
process.nextTick(callback);
} else if (ws.ending) {
this.once('end', callback);
} else if (ws.needDrain) {
this.once('drain', function() {
self.flush(callback);
this.write(new Buffer(0), '', callback);
Zlib.prototype.close = function(callback) {
process.nextTick(callback);
this._binding.close();
Zlib.prototype._transform = function(chunk, encoding, cb) {
var ending = ws.ending || ws.ended;
var last = ending && (!chunk || ws.length === chunk.length);
if (chunk !== null && !Buffer.isBuffer(chunk))
if (chunk.length >= ws.length) {
this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;
var availInBefore = chunk && chunk.length;
var req = this._binding.write(flushFlag,
req.buffer = chunk;
req.callback = callback;
var out = self._buffer.slice(self._offset, self._offset   have);
self.push(out);
var newReq = self._binding.write(flushFlag,
newReq.callback = callback; // this same function
newReq.buffer = chunk;
util.inherits(Deflate, Zlib);
util.inherits(Inflate, Zlib);
util.inherits(Gzip, Zlib);
util.inherits(Gunzip, Zlib);
util.inherits(DeflateRaw, Zlib);
util.inherits(InflateRaw, Zlib);
util.inherits(Unzip, Zlib);
'node_shared_http_parser': 'false',
'python': 'C:\\Python27\\python.exe',
WSAEMSGSIZE
WSAEPROTONOSUPPORT
WSAESOCKTNOSUPPORT
WSAEPFNOSUPPORT
WSAEAFNOSUPPORT
WSAVERNOTSUPPORTED
node_%s
src\node_file.cc
off   len > buffer.length
node_http_parser
src\node_http_parser.cc
Argument must be HTTPParser.REQUEST or HTTPParser.RESPONSE
HTTPParser
REPORT
httpVersion
_stream_passthrough
https
src\node_os.cc
Windows_NT
%d.%d.%d
getCPUs
src\node_script.cc
Object.getOwnPropertyNames(source).forEach(function(key) {
var desc = Object.getOwnPropertyDescriptor(source, key);
if (desc.value === source) desc.value = target;
Object.defineProperty(target, key, desc);
src\node_zlib.cc
node_pipe_wrap
src\pipe_wrap.cc
Pipe
PipeWrap: Aborting due to unwrap failure at %s:%d
uv_pipe_open
src\signal_wrap.cc
SignalWrap: Aborting due to unwrap failure at %s:%d
src\stream_wrap.cc
StreamWrap: Aborting due to unwrap failure at %s:%d
node_tcp_wrap
src\tcp_wrap.cc
TCPWrap: Aborting due to unwrap failure at %s:%d
src\timer_wrap.cc
TimerWrap: Aborting due to unwrap failure at %s:%d
src\tty_wrap.cc
getWindowSize
guessHandleType
PIPE
TTYWrap: Aborting due to unwrap failure at %s:%d
src\process_wrap.cc
pipe
ProcessWrap: Aborting due to unwrap failure at %s:%d
options.uid is out of range
options.uid should be a number
options.gid is out of range
options.gid should be a number
windowsVerbatimArguments
node_udp_wrap
src\udp_wrap.cc
UDPWrap: Aborting due to unwrap failure at %s:%d
invalid port
HPE_INVALID_PORT
invalid URL
HPE_INVALID_URL
invalid HTTP method
invalid HTTP status code
invalid HTTP version
the on_url callback failed
HPE_CB_url
iphlpapi.dll
advapi32.dll
System\CurrentControlSet\Services\Tcpip\Parameters
%lu.%lu.%lu.%lu.in-addr.arpa
%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.
%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.arpa
System\CurrentControlSet\Services\VxD\MSTCP
%s,%s
CreateIoCompletionPort
EAIFAMNOSUPPORT
address family not supported
illegal operation on a directory
socket operation on non-socket
operation not supported on socket
broken pipe
protocol not supported
address family for hostname not supported
servname not supported for ai_socktype
ai_socktype not supported
cannot send after transport endpoint shutdown
operation not permitted
operation canceled
0.10.27
\\.\pipe\uv\%p-%d
ntdll.dll
kernel32.dll
%s: (%d) %s
(%d) %s
0.0.0.0
CHECK_EQ(%s, %s) failed
CHECK(%s) failed
Adjust amount of external memory: delta=m KB, amount=m KB, isolate=0xx.
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\v8\src\api.h
..\..\src\api.cc
v8::FunctionTemplate::SetIndexedInstancePropertyHandler()
v8::ObjectTemplate::SetIndexedPropertyHandler()
v8::StackFrame::GetScriptNameOrSourceURL()
scriptNameOrSourceURL
v8::Object::HasRealIndexedProperty()
v8::Object::HasIndexedLookupInterceptor()
v8::Object::SetIndexedPropertiesToPixelData()
JSArray is not supported
v8::HasIndexedPropertiesInPixelData()
v8::GetIndexedPropertiesPixelData()
v8::GetIndexedPropertiesPixelDataLength()
v8::SetIndexedPropertiesToExternalArrayData()
v8::Object::SetIndexedPropertiesToExternalArrayData()
v8::HasIndexedPropertiesInExternalArrayData()
v8::GetIndexedPropertiesExternalArrayData()
v8::GetIndexedPropertiesExternalArrayDataType()
v8::GetIndexedPropertiesExternalArrayDataLength()
V8::TerminateExecution()
Unsupported output encoding
!it.done() && (it.frame()->fp() == thread_local_.last_fp_)
..\..\src\debug.cc
Replacing code x - x (%d) with x - x (%d) for debugging, changing pc from x to x
MakeExecutionState
v8:MsgDispHelpr
Malloced operator new
!(JSObject::SetLocalPropertyIgnoreAttributes( target, symbol, function, attributes)).is_null()
..\..\src\bootstrapper.cc
!(JSObject::SetLocalPropertyIgnoreAttributes( prototype, factory()->constructor_symbol(), isolate()->object_function(), NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( inner_global, object_name, isolate->object_function(), DONT_ENUM)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( global, name, json_object, DONT_ENUM)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( result, factory->length_symbol(), factory->undefined_value(), DONT_ENUM)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( result, factory->callee_symbol(), factory->undefined_value(), DONT_ENUM)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( builtins, global_symbol, global_obj, attributes)).is_null()
native proxy.js
native collection.js
Array.prototype
Function.prototype
String.prototype
!(JSObject::SetLocalPropertyIgnoreAttributes( global, natives, Handle<JSObject>(global->builtins()), DONT_ENUM)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( global, debug_string, global_proxy, DONT_ENUM)).is_null()
Error installing extension '%s'.
!(JSObject::SetLocalPropertyIgnoreAttributes( to, key, value, details.attributes())).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( to, key, fun, details.attributes())).is_null()
Stacktrace (%x-%x) %p %p: %s
nameOrSourceURL
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, column_key, Handle<Smi>(Smi::FromInt(column_offset   1)), NONE)).is_null()
..\..\src\isolate.cc
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, line_key, Handle<Smi>(Smi::FromInt(line_number   1)), NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, script_key, script_name, NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, script_name_or_source_url_key, result, NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, function_key, fun_name, NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, eval_key, is_eval, NONE)).is_null()
!(JSObject::SetLocalPropertyIgnoreAttributes( stack_frame, constructor_key, is_constructor, NONE)).is_null()
Extension or internal compilation error: %s in %s at line %d.
Extension or internal compilation error in %s at line %d.
%s Standard Time
%s Daylight Time
Unable to initialize Winsock, err = %d
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\v8\src\objects.h
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\v8\src\objects-inl.h
<Very long string[%u]>
<String[%u]:
<String[%u]\:
\xx
<JS Array[%u]>
<%sa%s
<JS %sObject
<Map(elements=%u)>
<FixedArray[%u]>
<FixedDoubleArray[%u]>
<ByteArray[%u]>
<FreeSpace[%u]>
<ExternalPixelArray[%u]>
<ExternalByteArray[%u]>
<ExternalUnsignedByteArray[%u]>
<ExternalShortArray[%u]>
<ExternalUnsignedShortArray[%u]>
<ExternalIntArray[%u]>
<ExternalUnsignedIntArray[%u]>
<ExternalFloatArray[%u]>
<ExternalDoubleArray[%u]>
<Other heap object (%d)>
Unknown type: %d
interceptor-indexed-delete
[disabled optimization for %s, reason: %s]
..\..\src\objects.cc
interceptor-indexed-has
interceptor-indexed-has-get
interceptor-indexed-set
interceptor-indexed-get
result.IsEmpty() || v8::Utils::OpenHandle(*result)->IsJSObject()
..\..\src\handles.cc
interceptor-indexed-enum
V8.GCCompactor
V8.GCScavenger
V8.GCContext
V8.Parse
V8.ParseLazy
V8.PreParse
V8.Compile
V8.CompileEval
V8.CompileLazy
V8.MemoryExternalFragmentationTotal
V8.MemoryExternalFragmentationOldPointerSpace
V8.MemoryExternalFragmentationOldDataSpace
V8.MemoryExternalFragmentationCodeSpace
V8.MemoryExternalFragmentationMapSpace
V8.MemoryExternalFragmentationCellSpace
V8.MemoryExternalFragmentationLoSpace
V8.MemoryHeapFractionMapSpace
V8.MemoryHeapFractionCellSpace
V8.MemoryHeapSampleTotalCommitted
V8.MemoryHeapSampleTotalUsed
V8.MemoryHeapSampleMapSpaceCommitted
V8.MemoryHeapSampleCellSpaceCommitted
c:V8.GlobalHandles
c:V8.PcreMallocCount
c:V8.OsMemoryAllocated
c:V8.NormalizedMaps
c:V8.ObjectPropertiesToDictionary
c:V8.ObjectElementsToDictionary
c:V8.AliveAfterLastGC
c:V8.ObjsSinceLastYoung
c:V8.ObjsSinceLastFull
c:V8.SymbolTableCapacity
c:V8.NumberOfSymbols
c:V8.ScriptWrappers
c:V8.CallInitializeStubs
c:V8.CallPreMonomorphicStubs
c:V8.CallNormalStubs
c:V8.CallMegamorphicStubs
c:V8.ArgumentsAdaptors
c:V8.CompilationCacheHits
c:V8.CompilationCacheMisses
c:V8.RegExpCacheHits
c:V8.RegExpCacheMisses
c:V8.StringConstructorCalls
c:V8.StringConstructorConversions
c:V8.StringConstructorCachedNumber
c:V8.StringConstructorStringValue
c:V8.StringConstructorGCRequired
c:V8.TotalEvalSize
c:V8.TotalLoadSize
c:V8.TotalParseSize
c:V8.TotalPreparseSkipped
c:V8.TotalPreparseSymbolSkipped
c:V8.TotalCompileSize
c:V8.TotalOldCodegenSourceSize
c:V8.TotalFullCodegenSourceSize
c:V8.ContextsCreatedFromScratch
c:V8.ContextsCreatedBySnapshot
c:V8.PcToCode
c:V8.PcToCodeCached
c:V8.StoreBufferCompactions
c:V8.StoreBufferOverflows
c:V8.CodeStubs
c:V8.TotalStubsCodeSize
c:V8.TotalCompiledCodeSize
c:V8.GCCompactorCausedByRequest
c:V8.GCCompactorCausedByPromotedData
c:V8.GCCompactorCausedByOldspaceExhaustion
c:V8.GCCompactorCausedByWeakHandles
c:V8.GCLastResortFromJS
c:V8.GCLastResortFromHandles
c:V8.KeyedLoadGenericSmi
c:V8.KeyedLoadGenericSymbol
c:V8.KeyedLoadGenericLookupCache
c:V8.KeyedLoadGenericSlow
c:V8.KeyedLoadPolymorphicStubs
c:V8.KeyedLoadExternalArraySlow
c:V8.KeyedCallGenericSmiFast
c:V8.KeyedCallGenericSmiDict
c:V8.KeyedCallGenericLookupCache
c:V8.KeyedCallGenericLookupDict
c:V8.KeyedCallGenericValueType
c:V8.KeyedCallGenericSlow
c:V8.KeyedCallGenericSlowLoad
c:V8.KeyedLoadFunctionPrototype
c:V8.KeyedLoadStringLength
c:V8.KeyedLoadArrayLength
c:V8.KeyedLoadConstantFunction
c:V8.KeyedLoadField
c:V8.KeyedLoadCallback
c:V8.KeyedLoadInterceptor
c:V8.KeyedLoadInline
c:V8.KeyedLoadInlineMiss
c:V8.NamedLoadInline
c:V8.NamedLoadInlineMiss
c:V8.NamedLoadGlobalInline
c:V8.NamedLoadGlobalInlineMiss
c:V8.DontDeleteHintHit
c:V8.DontDeleteHintMiss
c:V8.NamedLoadGlobalStub
c:V8.NamedLoadGlobalStubMiss
c:V8.KeyedStoreField
c:V8.NamedStoreInlineField
c:V8.KeyedStoreInline
c:V8.NamedLoadInlineGeneric
c:V8.NamedLoadInlineFast
c:V8.KeyedLoadInlineGeneric
c:V8.KeyedLoadInlineFast
c:V8.KeyedStoreInlineGeneric
c:V8.KeyedStoreInlineFast
c:V8.NamedStoreInlineGeneric
c:V8.NamedStoreInlineFast
c:V8.KeyedStoreInlineMiss
c:V8.NamedStoreGlobalInline
c:V8.NamedStoreGlobalInlineMiss
c:V8.KeyedStorePolymorphicStubs
c:V8.KeyedStoreExternalArraySlow
c:V8.StoreNormalMiss
c:V8.StoreNormalHit
c:V8.COWArraysCreatedStub
c:V8.COWArraysCreatedRuntime
c:V8.COWArraysConverted
c:V8.CallMiss
c:V8.KeyedCallMiss
c:V8.LoadMiss
c:V8.KeyedLoadMiss
c:V8.CallConst
c:V8.CallConstFastApi
c:V8.CallConstInterceptor
c:V8.CallConstInterceptorFastApi
c:V8.CallGlobalInline
c:V8.CallGlobalInlineMiss
c:V8.ConstructedObjects
c:V8.ConstructedObjectsRuntime
c:V8.ConstructedObjectsStub
c:V8.NegativeLookups
c:V8.NegativeLookupsMiss
c:V8.MegamorphicStubCacheProbes
c:V8.MegamorphicStubCacheMisses
c:V8.MegamorphicStubCacheUpdates
c:V8.ArrayFunctionRuntime
c:V8.ArrayFunctionNative
c:V8.ForIn
c:V8.EnumCacheHits
c:V8.EnumCacheMisses
c:V8.ZoneSegmentBytes
c:V8.ComputeEntryFrame
c:V8.GenericBinaryStubCalls
c:V8.GenericBinaryStubCallsRegs
c:V8.FastNewClosureTotal
c:V8.FastNewClosureTryOptimized
c:V8.FastNewClosureInstallOptimized
c:V8.StringAddRuntime
c:V8.StringAddNative
c:V8.StringAddRuntimeExtToAscii
c:V8.SubStringRuntime
c:V8.SubStringNative
c:V8.StringAddMakeTwoChar
c:V8.StringCompareNative
c:V8.StringCompareRuntime
c:V8.RegExpEntryRuntime
c:V8.RegExpEntryNative
c:V8.NumberToStringNative
c:V8.NumberToStringRuntime
c:V8.MathAcos
c:V8.MathAsin
c:V8.MathAtan
c:V8.MathAtan2
c:V8.MathCeil
c:V8.MathCos
c:V8.MathExp
c:V8.MathFloor
c:V8.MathLog
c:V8.MathPow
c:V8.MathRound
c:V8.MathSin
c:V8.MathSqrt
c:V8.MathTan
c:V8.TranscendentalCacheHit
c:V8.TranscendentalCacheMiss
c:V8.StackInterrupts
c:V8.RuntimeProfilerTicks
c:V8.SmiChecksRemoved
c:V8.MapChecksRemoved
c:V8.QuoteJsonCharacterCount
c:V8.QuoteJsonCharacterReCount
c:V8.MemoryNewSpaceBytesAvailable
c:V8.MemoryNewSpaceBytesCommitted
c:V8.MemoryNewSpaceBytesUsed
c:V8.MemoryOldPointerSpaceBytesAvailable
c:V8.MemoryOldPointerSpaceBytesCommitted
c:V8.MemoryOldPointerSpaceBytesUsed
c:V8.MemoryOldDataSpaceBytesAvailable
c:V8.MemoryOldDataSpaceBytesCommitted
c:V8.MemoryOldDataSpaceBytesUsed
c:V8.MemoryCodeSpaceBytesAvailable
c:V8.MemoryCodeSpaceBytesCommitted
c:V8.MemoryCodeSpaceBytesUsed
c:V8.MemoryMapSpaceBytesAvailable
c:V8.MemoryMapSpaceBytesCommitted
c:V8.MemoryMapSpaceBytesUsed
c:V8.MemoryCellSpaceBytesAvailable
c:V8.MemoryCellSpaceBytesCommitted
c:V8.MemoryCellSpaceBytesUsed
c:V8.MemoryLoSpaceBytesAvailable
c:V8.MemoryLoSpaceBytesCommitted
c:V8.MemoryLoSpaceBytesUsed
c:V8.CountOf_SYMBOL_TYPE
c:V8.SizeOf_SYMBOL_TYPE
c:V8.CountOf_ASCII_SYMBOL_TYPE
c:V8.SizeOf_ASCII_SYMBOL_TYPE
c:V8.CountOf_CONS_SYMBOL_TYPE
c:V8.SizeOf_CONS_SYMBOL_TYPE
c:V8.CountOf_CONS_ASCII_SYMBOL_TYPE
c:V8.SizeOf_CONS_ASCII_SYMBOL_TYPE
c:V8.CountOf_EXTERNAL_SYMBOL_TYPE
c:V8.SizeOf_EXTERNAL_SYMBOL_TYPE
c:V8.CountOf_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE
c:V8.SizeOf_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE
c:V8.CountOf_EXTERNAL_ASCII_SYMBOL_TYPE
c:V8.SizeOf_EXTERNAL_ASCII_SYMBOL_TYPE
c:V8.CountOf_SHORT_EXTERNAL_SYMBOL_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_SYMBOL_TYPE
c:V8.CountOf_SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE
c:V8.CountOf_SHORT_EXTERNAL_ASCII_SYMBOL_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_ASCII_SYMBOL_TYPE
c:V8.CountOf_STRING_TYPE
c:V8.SizeOf_STRING_TYPE
c:V8.CountOf_ASCII_STRING_TYPE
c:V8.SizeOf_ASCII_STRING_TYPE
c:V8.CountOf_CONS_STRING_TYPE
c:V8.SizeOf_CONS_STRING_TYPE
c:V8.CountOf_CONS_ASCII_STRING_TYPE
c:V8.SizeOf_CONS_ASCII_STRING_TYPE
c:V8.CountOf_SLICED_STRING_TYPE
c:V8.SizeOf_SLICED_STRING_TYPE
c:V8.CountOf_EXTERNAL_STRING_TYPE
c:V8.SizeOf_EXTERNAL_STRING_TYPE
c:V8.CountOf_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE
c:V8.SizeOf_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE
c:V8.CountOf_EXTERNAL_ASCII_STRING_TYPE
c:V8.SizeOf_EXTERNAL_ASCII_STRING_TYPE
c:V8.CountOf_SHORT_EXTERNAL_STRING_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_STRING_TYPE
c:V8.CountOf_SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE
c:V8.CountOf_SHORT_EXTERNAL_ASCII_STRING_TYPE
c:V8.SizeOf_SHORT_EXTERNAL_ASCII_STRING_TYPE
c:V8.CountOf_PRIVATE_EXTERNAL_ASCII_STRING_TYPE
c:V8.SizeOf_PRIVATE_EXTERNAL_ASCII_STRING_TYPE
c:V8.CountOf_MAP_TYPE
c:V8.SizeOf_MAP_TYPE
c:V8.CountOf_CODE_TYPE
c:V8.SizeOf_CODE_TYPE
c:V8.CountOf_ODDBALL_TYPE
c:V8.SizeOf_ODDBALL_TYPE
c:V8.CountOf_JS_GLOBAL_PROPERTY_CELL_TYPE
c:V8.SizeOf_JS_GLOBAL_PROPERTY_CELL_TYPE
c:V8.CountOf_HEAP_NUMBER_TYPE
c:V8.SizeOf_HEAP_NUMBER_TYPE
c:V8.CountOf_FOREIGN_TYPE
c:V8.SizeOf_FOREIGN_TYPE
c:V8.CountOf_BYTE_ARRAY_TYPE
c:V8.SizeOf_BYTE_ARRAY_TYPE
c:V8.CountOf_FREE_SPACE_TYPE
c:V8.SizeOf_FREE_SPACE_TYPE
c:V8.CountOf_EXTERNAL_BYTE_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_BYTE_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_SHORT_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_SHORT_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_INT_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_INT_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_UNSIGNED_INT_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_UNSIGNED_INT_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_FLOAT_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_FLOAT_ARRAY_TYPE
c:V8.CountOf_EXTERNAL_PIXEL_ARRAY_TYPE
c:V8.SizeOf_EXTERNAL_PIXEL_ARRAY_TYPE
c:V8.CountOf_FILLER_TYPE
c:V8.SizeOf_FILLER_TYPE
c:V8.CountOf_ACCESSOR_INFO_TYPE
c:V8.SizeOf_ACCESSOR_INFO_TYPE
c:V8.CountOf_ACCESSOR_PAIR_TYPE
c:V8.SizeOf_ACCESSOR_PAIR_TYPE
c:V8.CountOf_ACCESS_CHECK_INFO_TYPE
c:V8.SizeOf_ACCESS_CHECK_INFO_TYPE
c:V8.CountOf_INTERCEPTOR_INFO_TYPE
c:V8.SizeOf_INTERCEPTOR_INFO_TYPE
c:V8.CountOf_CALL_HANDLER_INFO_TYPE
c:V8.SizeOf_CALL_HANDLER_INFO_TYPE
c:V8.CountOf_FUNCTION_TEMPLATE_INFO_TYPE
c:V8.SizeOf_FUNCTION_TEMPLATE_INFO_TYPE
c:V8.CountOf_OBJECT_TEMPLATE_INFO_TYPE
c:V8.SizeOf_OBJECT_TEMPLATE_INFO_TYPE
c:V8.CountOf_SIGNATURE_INFO_TYPE
c:V8.SizeOf_SIGNATURE_INFO_TYPE
c:V8.CountOf_TYPE_SWITCH_INFO_TYPE
c:V8.SizeOf_TYPE_SWITCH_INFO_TYPE
c:V8.CountOf_SCRIPT_TYPE
c:V8.SizeOf_SCRIPT_TYPE
c:V8.CountOf_CODE_CACHE_TYPE
c:V8.SizeOf_CODE_CACHE_TYPE
c:V8.CountOf_POLYMORPHIC_CODE_CACHE_TYPE
c:V8.SizeOf_POLYMORPHIC_CODE_CACHE_TYPE
c:V8.CountOf_TYPE_FEEDBACK_INFO_TYPE
c:V8.SizeOf_TYPE_FEEDBACK_INFO_TYPE
c:V8.CountOf_ALIASED_ARGUMENTS_ENTRY_TYPE
c:V8.SizeOf_ALIASED_ARGUMENTS_ENTRY_TYPE
c:V8.CountOf_FIXED_ARRAY_TYPE
c:V8.SizeOf_FIXED_ARRAY_TYPE
c:V8.CountOf_FIXED_DOUBLE_ARRAY_TYPE
c:V8.SizeOf_FIXED_DOUBLE_ARRAY_TYPE
c:V8.CountOf_SHARED_FUNCTION_INFO_TYPE
c:V8.SizeOf_SHARED_FUNCTION_INFO_TYPE
c:V8.CountOf_JS_MESSAGE_OBJECT_TYPE
c:V8.SizeOf_JS_MESSAGE_OBJECT_TYPE
c:V8.CountOf_JS_VALUE_TYPE
c:V8.SizeOf_JS_VALUE_TYPE
c:V8.CountOf_JS_DATE_TYPE
c:V8.SizeOf_JS_DATE_TYPE
c:V8.CountOf_JS_OBJECT_TYPE
c:V8.SizeOf_JS_OBJECT_TYPE
c:V8.CountOf_JS_CONTEXT_EXTENSION_OBJECT_TYPE
c:V8.SizeOf_JS_CONTEXT_EXTENSION_OBJECT_TYPE
c:V8.CountOf_JS_MODULE_TYPE
c:V8.SizeOf_JS_MODULE_TYPE
c:V8.CountOf_JS_GLOBAL_OBJECT_TYPE
c:V8.SizeOf_JS_GLOBAL_OBJECT_TYPE
c:V8.CountOf_JS_BUILTINS_OBJECT_TYPE
c:V8.SizeOf_JS_BUILTINS_OBJECT_TYPE
c:V8.CountOf_JS_GLOBAL_PROXY_TYPE
c:V8.SizeOf_JS_GLOBAL_PROXY_TYPE
c:V8.CountOf_JS_ARRAY_TYPE
c:V8.SizeOf_JS_ARRAY_TYPE
c:V8.CountOf_JS_PROXY_TYPE
c:V8.SizeOf_JS_PROXY_TYPE
c:V8.CountOf_JS_WEAK_MAP_TYPE
c:V8.SizeOf_JS_WEAK_MAP_TYPE
c:V8.CountOf_JS_REGEXP_TYPE
c:V8.SizeOf_JS_REGEXP_TYPE
c:V8.CountOf_JS_FUNCTION_TYPE
c:V8.SizeOf_JS_FUNCTION_TYPE
c:V8.CountOf_JS_FUNCTION_PROXY_TYPE
c:V8.SizeOf_JS_FUNCTION_PROXY_TYPE
c:V8.CountOf_DEBUG_INFO_TYPE
c:V8.SizeOf_DEBUG_INFO_TYPE
c:V8.CountOf_BREAK_POINT_INFO_TYPE
c:V8.SizeOf_BREAK_POINT_INFO_TYPE
c:V8.CountOf_CODE_TYPE-FUNCTION
c:V8.SizeOf_CODE_TYPE-FUNCTION
c:V8.CountOf_CODE_TYPE-OPTIMIZED_FUNCTION
c:V8.SizeOf_CODE_TYPE-OPTIMIZED_FUNCTION
c:V8.CountOf_CODE_TYPE-STUB
c:V8.SizeOf_CODE_TYPE-STUB
c:V8.CountOf_CODE_TYPE-BUILTIN
c:V8.SizeOf_CODE_TYPE-BUILTIN
c:V8.CountOf_CODE_TYPE-LOAD_IC
c:V8.SizeOf_CODE_TYPE-LOAD_IC
c:V8.CountOf_CODE_TYPE-KEYED_LOAD_IC
c:V8.SizeOf_CODE_TYPE-KEYED_LOAD_IC
c:V8.CountOf_CODE_TYPE-CALL_IC
c:V8.SizeOf_CODE_TYPE-CALL_IC
c:V8.CountOf_CODE_TYPE-KEYED_CALL_IC
c:V8.SizeOf_CODE_TYPE-KEYED_CALL_IC
c:V8.CountOf_CODE_TYPE-STORE_IC
c:V8.SizeOf_CODE_TYPE-STORE_IC
c:V8.CountOf_CODE_TYPE-KEYED_STORE_IC
c:V8.SizeOf_CODE_TYPE-KEYED_STORE_IC
c:V8.CountOf_CODE_TYPE-UNARY_OP_IC
c:V8.SizeOf_CODE_TYPE-UNARY_OP_IC
c:V8.CountOf_CODE_TYPE-BINARY_OP_IC
c:V8.SizeOf_CODE_TYPE-BINARY_OP_IC
c:V8.CountOf_CODE_TYPE-COMPARE_IC
c:V8.SizeOf_CODE_TYPE-COMPARE_IC
c:V8.CountOf_CODE_TYPE-TO_BOOLEAN_IC
c:V8.SizeOf_CODE_TYPE-TO_BOOLEAN_IC
c:V8.CountOf_FIXED_ARRAY-FAST_ELEMENTS_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-FAST_ELEMENTS_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-DICTIONARY_ELEMENTS_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-DICTIONARY_ELEMENTS_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-FAST_PROPERTIES_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-FAST_PROPERTIES_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-DICTIONARY_PROPERTIES_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-DICTIONARY_PROPERTIES_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-MAP_CODE_CACHE_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-MAP_CODE_CACHE_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-SCOPE_INFO_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-SCOPE_INFO_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-SYMBOL_TABLE_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-SYMBOL_TABLE_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-DESCRIPTOR_ARRAY_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-DESCRIPTOR_ARRAY_SUB_TYPE
c:V8.CountOf_FIXED_ARRAY-TRANSITION_ARRAY_SUB_TYPE
c:V8.SizeOf_FIXED_ARRAY-TRANSITION_ARRAY_SUB_TYPE
c:V8.StateJS
c:V8.StateGC
c:V8.StateCOMPILER
c:V8.StatePARALLEL_COMPILER_PROLOGUE
c:V8.StateOTHER
c:V8.StateEXTERNAL
RegExpExecStub
KeyedLoadElementStub
KeyedStoreElementStub
InstanceofStub%s%s%s
CallFunctionStub_Args%d
%s / %s
bound_argument_%d
get-%s
set-%s
KeyedLoadElementMonomorphic_symbol
KeyedStoreElementMonomorphic_symbol
KeyedStoreAndGrowElementMonomorphic_symbol
illegal_execution_state_symbol
!strong_gc_subroot_names_.is_empty()
..\..\src\profile-generator.cc
%s / %d entries
The snapshot is too big. Maximum snapshot size is %u MB. Actual snapshot size is %u MB.
Log regular expression execution.
Log suspect operations.
Pass all remaining arguments to the script. Alias for "--".
Port to use for remote debugging
debugger_port
Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed)
Trace simulator execution
report fragmentation for old pointer and data pages
max size of executable memory (in Mbytes)
max_executable_size
allow uint32 values on optimize frames if they are used only insafe operations
opt_safe_uint32_operations
deoptimize every n times a deopt point is passed
v8.log
C:\Windows\Temp\serdes
..\..\src\flags.cc
Error: unrecognized flag %s
Error: missing value for flag %s of type %s
Error: illegal value for flag %s of type %s
--%s (%s)
type: %s default: %s
for recompilation, reason: %s
, ICs with typeinfo: %d/%d (%d%%)
, not enough type info: %d/%d (%d%%)]
3.14.5.9
illegal execution state
KeyedStoreAndGrowElementMonomorphic
KeyedStoreElementMonomorphic
KeyedLoadElementMonomorphic
.catch-var
.for.
.result
.code
Increasing marking speed to %d due to high promotion rate
Memory allocator, used: m KB, available: m KB
New space, used: m KB, available: m KB, committed: m KB
Old pointers, used: m KB, available: m KB, committed: m KB
Old data space, used: m KB, available: m KB, committed: m KB
Code space, used: m KB, available: m KB, committed: m KB
Map space, used: m KB, available: m KB, committed: m KB
Cell space, used: m KB, available: m KB, committed: m KB
Large object space, used: m KB, available: m KB, committed: m KB
All spaces, used: m KB, available: m KB, committed: m KB
Total time spent in GC : %d ms
Limited new space size due to high promotion rate: %d MB
Unlimited new space size due to low promotion rate: %d MB
Max semispace size cannot be less than %dkbytes
gc_count=%d
mark_sweep_count=%d
max_gc_pause=%d
total_gc_time=%d
min_in_mutator=%d
max_alive_after_gc=%d
%s %.1f (%.1f) -> %.1f (%.1f) MB,
%d ms
(  %d ms in %d steps since last GC)
(  %d ms in %d steps since start of marking, biggest step %f ms)
pause=%d
mutator=%d
external=%d
mark=%d
sweep=%d
sweepns=%d
evacuate=%d
new_new=%d
root_new=%d
old_new=%d
compaction_ptrs=%d
intracompaction_ptrs=%d
misc_compaction=%d
total_size_before=%d
total_size_after=%d
holes_size_before=%d
holes_size_after=%d
allocated=%d
promoted=%d
stepscount=%d
stepstook=%d
[parsing script: %s
[parsing function: %s - took %0.3f ms]
module_export_undefined
[deoptimize context: %x]
at bailout #%u, address 0x%x, frame size %d
at ast id #%u, address 0x%x, frame size %d
[couldn't find pc offset for node=%d]
[method: %s]
[deoptimizing%s: begin 0xx
[deoptimizing: end 0xx
=> node=%d, pc=0xx, state=%s, alignment=%s, took %0.3f ms]
Materializing %sarguments object for %p:
Materializing a new heap number %p [%e] in slot %pfor parameter slot #%d
Materializing a new heap number %p [%e] in slot %pfor expression slot #%d
0xx: [top   %d] <- 0xx ; %s
0xx: [top   %d] <- %d ; %s (%s)
0xx: [top   %d] <- %u ; uint %s (%s)
0xx: [top   %d] <- %e ; %s
0xx:
[top   %d] <- 0xx ; [sp   %d]
[top   %d] <- %d ; [sp   %d] (%s)
[top   %d] <- %u ; [sp   %d] (uint32 %s)
0xx: [top   %d] <- %e ; [sp   %d]
0xx: [top   %d] <-
%s <- 0xx ; [sp   %d]
%s <- %d (int32) ; [sp   %d]
%s <- %u (uint32) ; [sp   %d]
%s <- %g (double) ; [sp   %d]
[sp   %d] <- 0xx ; [sp   %d]
[sp   %d] <- %d (int32) ; [sp   %d]
[sp   %d] <- %u (uint32) ; [sp   %d]
[sp   %d] <- 0xx (upper bits of %g) ; [sp   %d]
[sp   %d] <- 0xx (lower bits of %g) ; [sp   %d]
!(JSObject::SetLocalPropertyIgnoreAttributes( prototype, constructor_symbol(), function, DONT_ENUM)).is_null()
..\..\src\factory.cc
..\..\src\spaces.cc
V8 Executable Allocation capacity exceeded
%s:%i: %s
KeyedExternalArrayStoreIC
KeyedStoreMegamorphicIC
KeyedStoreIC
KeyedExternalArrayLoadIC
KeyedLoadMegamorphicIC
KeyedLoadIC
KeyedCallPreMonomorphic
KeyedCallNormal
KeyedCallMiss
KeyedCallMegamorphic
KeyedCallInitialize
KeyedCallIC
KeyedCallDebugPrepareStepIn
KeyedCallDebugBreak
profiler,"begin",%d
%s,"%s"
%s,%d
api,check-security,"%s"
shared-library,"%ls",0xx,0xx
api,check-security,%u
api,%s,"%s","%s"
api,%s,"%s",%u
api,%s,"%s"
api,%s
new,%s,0x%x,%u
delete,%s,0x%x
%s,%s,
,1,"%s%s"
,%d,"
,%d,"%s",
,%d,"%s %s:%d",
,%d,"args_count: %d"
%d,%d,
debug-tag,%s
debug-queue-event,%s,.3f,%s
A keyed load IC from the snapshot
A keyed store IC from the snapshot
A keyed call IC from the snapshot
..\..\src\store-buffer.cc
hydrogen.cfg
Compiled: %d functions with %d byte source size in %fms.
Compiling method %s using hydrogen
/ %x]
..\..\src\incremental-marking.cc
[IncrementalMarking] Complete (hurry), spent %d ms.
Speed up marking after %d steps
Marking speed increased to %d
# Fatal error in %s, line %d
# Fatal error in %s
at %s:%d
at <unknown>:%d
[%d]:
[d] : %o
arguments adaptor frame: %d->%d
// not passed to callee
FILTER_KEY
KeyedLoadIC_Miss
KeyedLoadIC_MissForceGeneric
KeyedLoadIC_Slow
KeyedStoreIC_Miss
KeyedStoreIC_MissForceGeneric
KeyedStoreIC_Slow
KeyedLoadIC_Initialize
KeyedLoadIC_PreMonomorphic
KeyedLoadIC_Generic
KeyedLoadIC_String
KeyedLoadIC_IndexedInterceptor
KeyedLoadIC_NonStrictArguments
KeyedStoreIC_Initialize
KeyedStoreIC_Generic
KeyedStoreIC_Initialize_Strict
KeyedStoreIC_Generic_Strict
KeyedStoreIC_NonStrictArguments
KeyedLoadIC_DebugBreak
KeyedStoreIC_DebugBreak
Failed to open socket on port %d, waiting %d ms before retrying
Error %d
%s: %s
V8-Version: %s
Embedding-Host: %s
%s: 0
%s: %d
V8.ScriptCache
keyed_load_generic_smi
keyed_load_generic_symbol
keyed_load_generic_lookup_cache
keyed_load_generic_slow
keyed_load_polymorphic_stubs
keyed_load_external_array_slow
keyed_call_generic_smi_fast
keyed_call_generic_smi_dict
keyed_call_generic_lookup_cache
keyed_call_generic_lookup_dict
keyed_call_generic_value_type
keyed_call_generic_slow
keyed_call_generic_slow_load
keyed_load_function_prototype
keyed_load_string_length
keyed_load_array_length
keyed_load_constant_function
keyed_load_field
keyed_load_callback
keyed_load_interceptor
keyed_load_inline
keyed_load_inline_miss
keyed_store_field
keyed_store_inline
keyed_load_inline_generic
keyed_load_inline_fast
keyed_store_inline_generic
keyed_store_inline_fast
keyed_store_inline_miss
keyed_store_polymorphic_stubs
keyed_store_external_array_slow
keyed_call_miss
keyed_load_miss
count_of_CODE_TYPE_KEYED_LOAD_IC
size_of_CODE_TYPE_KEYED_LOAD_IC
count_of_CODE_TYPE_KEYED_CALL_IC
size_of_CODE_TYPE_KEYED_CALL_IC
count_of_CODE_TYPE_KEYED_STORE_IC
size_of_CODE_TYPE_KEYED_STORE_IC
\ux
%d: %o
%d: = 0xx
==== Key ============================================
#%d# %p:
** Installed %d function(s).
[%s]: %d pages, %d (%.1f%%) free
%p [%s]: %d bytes live (unswept)
%p [%s]: %d (%.2f%%) %d (%.2f%%) %d (%.2f%%) %d (%.2f%%) %s
Estimated over reserved memory: %.1f / %.1f MB (threshold %d)
%p [%s]: %d (%.2f%%) free %s
Collected %d evacuation candidates for space %s
migration slots buffer: %d
page %p slots buffer: %d
IC::KeyedLoadPropertyWithInterceptor
IC::KeyedStoreIC_Slow
IC::KeyedStoreIC_MissForceGeneric
IC::KeyedStoreIC_Miss
IC::KeyedCallIC_Miss
IC::KeyedLoadIC_MissForceGeneric
IC::KeyedLoadIC_Miss
Runtime::ExecuteInDebugContext
Runtime::CheckExecutionState
Runtime::DebugIndexedInterceptorElementValue
Runtime::LocalKeys
Runtime::GetArrayKeys
Runtime::RegExpExecMultiple
Runtime::RegExpExec
Runtime::SparseJoinWithSeparator
Runtime::StringBuilderJoin
Runtime::DebugCallbackSupportsStepping
Runtime::GetIndexedInterceptorElementNames
Runtime::KeyedGetProperty
Builtins::KeyedStoreIC_DebugBreak
Builtins::KeyedLoadIC_DebugBreak
Builtins::KeyedStoreIC_NonStrictArguments
Builtins::KeyedStoreIC_Generic_Strict
Builtins::KeyedStoreIC_Initialize_Strict
Builtins::KeyedStoreIC_Generic
Builtins::KeyedStoreIC_Initialize
Builtins::KeyedLoadIC_NonStrictArguments
Builtins::KeyedLoadIC_IndexedInterceptor
Builtins::KeyedLoadIC_String
Builtins::KeyedLoadIC_Generic
Builtins::KeyedLoadIC_PreMonomorphic
Builtins::KeyedLoadIC_Initialize
Builtins::KeyedStoreIC_Slow
Builtins::KeyedStoreIC_MissForceGeneric
Builtins::KeyedStoreIC_Miss
Builtins::KeyedLoadIC_Slow
Builtins::KeyedLoadIC_MissForceGeneric
Builtins::KeyedLoadIC_Miss
Counters::keyed_load_generic_smi
Counters::keyed_load_generic_symbol
Counters::keyed_load_generic_lookup_cache
Counters::keyed_load_generic_slow
Counters::keyed_load_polymorphic_stubs
Counters::keyed_load_external_array_slow
Counters::keyed_call_generic_smi_fast
Counters::keyed_call_generic_smi_dict
Counters::keyed_call_generic_lookup_cache
Counters::keyed_call_generic_lookup_dict
Counters::keyed_call_generic_value_type
Counters::keyed_call_generic_slow
Counters::keyed_call_generic_slow_load
Counters::keyed_load_function_prototype
Counters::keyed_load_string_length
Counters::keyed_load_array_length
Counters::keyed_load_constant_function
Counters::keyed_load_field
Counters::keyed_load_callback
Counters::keyed_load_interceptor
Counters::keyed_load_inline
Counters::keyed_load_inline_miss
Counters::keyed_store_field
Counters::keyed_store_inline
Counters::keyed_load_inline_generic
Counters::keyed_load_inline_fast
Counters::keyed_store_inline_generic
Counters::keyed_store_inline_fast
Counters::keyed_store_inline_miss
Counters::keyed_store_polymorphic_stubs
Counters::keyed_store_external_array_slow
Counters::keyed_call_miss
Counters::keyed_load_miss
StubCache::primary_->key
StubCache::secondary_->key
KeyedLookupCache::keys()
KeyedLookupCache::field_offsets()
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\v8\src\ast.h
begin_%s
end_%s
%s "%s"
%s Ð00
%s "B%d"
%s %d
Analyzing block B%d
Control flow range infer %d %s %d
Initial inferred range of %d (%s) set to [%d,%d]
Updated range of %d set to [%d,%d]
Original range was [%d,%d]
New information was [%d,%d]
0xX
Using optimistic loop invariant code motion: %s
Try loop invariant motion for block B%d %s
Loop invariant motion for B%d %s
Checking instruction %d (%s) %s. Loop %s
Hoisting loop invariant instruction %d
Updated first-time accumulated %s
Backtracking from block B%d to block b%d
Analyzing block B%d%s
Instruction %d %s
Replacing value %d (%s) with value %d (%s)
Side-effect #%d in %d (%s) is dominated by %d (%s)
Changing #%d representation %s -> %s based on inputs
Changing #%d representation %s -> %s based on uses
%d %s is used by %d %s as %s
Unsupported phi use of const variable
Unsupported phi use of arguments
[removing dead instruction %s]
SwitchStatemnt: mixed label types are not supported
Non-smi key in array literal
unsupported let compound assignment
unsupported const compound assignment
Trying to inline the polymorphic call to %s from %s
Inlined %s called from %s.
Did not inline %s called from %s (%s).
target contains unsupported syntax [early]
target contains unsupported syntax [late]
invalid lhs in count operation
unsupported count operation with const
lookup variable in count operation
Operation %s has type info %s, %schange representation assumption for %s (ID %d) from %s to %s
Unsupported non-primitive compare
unsupported lookup slot in declaration
inlined runtime function: FastAsciiArrayJoin
"B%d"
%d %d
%d %s
"double_stack:%d"
"stack:%d"
%d %d
[%d, %d[
%8u bytes / %4.1f %%
0s - %7.3f ms %7.3f bytes
0s - %7.3f ms (%.1f times slower than full code gen)
stub.FindCodeInCache(&code)
..\..\src\ic.cc
dst.is_byte_register()
..\..\src\ia32\assembler-ia32.cc
src.is_byte_register()
reg.is_byte_register()
_RegExpExec
_FastAsciiArrayJoin
CheckExecutionState
DebugIndexedInterceptorElementValue
LocalKeys
GetArrayKeys
RegExpExecMultiple
RegExpExec
SparseJoinWithSeparator
StringBuilderJoin
DebugCallbackSupportsStepping
GetIndexedInterceptorElementNames
KeyedGetProperty
..\..\src\runtime.cc
String.replace result too large.
Array join result too large.
: is code optimizable: %s, is debugger enabled: %s]
[replacing on-stack at AST id %d in
[on-stack replacement offset %d in optimized code]
M:%*s
!block_scope_object.is_null()
ÞbugReferencedBy
ÞbugConstructedBy
%CollectGarbage
abort: %s
UnaryOpStub_%s_%s_%s
BinaryOpStub_%s_%s_%s
Unexpected smi operands.
CompareStub_%s
Operand is not a smi
Operand is a smi and not a string
Operand is not a string
Operand is a smi
(=%s)
(=%dS)
[constant:%d]
[stack:%d]
[double_stack:%d]
[%s|R]
[arg:%d]
[id=%d|
[parameters=%d|
[arguments_stack_height=%d|
} @%d
import
export
IMPORT
EXPORT
[on-stack replacement: begin 0xx
=> node=%u, frame=%d->%d, ebp:esp=0xx:0xx]
[sp   %d] <- 0xx ; [sp   %d] (fixed part - %s)
[sp   %d] <- 0xx ; (alignment state)
[on-stack replacement translation %s: 0xx
=> pc=0x%0x]
translating arguments adaptor => height=%d
0xx: [top   %d] <- 0xx ; caller's pc
0xx: [top   %d] <- 0xx ; caller's fp
0xx: [top   %d] <- 0xx ; context (adaptor sentinel)
0xx: [top   %d] <- 0xx ; function
0xx: [top   %d] <- 0xx ; argc (%d)
translating construct stub => height=%d
0xx: [top   %d] <- 0xx ; context
0xx: [top   %d] <- 0xx ; function (construct sentinel)
0xx: [top   %d] <- 0xx ; code object
0xx: [top   %d] <- 0xx ; allocated receiver
translating %s stub => height=%u
0xx: [top   %u] <- 0xx ; caller's pc
0xx: [top   %u] <- 0xx ; caller's fp
0xx: [top   %u] <- 0xx ; context
0xx: [top   %u] <- 0xx ; function (%s sentinel)
0xx: [top   %u] <- 0xx ; code object
=> node=%d, height=%d
shared->IsSharedFunctionInfo()
..\..\src\liveedit.cc
liveedit.cc ReplaceCodeObject
Unreachable code: Cannot optimize without SSE2 support.
CallKeyed
LoadKeyedFastDoubleElement
LoadKeyedFastElement
LoadKeyedGeneric
LoadKeyedSpecializedArrayElement
StoreKeyedFastDoubleElement
StoreKeyedFastElement
StoreKeyedGeneric
StoreKeyedSpecializedArrayElement
UnaryMathOperation
type[%s]
range[%d,%d,m0=%d]
, B%d
(unknown operation)
%s to %s
uses%d_%di_Ý_%dt
%s%s]
adding to %d %s uses of %d %s: i%d d%d t%d
id=%d
pop %d
var[%d] =
%s, id=%d
@%d%s
%p [%s] -> %p [%s]
[%d] =
Shorten live range %d to [%d
Ensure live range %d in interval [%d %d[
Add to live range %d interval [%d %d[
Add to live range %d use position %d
Allocating fixed reg for op %d
Fixed reg is tagged at %d
Pointer for range %d (spilled at %d) at safe point %d
Pointer in register for range %d (start at %d) at safe point %d
Processing interval %d start=%d
Live range %d already has a spill operand
Add live range %d to active
Add live range %d to inactive
Add live range %d to unhandled at %d
Add live range %d to unhandled at start
Add live range %d to unhandled unsorted at end
Moving live range %d from active to handled
Moving live range %d from active to inactive
Moving live range %d from inactive to handled
Moving live range %d from inactive to active
Found reg hint %s (free until [%d) for live range %d (end %d[).
Assigning preferred reg %s to live range %d
Assigning free reg %s to live range %d
Assigning blocked reg %s to live range %d
Splitting live range %d at %d
Splitting live range %d in position between [%d, %d]
Spilling live range %d
unary-math-operation
load-keyed-fast-element
load-keyed-fast-double-element
load-keyed-specialized-array-element
load-keyed-generic
call-keyed
store-keyed-fast-element
store-keyed-fast-double-element
store-keyed-specialized-array-element
store-keyed-generic
Dead block replaced with B%d
B%d | B%d on
then B%d else B%d
) then B%d else B%d
, "%o") then B%d else B%d
== "%s" then B%d else B%d
#%d /
[%d] <-
#%d /
[ecx] #%d /
%s #%d /
;;; @%d: %s.
;;; Deferred code @%d: %s.
;;; B%d - LOOP entry
;;; B%d
No empty arrays here in EmitFastAsciiArrayJoin
native debug.js
native mirror.js
native liveedit.js
native runtime.js
native v8natives.js
native array.js
native string.js
native uri.js
native math.js
native messages.js
native apinatives.js
native date.js
native json.js
native regexp.js
?#%X.y
d:\WiseShield\CustomizedNodeJS\CustomizedSourceCode\node-v0.10.29\Release\node.pdb
WS2_32.dll
GetWindowsDirectoryA
GetNamedPipeHandleStateA
ConnectNamedPipe
PeekNamedPipe
CreateNamedPipeW
WaitNamedPipeW
CreateNamedPipeA
SetNamedPipeHandleState
GetCPInfo
GetProcessHeap
KERNEL32.dll
WINMM.dll
RegOpenKeyExA
RegCloseKey
RegEnumKeyExA
RegOpenKeyExW
ADVAPI32.dll
IPHLPAPI.DLL
PSAPI.DLL
node.exe
?GetIndexedPropertiesExternalArrayData@Object@v8@@QAEPAXXZ
?GetIndexedPropertiesExternalArrayDataLength@Object@v8@@QAEHXZ
?GetIndexedPropertiesExternalArrayDataType@Object@v8@@QAE?AW4ExternalArrayType@2@XZ
?GetIndexedPropertiesPixelData@Object@v8@@QAEPAEXZ
?GetIndexedPropertiesPixelDataLength@Object@v8@@QAEHXZ
?GetScriptNameOrSourceURL@StackFrame@v8@@QBE?AV?$Local@VString@v8@@@2@XZ
?HasIndexedLookupInterceptor@Object@v8@@QAE_NXZ
?HasIndexedPropertiesInExternalArrayData@Object@v8@@QAE_NXZ
?HasIndexedPropertiesInPixelData@Object@v8@@QAE_NXZ
?HasRealIndexedProperty@Object@v8@@QAE_NI@Z
?IsExecutionTerminating@V8@v8@@SA_NPAVIsolate@2@@Z
?SetIndexedInstancePropertyHandler@FunctionTemplate@v8@@AAEXP6A?AV?$Handle@VValue@v8@@@2@IABVAccessorInfo@2@@ZP6A?AV32@IV?$Local@VValue@v8@@@2@0@ZP6A?AV?$Handle@VInteger@v8@@@2@I0@ZP6A?AV?$Handle@VBoolean@v8@@@2@I0@ZP6A?AV?$Handle@VArray@v8@@@2@0@ZV32@@Z
?SetIndexedPropertiesToExternalArrayData@Object@v8@@QAEXPAXW4ExternalArrayType@2@H@Z
?SetIndexedPropertiesToPixelData@Object@v8@@QAEXPAEH@Z
?SetIndexedPropertyHandler@ObjectTemplate@v8@@QAEXP6A?AV?$Handle@VValue@v8@@@2@IABVAccessorInfo@2@@ZP6A?AV32@IV?$Local@VValue@v8@@@2@0@ZP6A?AV?$Handle@VInteger@v8@@@2@I0@ZP6A?AV?$Handle@VBoolean@v8@@@2@I0@ZP6A?AV?$Handle@VArray@v8@@@2@0@ZV32@@Z
?TerminateExecution@V8@v8@@SAXH@Z
?TerminateExecution@V8@v8@@SAXPAVIsolate@2@@Z
?max_executable_size@ResourceConstraints@v8@@QAEHXZ
?set_max_executable_size@ResourceConstraints@v8@@QAEXH@Z
?set_total_heap_size_executable@HeapStatistics@v8@@AAEXI@Z
?total_heap_size_executable@HeapStatistics@v8@@QAEIXZ
node_http_parser_module
node_pipe_wrap_module
node_tcp_wrap_module
node_udp_wrap_module
uv_exepath
uv_pipe_bind
uv_pipe_connect
uv_pipe_init
uv_pipe_pending_instances
uv_tcp_bind
uv_tcp_bind6
uv_tcp_connect
uv_tcp_connect6
uv_tcp_getpeername
uv_tcp_getsockname
uv_tcp_init
uv_tcp_keepalive
uv_tcp_nodelay
uv_tcp_open
uv_tcp_simultaneous_accepts
uv_thread_join
uv_udp_bind
uv_udp_bind6
uv_udp_getsockname
uv_udp_init
uv_udp_open
uv_udp_recv_start
uv_udp_recv_stop
uv_udp_send
uv_udp_send6
uv_udp_set_broadcast
uv_udp_set_membership
uv_udp_set_multicast_loop
uv_udp_set_multicast_ttl
uv_udp_set_ttl
zcÁ
*<9<9<9<<9/,
1<95.,,,,>
><><====
<><>====
<<>====2
<><====%
:$:*:0:6:<:
00X0m0~0
0%1*171<1
3O4K4h4
6%6u6
9-999X9}9
?!?%?)?-?
4#4'4 4/43474
7:8(9-979
7!7%7)7-71757
3%5X5r5
<!<%<)<-<
3#3'3 3/33373;3>4
3 3$3(3,3034383
> ?$?(?,?0?4?8?<?
6r7d7|7
3(404;4}4
>#>'> >/>3>
=->2>9>?>
9 :':4:::
7 7$7(7,7074787<7
3 3$3(3,3034383<3
> >$>(>,>0>
mscoree.dll
WUSER32.DLL
- Attempt to initialize the CRT more than once.
- CRT not initialized
- floating point support not loaded
nKERNEL32.DLL
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\src\node_object_wrap.h
handle_.IsNearDeath()
handle_.IsEmpty()
!handle_.IsEmpty()
!handle_.IsWeak()
value.IsNearDeath()
args.IsConstructCall()
!args.Holder().IsEmpty()
args.Holder()->InternalFieldCount() > 0
wrap->object_.IsEmpty() == false
!object_.IsEmpty()
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\src\req_wrap.h
req_.data == this
!args.IsConstructCall()
args.Length() >= 2
args.Length() >= 3
<src\handle_wrap.cc
!wrap->object_.IsEmpty()
object_.IsEmpty()
close_sym.IsEmpty() == false
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\src\node_buffer.h
src\node.cc
!domain.IsEmpty()
!enter.IsEmpty()
!exit.IsEmpty()
node-debug-handler-%u
!fast_buffer_constructor.IsEmpty()
!handle.IsEmpty()
csrc\node_http_parser.cc
src\node_stat_watcher.cc
args.Length() == 3
args.Length() == 7
(args.Length() == 4 || args.Length() == 5) && "init(windowBits, level, memLevel, strategy, [dictionary])"
!pipeConstructor.IsEmpty()
!obj.IsEmpty()
&wrap->handle_ == (uv_pipe_t*)handle
req_wrap->object_.IsEmpty() == false
src\string_bytes.cc
buf.base != NULL
static_cast<size_t>(nread) <= buf.len
args.Length() >= 1 && Buffer::HasInstance(args[0])
!req_wrap->object_.IsEmpty()
psrc\slab_allocator.cc
!slab_v.IsEmpty()
csrc\tcp_wrap.cc
tcpConstructor.IsEmpty() == false
&wrap->handle_ == (uv_tcp_t*)handle
esrc\tty_wrap.cc
wrap->process_.data == wrap
.src\v8_typed_array.cc
csrc\udp_wrap.cc
args.Length() == 1
args.Length() == 2
args.Length() == 5
constructor.IsEmpty() == false
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\uv\src\win\handle-inl.h
d:\wiseshield\customizednodejs\customizedsourcecode\node-v0.10.29\deps\uv\src\win\req-inl.h
((uv_shutdown_t*) req)->handle->type == UV_NAMED_PIPE
%s\%.*s
rfds.fd_count == 1
rfds.fd_array[0] == handle->socket
wfds.fd_count == 1
wfds.fd_array[0] == handle->socket
efds.fd_count == 1
efds.fd_array[0] == handle->socket
HARDWARE\DESCRIPTION\System\CentralProcessor\%d
len > 0 && len < ARRAY_SIZE(key_name)
handle->read_line_buffer.base != NULL
handle->read_line_buffer.len > 0
prefix_len   vt100_len < sizeof handle->last_key
!(options.flags & ~(UV_PROCESS_DETACHED | UV_PROCESS_SETGID | UV_PROCESS_SETUID | UV_PROCESS_WINDOWS_HIDE | UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS))
mode == (PIPE_READMODE_BYTE | PIPE_WAIT)
fdopt.data.stream->type == UV_NAMED_PIPE
!(fdopt.data.stream->flags & UV_HANDLE_CONNECTION)
!(fdopt.data.stream->flags & UV_HANDLE_PIPESERVER)
src\win\pipe.c
req->pipeHandle == INVALID_HANDLE_VALUE
req->pipeHandle != INVALID_HANDLE_VALUE
handle->accept_reqs[0].pipeHandle != INVALID_HANDLE_VALUE
handle->type == UV_NAMED_PIPE
req->write_buffer.base
!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE)
avail >= sizeof(ipc_frame.header)
bytes == sizeof(ipc_frame.header)
ipc_frame.header.flags <= (UV_IPC_TCP_SERVER | UV_IPC_RAW_DATA | UV_IPC_TCP_CONNECTION)
avail - sizeof(ipc_frame.header) >= sizeof(ipc_frame.socket_info)
bytes == sizeof(ipc_frame) - sizeof(ipc_frame.header)
!handle->pending_ipc_info.socket_info
buf.len > 0
pipe->eof_timer == NULL
pipe->flags & UV_HANDLE_CONNECTION
pipe->type == UV_NAMED_PIPE
pipe->flags & UV_HANDLE_READ_PENDING
pipe->flags && UV_HANDLE_CONNECTION
!(pipe->flags & UV_HANDLE_NON_OVERLAPPED_PIPE)
pipe->ipc_pid != -1
src\win\tcp.c
server->flags & UV_HANDLE_TCP_SINGLE_ACCEPT
handle->type == UV_TCP
(tcp)->activecnt >= 0
!((tcp)->flags & UV__HANDLE_CLOSING)
src\win\udp.c
handle->type == UV_UDP
dbghelp.dll
Assertion failed: %s, file %s, line %d
C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\node.exe
0.10.29

node.exe_3488_rwx_1E90A000_000F5000:

%F#5Z

conhost.exe_3484:

.text
`.data
.rsrc
@.reloc
GDI32.dll
USER32.dll
msvcrt.dll
ntdll.dll
API-MS-Win-Core-LocalRegistry-L1-1-0.dll
KERNEL32.dll
IMM32.dll
ole32.dll
OLEAUT32.dll
PutInputInBuffer: EventsWritten != 1 (0x%x), 1 expected
Invalid message 0x%x
InitExtendedEditKeys: Unsupported version number(%d)
Console init failed with status 0x%x
CreateWindowsWindow failed with status 0x%x, gle = 0x%x
InitWindowsStuff failed with status 0x%x (gle = 0x%x)
InitSideBySide failed create an activation context. Error: %d
GetModuleFileNameW requires more than ScratchBufferSize(%d) - 1.
GetModuleFileNameW failed %d.
Invalid EventType: 0x%x
Dup handle failed for %d of %d (Status = 0x%x)
Couldn't grow input buffer, Status == 0x%x
InitializeScrollBuffer failed, Status = 0x%x
CreateWindow failed with gle = 0x%x
Opening Font file failed with error 0x%x
\ega.cpi
NtReplyWaitReceivePort failed with Status 0x%x
ConsoleOpenWaitEvent failed with Status 0x%x
NtCreatePort failed with Status 0x%x
GetCharWidth32 failed with error 0x%x
GetTextMetricsW failed with error 0x%x
GetSystemEUDCRangeW: RegOpenKeyExW(%ws) failed, error = 0x%x
RtlStringCchCopy failed with Status 0x%x
Cannot allocate 0n%d bytes
|%SWj
O.fBf;
ReCreateDbcsScreenBuffer failed. Restoring to CP=%d
Invalid Parameter: 0x%x, 0x%x, 0x%x
ConsoleKeyInfo buffer is full
Invalid screen buffer size (0x%x, 0x%x)
SetROMFontCodePage: failed to memory allocation %d bytes
FONT.NT
Failed to set font image. wc=x, sz=(%x,%x)
Failed to set font image. wc=x sz=(%x, %x).
Failed to set font image. wc=x sz=(%x,%x)
FullscreenControlSetColors failed - Status = 0x%x
FullscreenControlSetPalette failed - Status = 0x%x
WriteCharsFromInput failed 0x%x
WriteCharsFromInput failed %x
RtlStringCchCopyW failed with Status 0x%x
CreateFontCache failed with Status 0x%x
FTPh
\>.Sj
GetKeyboardLayout
MapVirtualKeyW
VkKeyScanW
GetKeyboardState
UnhookWindowsHookEx
SetWindowsHookExW
GetKeyState
ActivateKeyboardLayout
GetKeyboardLayoutNameA
GetKeyboardLayoutNameW
_amsg_exit
_acmdln
ShipAssert
NtReplyWaitReceivePort
NtCreatePort
NtEnumerateValueKey
NtQueryValueKey
NtOpenKey
NtAcceptConnectPort
NtReplyPort
SetProcessShutdownParameters
GetCPInfo
conhost.pdb
%$%a%b%V%U%c%Q%W%]%\%[%
%<%^%_%Z%T%i%f%`%P%l%g%h%d%e%Y%X%R%S%k%j%
version="5.1.0.0"
name="Microsoft.Windows.ConsoleHost"
<requestedExecutionLevel
name="Microsoft.Windows.ConsoleHost.SystemDefault"
publicKeyToken="6595b64144ccf1df"
name="Microsoft.Windows.SystemCompatible"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
< =$>:>@>
2%2X2
%SystemRoot%
\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Console\FullScreen
WindowSize
ColorTableu
ExtendedEditkeyCustom
ExtendedEditKey
Software\Microsoft\Windows\CurrentVersion
\ !:=/.<>;|&
%d/%d
cmd.exe
desktop.ini
\console.dll
%d/%d
6.1.7601.17641 (win7sp1_gdr.110623-1503)
CONHOST.EXE
Windows
Operating System
6.1.7601.17641


Remove it with Ad-Aware

  1. Click (here) to download and install Ad-Aware Free Antivirus.
  2. Update the definition files.
  3. Run a full scan of your computer.


Manual removal*

  1. Terminate malicious process(es) (How to End a Process With the Task Manager):

    sdbinst.exe:1936
    nsd21BA.exe:1660
    nsy4680.exe:1640
    %original file name%.exe:1024
    nsi1D46.exe:3476
    nsn18D2.exe:308
    cltmng.exe:2860
    nsy4B61.exe:1564
    cltmngui.exe:2968
    guardboxapp.exe:1676
    nsn41AE.exe:3948
    CltMngSvc.exe:1904
    CltMngSvc.exe:2220
    spsetup.exe:3828

  2. Delete the original Trojan file.
  3. Delete or disinfect the following files created/modified by the Trojan:

    C:\Windows\AppPatch\Custom\{8a4d5a43-c64a-45ab-bdf4-804fe18ceafd}.sdb (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi230B.tmp\inetc.dll (62 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn477C.tmp\inetc.dll (62 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\apiCommons.js (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_FF_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\GbTrayIcon.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler64.dll (30344 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_off_small.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_FF.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\selected_frame_alt.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\APIHandler.node (33295 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\browser.tabs.js (543 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native.proxy.js (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top_fill.gif (802 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader.dll (11048 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.omnibox.js (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\Uninstaller.exe (9608 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\logo_small.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\view.js (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_CH_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\rsx\gb_triangle.gif (873 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\bll.js (1552 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\spsetup.exe (234095 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_CH.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top-left_corner.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_FF.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_off_small.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\gb_triangle.gif (873 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardbox.ico (9 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_CH.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\sensore_icon_on.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\api.js (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\view.html (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.tray.js (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-start_hover.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\general.js (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-body.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\app.js (666 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.js (454 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\network.js (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-body_hover.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandler.dll (22192 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.screen.js (562 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom_filler.gif (819 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\node.exe (99633 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_IE.ico (846 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_large.gif (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_IE_Small.ico (738 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\view.js (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_large.gif (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\icon_sprite.png (784 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.js (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.html (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom_logo.png (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_large_alt.gif (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_large_alt.gif (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\about_icon_on.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\top-right_corner.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\asapsdk.dll (114695 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\button-start.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_IE.ico (846 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\controls_sprite.png (392 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\framework.js (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_CH_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.css (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom-left_corner.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\icons_sprite.gif (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\GuardboxApp.exe (16903 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_FF_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\content_bg.gif (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_on_small.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\content_bg.rtl.gif (6 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\services.js (784 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\header.rtl.gif (11 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\btn_close.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\sensore_icon_off.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\Languages\Languages.json (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\view.js (7 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_CH.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_on_small.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_CH_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\selected_frame.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\right_fill.gif (811 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\dialog.api.js (8 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE2.tmp (507231 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_IE_Small.ico (738 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-inactive_CH.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_IE_Small.ico (738 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\safe_off_large.gif (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_FF_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\unsafe_off_large.gif (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\btn_close_hover.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\application.js (773 bytes)
    C:\ProgramData\GuardboxData\gid.json (35 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\header.gif (11 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\style.css (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.css (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\system.js (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\footer.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\style.css (5 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\bottom-right_corner.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_FF.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\browser_sensor_tab_icon.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\rsx\left_fill.gif (811 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\menu\view.html (519 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\header.rtl.gif (11 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\btn_close_hover.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\rsx\header.gif (11 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\ui.dialog.js (7 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsGBUtils.dll (20173 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\WebHandlerLoader64.dll (11048 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\lib.js (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\storage.js (13 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_FF.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\native\GbMgr64.exe (4992 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\plsDialog\view.html (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\api\security.url.js (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsdFFE3.tmp\nsJSON.dll (3402 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-suspicious_CH_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\uid.json (107 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_FF_R2L.ico (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_IE_Small.ico (738 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-danger_IE.ico (846 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\btn_close.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\footer.gif (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\optionsDialog\rsx\about_icon_off.gif (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\images\gb_icon-safe_IE.ico (846 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1EC7.tmp\inetc.dll (62 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd1A64.tmp\inetc.dll (62 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\rep\UserSettings.dat (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\GuardboxEngine\rep\UserRepository.dat (4585 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss4C1D.tmp\inetc.dll (62 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\GuardboxEngine\UI\rep\UIRepository.dat (1067 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\ip2LocationCacheFile.txt (180 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\translationCacheFile.txt (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\serviceMapCacheFile.txt (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\GeoURFTimeoutsCacheFile.txt (359 bytes)
    C:\Users\"%CurrentUserName%"\AppData\LocalLow\GuardboxData\settingCacheFile.txt (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\app\resources\uninstallDialog\localization.js (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\GB_1331749\Guardbox.exe (339219 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\4ZZNMJGQ\Guardbox[1].exe (575943 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd42EA.tmp\inetc.dll (62 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC32Loader.dll (184 bytes)
    C:\Windows\System32\drivers\SPPD.sys (19 bytes)
    %Program Files%\GuardboxEngine\UI\bin\cltmngui.exe (146 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\cltmng.exe (727 bytes)
    %Program Files%\GuardboxEngine\Main\rep\SystemRepository.dat (25 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsd21BA.exe (5114 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC32.dll (246690 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bgSettingsDS.png (9 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns2860.tmp (14 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\SPTool64.exe (48928 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\browsers32.sdb (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2B50.tmp (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox_checked.png (360 bytes)
    %Program Files%\GuardboxEngine\Main\bin\CltMngSvc.exe (96792 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-Rollover.png (2 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\8D93UTC3\CARRIER_ID[1] (891 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button.png (859 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protection\protection.html (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\info-icon.png (424 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\json2.min.js (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\style.css (7 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn41AE.exe (5114 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\hez-selected.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\jquery.1.7.1.min.js (3312 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\button-bg.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\x.png (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsiF8D.tmp (891 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\v.png (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\inetc.dll (816 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4B61.exe (5114 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\menu-rollover.png (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\System.dll (23 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bg-with-logo.png (1552 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\settings.html (8 bytes)
    %Program Files%\GuardboxEngine\Main\bin\SPTool.dll (81732 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC64.dll (153889 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.html (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bg-uninstall.png (11 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\gray-bg.png (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protection\protection.js (7 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\close-win-def.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox.png (378 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bgNotif.png (6 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\btnBlue.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\defaults.js (971 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-default.png (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button-def.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button-selected.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\SPDialogAPI.js (6 bytes)
    %Program Files%\GuardboxEngine\Main\bin\uninstall.exe (33633 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.js (7 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\hez.png (256 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\btnSilver.png (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\nsExec.dll (14 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\hez-def.png (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2A75.tmp (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protectionDS\defaults.js (1 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsy4680.exe (5114 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsnB18.tmp (699386 bytes)
    %Program Files%\GuardboxEngine\GuardboxEngine\bin\SPVC64Loader.dll (8184 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\ns27E2.tmp (14 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\radio-button2.png (886 bytes)
    %Program Files%\GuardboxEngine\EULA.txt (784 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bgSettings.png (7 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsi1D46.exe (5114 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\checkbox_def.png (274 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nsn18D2.exe (5114 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bgUninstall.png (784 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\main.js (10 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protection\protection.css (4 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\bg.png (784 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nss1124.tmp (891 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\menu-selected.png (3 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\nssB38.tmp\SPtool.dll (81878 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\btnClose.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\Apply-onclick.png (2 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\Settings-icon.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\icon-win.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\libs\dialogUtils.js (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protection\defaults.js (985 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\text-field.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\Images\close-win-over-click.png (1 bytes)
    %Program Files%\GuardboxEngine\UI\dialogs\protectionDS\protectionDS.css (4 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\JYNOWECL\CT3331172[1] (891 bytes)
    C:\Users\"%CurrentUserName%"\AppData\Local\Temp\2A06.tmp (1 bytes)

  4. Delete the following value(s) in the autorun key (How to Work with System Registry):

    [HKCU\Software\Microsoft\Windows\CurrentVersion\Run]
    "Guardbox" = "C:\Users\"%CurrentUserName%"\AppData\Local\Guardbox\1.1.1.14\guardboxapp.exe"

  5. Clean the Temporary Internet Files folder, which may contain infected files (How to clean Temporary Internet Files folder).
  6. Reboot the computer.

*Manual removal may cause unexpected system behaviour and should be performed at your own risk.

No votes yet

x

Our best antivirus yet!

Fresh new look. Faster scanning. Better protection.

Enjoy unique new features, lightning fast scans and a simple yet beautiful new look in our best antivirus yet!

For a quicker, lighter and more secure experience, download the all new adaware antivirus 12 now!

Download adaware antivirus 12
No thanks, continue to lavasoft.com
close x

Discover the new adaware antivirus 12

Our best antivirus yet

Download Now