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

No/Empty Response #118

Closed
gausss opened this issue Feb 7, 2024 · 1 comment
Closed

No/Empty Response #118

gausss opened this issue Feb 7, 2024 · 1 comment

Comments

@gausss
Copy link

gausss commented Feb 7, 2024

Hi,

I'm trying to get this to work using a remote TCP connection. Testing locally right now.

  const clamscan = await new NodeClam().init({
    debugMode: true,
    clamdscan: {host: '127.0.0.1', port: 3310, localFallback: false},
  });
  const version = await clamscan.getVersion();
  console.log(version);
  const result = await clamscan.scanStream(eicarReadble);
  console.log(result);

Connection and everything seems fine.

node-clam: using remote server: 127.0.0.1:3310
node-clam: Established connection to clamscan server!
node-clam: PONG!
node-clam: Established connection to clamscan server!
node-clam: Attempting to establish socket/TCP connection for "getVersion"
node-clam: Socket/Host connection closed.
node-clam: using remote server: 127.0.0.1:3310
ClamAV 1.2.1/27175/Sun Feb  4 09:36:45 2024

node-clam: Provided stream is readable.
node-clam: Attempting to establish socket/TCP connection for "scanStream"
node-clam: Socket/Host connection closed.
node-clam: using remote server: 127.0.0.1:3310
node-clam: Received final data from stream.
node-clam: The input stream has dried up.
node-clam: ClamAV is done scanning.
node-clam: Raw Response:   
node-clam: Error Response:  
node-clam: File may be INFECTED!
{
  isInfected: null,
  viruses: [],
  file: null,
  resultString: '',
  timeout: false
}

But I can see in the logs of clam that it recognizes the eicar test file

Wed Feb 7 16:11:02 2024 -> instream(192.168.65.1@49265): Win.Test.EICAR_HDB-1 FOUND

Somehow I geet the same empty/default response no matter which file I put in. Something must be wrong. I also tried different clamav versions.

@gausss
Copy link
Author

gausss commented Feb 9, 2024

My port mapping was wrong.

@gausss gausss closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant