Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Install Setup Error "ENOENT: no such file or directory, open '/home/user/.dexcalibur/config.json'" #45

Closed
BreakfastSerial opened this issue Feb 24, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@BreakfastSerial
Copy link

Describe the bug
Dexcalibr crashes trying to download the adb/apktool and create the config file.

To reproduce / to understand
On Kali:

  • sudo apt install nodejs npm python3-pip
  • sudo pip3 install frida-tools
  • sudo npm install -g dexcalibur
  • dexcalibur
  • Open Firefox http://127.0.0.1:9000
  • Click Next
  • Web application does not proceed, terminal output shows error below.

Screenshots
Dexcalibur in the browser

Screenshot_20210224_141145

Dexcalibur in the terminal:

# once I press next after defining the file encoding, workspace path, default port and auto install.
[...]
[Object: null prototype] { _t: '1614172420620' }
internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/home/kali/.dexcalibur/config.json'
    at Object.openSync (fs.js:462:3)
    at Object.writeFileSync (fs.js:1384:35)
    at DexcaliburEngine.postInstall (/usr/local/lib/node_modules/dexcalibur/src/DexcaliburEngine.js:573:14)
    at Object.onSuccess (/usr/local/lib/node_modules/dexcalibur/src/DexcaliburEngine.js:519:26)
    at Installer.runTask (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:150:28)
    at Installer.nextTask (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:162:22)
    at Object.onSuccess (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:139:26)
    at /usr/local/lib/node_modules/dexcalibur/src/Installer.js:77:36
    at internal/streams/pipeline.js:90:7
    at internal/util.js:392:14 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/kali/.dexcalibur/config.json'
}

Desktop (please complete the following information):

  • OS: Kali GNU/Linux Rolling
  • Node JS version: v12.20.1
  • Dexcalibur version (see 'package.json' or output) : 0.7.8
@BreakfastSerial BreakfastSerial added the bug Something isn't working label Feb 24, 2021
@FrenchYeti
Copy link
Owner

Some users experiments issues with Kali. This step works well on other OS.

Normally, the function writeFileSynccreates file if it not exists, so can you check permissions and owner of /home/kali/.dexcalibur folder ?

Did you try a chmod 666 /home/kali/.dexcalibur ?

@BreakfastSerial
Copy link
Author

Thank you very much for your time and effort!

After I manually created ~/.dexcalibur (mkdir ~/.dexcalibur), I'm now facing the following error:

Screenshot_20210224_145214

[Object: null prototype] { _t: '1614174667806' }
Execute command request : java -jar /usr/local/lib/node_modules/dexcalibur/bin/baksmali.jar d /home/kali/dexcaliburWS/.dxc/tmp/sdk_androidapi_29_google.dex -o /home/kali/dexcaliburWS/.dxc/api/sdk_androidapi_29_google      
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

The above mentioned files:

┌──(kali㉿kali)-[~]
└─$ ls -lah .dexcalibur
total 12K
drwxr-xr-x  2 kali kali 4.0K Feb 24 08:51 .
drwxr-xr-x 21 kali kali 4.0K Feb 24 08:50 ..
-rw-r--r--  1 kali kali  200 Feb 24 08:51 config.json
                                                                                                                                                           
┌──(kali㉿kali)-[~]
└─$ cat .dexcalibur/config.json 
{"workspace":"/home/kali/dexcaliburWS","registry":"https://github.com/FrenchYeti/dexcalibur-registry/raw/master/","registryAPI":"https://api.github.com/repos/FrenchYeti/dexcalibur-registry/contents/"}                                                                                                                   ```

@FrenchYeti
Copy link
Owner

FrenchYeti commented Feb 24, 2021

Red text into console is not an error message if it not starts by [ERROR] as mentionned by @cryptax, i should change this color.

In your case, the message warns you an external process spawned (java).

Did you restarted dexcalibur ?

@BreakfastSerial
Copy link
Author

BreakfastSerial commented Feb 24, 2021

I restarted dexcalibur after the changes.

I just tried to chmod -R 777 ~/.dexcalibur, after dexcalibur now starts successfully.

Oddly enought chmod 666 corrupted the file/permissions.

Thank you!

@FrenchYeti
Copy link
Owner

Thank you for your documented issue on Kali OS, it allows me to write some lines into installation guide for Kali's users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants