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

Fatal error on: href="skype:SDHDHOSTS?add" #52

Open
SjamonDaal opened this issue Jul 20, 2020 · 5 comments
Open

Fatal error on: href="skype:SDHDHOSTS?add" #52

SjamonDaal opened this issue Jul 20, 2020 · 5 comments

Comments

@SjamonDaal
Copy link
Contributor

SjamonDaal commented Jul 20, 2020

Checking skype:SDHDHOSTS?add...
Requesting skype:SDHDHOSTS?add...
(node:12811) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'statusCode' of undefined
    at Anchor.isUrlAvailable (/usr/local/lib/node_modules/pentest-tool-lite/src/html/Anchor.js:45:29)
    at Anchor.<anonymous> (/usr/local/lib/node_modules/pentest-tool-lite/src/html/Anchor.js:37:38)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/pentest-tool-lite/src/html/Anchor.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:12811) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12811) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@juffalow
Copy link
Owner

Thank you! Maybe it would be fine to test if the URL is valid before actually requesting it.

@juffalow juffalow added the bug label Jul 20, 2020
@Kubik2000
Copy link
Collaborator

oh this is sad yeah when you open
npm start https://juffalow.co
it will fail I thing I have general fix running locally we can check if it is good enough

@Kubik2000
Copy link
Collaborator

yeah after the update to v3 I have to redo it from scratch

@Kubik2000
Copy link
Collaborator

this was my idea of the fix
but some strage stuff happens when I run it the method is executed twice

`public async run(params: TestParameters): Promise<Result | Array> {
let result = null;
const response = await request.get(params.url);
console.error("aaaaaaaaaa");

if(response.statusCode == undefined)
{
  return {
    status: 'ERROR',
    title: 'URL',
    description: 'The url was not found.',
  };
} else {
  try {
    result = await this.test(params);
  } catch (err) {
    console.error(err);
  }

  return result;
}

}}`

@juffalow
Copy link
Owner

In the version 3 of pentest-tool-lite if a single test will fail it just shows an error status of the test. So the script should not end with error anymore.

But this is not a fix of course. It should check if the provided url is valid url and after that make a request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants