Coder Social home page Coder Social logo

C Sample about deviare2 HOT 13 OPEN

nektra avatar nektra commented on August 22, 2024
C Sample

from deviare2.

Comments (13)

mxmauro avatar mxmauro commented on August 22, 2024

Hi. Pure C sample no but there are C++ ones.

from deviare2.

sefai avatar sefai commented on August 22, 2024

Thank you @mxmauro

I am looking at the CTest sample. Command line parameters state that there is an option to add a Custom handler for each hook:

-ch=file: Custom handler to add to each hook (can be specified more than once).�

Is there a sample for this custom handler?

Regards,

from deviare2.

mxmauro avatar mxmauro commented on August 22, 2024

Hi @sefai, yes you have RegistryPlugin sample. On C# you have Registry and FilePlugin. You can use them on CTest too.

from deviare2.

sefai avatar sefai commented on August 22, 2024

@mxmauro I am sorry, but I couldn't understand what that plugin is doing.

I want to change the returned value (an _out parameter) from a kernel32 method call. How can I do this? Is there any guide or documentation that I can read so that I will stop distracting you?

Regards,

from deviare2.

sefai avatar sefai commented on August 22, 2024

@mxmauro OK, I am making progress, I successfully changed the parameter. Now, I am trying to store some value on PreCall and use that value on PostCall. I see that there is WriteIntercallData and ReadIntercallData for that purpose, but I couldn't find any samples on how to use them. Can you help?

PS: By the way, the from at address http://forum.nektra.com/forum/ seems to be down. I can only search on it using Google Cache. Are you guys aware of it?

Regards,

from deviare2.

bo3b avatar bo3b commented on August 22, 2024

Still Dead! Google cache is now empty! WayBackMachine has no info! Terrific resource lost!

image

from deviare2.

Helios-vmg avatar Helios-vmg commented on August 22, 2024

@bo3b I will look into it.

from deviare2.

bo3b avatar bo3b commented on August 22, 2024

Awesome, thank you for responding. I was worried that you had abandoned Deviare.

from deviare2.

vlucky avatar vlucky commented on August 22, 2024

nektra forum is still has the issue [SQL ERROR as above mentioned]. could anybody fix the issue, please?

Could you please provide C++ sample for custom dll (INktSpyMgr::LoadCustomDll) with functions exported and how to call & pass the string parameter in C++ client?

Currently I did the following:

custom DLL: exported function
__declspec(dllexport) HRESULT WINAPI fnCustom1(SIZE_T nParam1){
MessageBox(...);
}

in the client loaded the dll, (I can see load and unload events from LogPrint()), calling like,
CComVariant vtParam;
vtParam = L"This is text from client";
and calling lpSpyMgr->CallCustomApi() with (&vtParam) as one of parameter.

But this one not working. If I export function without parameters, I can call the function and see the message box from target process.

Thanks.

from deviare2.

vlucky avatar vlucky commented on August 22, 2024

Could anybody please reply?

from deviare2.

mxmauro avatar mxmauro commented on August 22, 2024

Hi @vlucky,

You must provide a VT_I#/VT_UI#/VT_INT/VT_UINT or an array of VT_I#/VT_UI# (up to four items). You can create an array with SafeArrayCreateVector... i.e.:

VARIANT vt;

vt.vt = VT_ARRAY | VT_UINT;
vt.parray = SafeArrayCreateVector(VT_UINT, 0, 4)

And use SafeArray apis to store the values in the array before calling CallCustomApi

from deviare2.

vlucky avatar vlucky commented on August 22, 2024

Thanks @mxmauro ,

might be dumb question, but can I pass string too using above method?

from deviare2.

mxmauro avatar mxmauro commented on August 22, 2024

No. Only integer values that the called function will receive. If you need to pass complex data, use VirtualAllocEx and WriteProcessMemory to write the data in the target process and pass the pointer as the parameter.

from deviare2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.