Programming and Coding
Programming and coding tips, help and solutions...
1,876 topics in this forum
-
Delphi 7 and Createthread API
by ToMKoL- 7 replies
- 3.7k views
Hi all I'm trying to convert this small c snippet to delphi 7 code but without success for now. If any delphi coder could help I'll be gratefull. HANDLE hthread; hthread = CreateThread(0, 0, &animate, hWnd, 0, 0) DWORD WINAPI animate(HWND hWnd) { unsigned char wincaption[32]; unsigned int i; SendMessageA(hWnd, WM_GETTEXT, 32, (LPARAM)wincaption); do { for(i=0;i<20;i++) { if (((wincaption[i] >= 0x41) && (wincaption[i] <= 0x5A)) || ((wincaption[i] >= 0x61) && (wincaption[i] <= 0x7A))) wincaption[i] ^= 0x20; SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)wincaption); Sleep(500); } } while (1); } And my delp…
-
Window hook using Python callback + DLL
by demberto- 2 followers
- 6 replies
- 4.5k views
I was wondering whether, I could do this: 1. Create a DLL with a method to register a callback function written in Python. 2. The DLL calls SetWindowsHookEx internally, registers a proxy function in the DLL itself which calls the Python callback function. 3. Load the DLL in Python with ctypes and call the callback registration method it exports. I briefly tried this but SetWindowsHookEx fails for global hooks. I see no reason for it to fail. Also according to the documentation I pass NULL for the hMod arg of it which is used when the hook procedure is inside the DLL itself. Maybe I think SetWindowsHookEx will need another injector process which is not …
-
dotNET_Tracer Source code
by Kurapica- 0 replies
- 2.4k views
Includes DLL and GUI https://github.com/KurapicaBS/dotNET_Tracer
-
- 1 follower
- 5 replies
- 2.7k views
Hi everyone. I'm looking for a tiny library in C/C++ (or binding) that able to: - Evaluate simple x86/x64 assembly codes (execute codes from a string to get output). - Each asm instruction has callback or hook (at least memory access instruction, for several special purposes, E.g. using ReadProcessMemory to read memory from other process, etc). Maybe a little bit like a VM. MOV RAX,$INPUT ADD RAX,8 MOV RAX,[RAX] # eg. memory access instruction MOV $OUTPUT,RAX Hint me. Thanks.
-
Visual Basic v6.0sp6 (2022 setup)
by whoknows- 1 reply
- 2.6k views
hi all, this is a recompilation of 2009 setup I made... whats new @ rebuilt on INNO6 removed FPWPP.DLL (basically the main reason of recompilation is this, the 2009 setup, stuck on win10x64 machines due Frontpage DLL registration!!) optimize Extra Components by14mb to 686kb dn 16.3mb @ mir.cr/S4SZWQK6 or upload.ee/files/14138148/Microsoft.Visual_Basic_v6.0sp6.upd2022-whoknows.rar.html
-
Hello guys. How is going ? Can anyone help me with this ? I'm searching for a reason for this to happen. My application uses DirectInput, it uses GUID_MouseSys. Sometimes when the app crashes it go back to visual studio but the cursor is VERY laggy as all action with keyboard too. Alt + TAB delays at least 2 to 3 seconds... Anyone knows why this happen ? Or at least can help to try to investigate the problem ? Thanks! ---- Edit Strangely if start debugging session and keeps maintaining focus on VStudio everything stays normal. I think it's related to windows focus. But I can't really say it.. Any tips ?
-
- 5 replies
- 2.8k views
Can't use a .lib from vc6 that has no source. Keep getting this error of "unresolved external" _set_new_handler. Already installed all CRT from VSTUDIO. Universal CRT. And so on. Tried to include this libs in the project, seems that none of them can solve the issue. https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned int)))(unsigned int)" (?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z) MODULE LIB_LOCATION...(Exception.obj) I'm thinking in reverse it into code. It's not …
-
Unpackers tools - source code C# 1 2 3
by CodeExplorer- 2 followers
- 61 replies
- 98.1k views
Unpackers tools - source code C# Spoiler This include: AssemblyLoad Confuser_Methods_Decryptor ConfuserDelegateKiller ConfuserStringDecryptor ExceptionLogger MegaDumper Reactor_Decryptor Resource_Decryptor Simple_MSIL_Decryptor StaticDecompressor Universal_Fixer My source code: https://gitlab.com/CodeCracker https://github.com/CodeCrackerSND https://bitbucket.org/CodeCrackerSND/ I will NOT share (anymore) the rest of my tools!
-
- 1 follower
- 4 replies
- 3k views
Hi there guys, I recently ripped an aboutbox from one of HAZE's keygens but unfortunately when i was going to compile and even inserted the externdef's both for __CIsin and __ftol2_sse : externdef c __CIsin:dword externdef c __ftol2_sse:dword ... i do get this error on compiling: bones.obj : error LNK2001: unresolved external symbol ___CIsin bones.obj : error LNK2001: unresolved external symbol ___ftol2_sse C:\Users\User\Downloads\asm.masm32-graphical-effects\MASM32-graphical-effects\HaZE\bones.exe : fatal error LNK1120: 2 unresolved externals do you guys think it might require another msvcrt lib but newer version or libcmt lib ? this aboutbo…
-
- 5 replies
- 5.9k views
Hello i'm need source code Patching template delphi/visual studio
-
- 1 follower
- 0 replies
- 2.5k views
CIM_Chip Read-only >/https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/cim-chip Is there a way to spoof this value? In case the Unpack program can't do it.
-
Exception Handler - Log - Question
by LCF-AT- 22 replies
- 7.6k views
Hi guys, today I would like to ask how to implement a 100% working handler to log exception.So in the past I tried already to do this and its also working so far but I think its not working always so that the reason why I do ask to know how to do it correctly.So the main basic way I choosed is only using SetUnhandledExceptionFilter API with address to my Handler routine to read exception infos / log them / MessageBox them. invoke SetUnhandledExceptionFilter,offset HANDLER_SEH2 HANDLER_SEH2 proc log code etc invoke MessageBox,NULL, BUFFIS,chr$("Exception Info!"),MB_ICONINFORMATION mov eax, 1h ret As result I get this so far (mostly)... 30.08.2017 21:00…
-
How to make a control transparent?
by LCF-AT- 2 followers
- 23 replies
- 5.6k views
Hi guys, I have a new problem and need some help.I wanna create a edit / static control and make the edit field transparent (onlyy text should be visible).I found some MASM examples... https://www.masmforum.com/archive2012/ ...but somehow there are not so good etc.So what I want to know is how to make such controls transparent without to know the background.I don't know whether there is any image/bitmap or anything else in the background etc so how to find it out and execute the right code to make the control transparent if I wanna do that?Is there a method or a function already I could use? greetz
-
How to remove multispaces from text?
by LCF-AT- 1 follower
- 4 replies
- 4.6k views
Hi guys, does anyone know any function I could use to remove all unnecessary spaces from a text? Example: Here I have some text between spaces & tabs I want to trim to one spaces between! = Text above should change to this text below Here I have some text between spaces & tabs I want to trim to one spaces between! Something like this.Just asking before whether there is already any module XY function I could use before trying to write any own function for this.Thanks. greetz
-
Why not change field bool ?
by r3xq1- 1 follower
- 2 replies
- 4.6k views
foreach (FieldDef tdFlds in tdType.Fields) { if (tdFlds.ElementType == ElementType.End) { if (tdFlds.Name == "MyField") { byte[] fake = BitConverter.GetBytes(true); // set true Array.Resize(ref fake, (int)tdFlds.GetFieldSize()); tdFlds.InitialValue = fake; } } } How can the bool field be changed?
-
Listview issues
by LCF-AT- 2 followers
- 21 replies
- 9.6k views
Hi guys, I have again some small questions about listview re-arragne issues.So in the past I changed my LV that only a seclected lines does switch the content with the hitted line during a drag.Now i wanted to change that again so that all selected lines gets inserted to hitted line below but here I have some trouble. Example: Some LV entrys. ---------------------------- 123 456 789 101112 ---------------------------- I want the selected lines insert to hitted line exactly like the selection was.So I got it working if I move the selected lines below to a line but above its exactly else.How can I do it to make it match like I did secleted the lines?I am ju…
-
- 2 followers
- 10 replies
- 5.4k views
Hi guys, I see some problem when using the normal GetPrivateProfileString & WritePrivateProfileString function to store lines into a file and read them.All works for normal lines without CRLF but the GetPrivateProfileString function dosen't read the stored multiline/s which was saved with WritePrivateProfileString function. Why do they differ?Write works & Read not?In this case I can not use GetPrivateProfileString function to read some entry from file. I'am using a edit control with multilines & wantreturn style and wanna save / read whole text parts to file.How could I do that in best case?Just asking before whether they are any functions I could …
-
Creating a proxy DLL
by amateur- 3 followers
- 0 replies
- 6.9k views
Hi. I would like some help on some advanced subject for me. I'm doing my first steps to create a proxy dlls for practice. I use VS2008 and 2010. So assuming i have a simple crackme. Ηypothetically to get the registered message, offsets with patches are: 0x1234: 73->90 and 0x1235: 33->90. offsets[] = {0x1234, 0x1235}; srcbytes[] = {0x73, 0x33}; rplbytes[] = {0x90. 0x90}; Ok with this. Now i will explaing what i do quickly. I try to locate possible dlls and i'm finding, hypothetically again, "version.dll". (Using Procomon -> filters: Procces name..is -> crackme.exe, Path...ends -> dll, Result...contains -> NAME NOT FOUND). A…
-
Struct vs Union (C)
by amateur- 2 followers
- 2 replies
- 5k views
Good morning. What is the difference in practical level of Union compared to Struct? In what cases (examples) Union is/should be, used? -Thank you
-
- 0 replies
- 3.6k views
var module = ModuleDefMD.Load(@"C:\Temp\DemoDLL.dll"); var type = module.GetTypes().FirstOrDefault(t => t.Name == "Demo"); // Create the Main signature var main = new MethodDefUser("Main", MethodSig.CreateStatic(module.CorLibTypes.Void, new SZArraySig(module.CorLibTypes.String))) { Attributes = MethodAttributes.Static, ImplAttributes = MethodImplAttributes.IL | MethodImplAttributes.Managed }; // Add Main param main.ParamDefs.Add(new ParamDefUser("args", 1)); // Create Main body var mainBody = new CilBody(); main.Body…
-
Convert String to Int using sscanf (C)
by amateur- 2 followers
- 2 replies
- 8.9k views
Hello. During coding a keygen i have this issue. The keygenme calculates a SHA-256 which is stored in a string. After that it adds DWORD values of the SHA. Because my english is not so good to explain i put a simpler (similar) example to see whats going on. I have make some progress but i have stuck one this: Why sscanf doesnt put in eax the correct value starting from sha_256[0]. (Eax should contain the value 0x64ec88ca) How i can fix this? -Thank you
-
Createthread in x64
by ToMKoL- 1 follower
- 2 replies
- 4.3k views
Hi all I'm trying to compile simple c program with animated title bar (swapping letter case) but unfortunately I'm stuck with CreateThread in x64. Here is my sample code: DWORD WINAPI animate(HWND hWnd); HANDLE hthread; case WM_INITDIALOG: SendMessageA(hWnd, WM_SETICON, (WPARAM) 1, (LPARAM) LoadIconA(hInst, MAKEINTRESOURCE(IDI_ICON))); hthread = CreateThread(0, 0, animate, hWnd, 0, 0); DWORD WINAPI animate(HWND hWnd) { unsigned char wincaption[24]; unsigned int i; SendMessageA(hWnd, WM_GETTEXT, 24, (LPARAM)wincaption); do { for(i=0;i<19;i++) { if (((wincaption[i] >= 0x41) && (wincaption[i] <= 0x5A)) || ((wincaption[i] >= 0x61)…
-
capstone vcpkg package broken?
by deepzero- 1 follower
- 1 reply
- 4.9k views
I am porting some tools over to vcpkg package manager. Maybe it's just too late, but it seems to me the capstone package on vcpkg is broken. Installed with vcpkg install capstone:x64_windows. The following: cs_open(CS_ARCH_X86, CS_MODE_64, &handle); returns CS_ERR_ARCH, because the x86-init function in static cs_err (*cs_arch_init[MAX_ARCH])(cs_struct *) = { in cs.c is Null. Which would suggest that CAPSTONE_HAS_X86 was not defined during compilation of the package. Can someone confirm this?
-
- 1 follower
- 2 replies
- 5k views
I want to find a string from a process memory and change it through C#. My current code to modify the string via its address: [DllImport("kernel32.dll")] public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId); [DllImport("kernel32.dll", SetLastError = true)] static extern bool WriteProcessMemory(int hProcess, int lpBaseAddress, byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesWritten); private void button1_Click(object sender, EventArgs e) { var process = Process.GetProcessesByName("ProcessName").FirstOrDefault(); IntPtr processHandle = OpenProcess(0x1F0FFF, false, process.Id); int bytesWritten = 0; byte[] buffer = En…
-
- 2 followers
- 1 reply
- 5.8k views
Hello, I'm working on a x64 Framework 4.7.2 application obfuscated with Crypto "x64 Crypto Obfuscator For .Net v7 (v2020)", I'm able to restore strings and mostly deobfuscate the app but I'm having difficulties with restore delegates. Here's an example public GForm4() { this.method_6(); Delegate108.smethod_0(Class0.smethod_0(6600) != 0); Delegate60.smethod_0(this, new EventHandler(this.method_0)); } Unfortunately most of @CodeExplorer / SnD's excellent tools give an "invalid assembly" error as it's x64? I'll be grateful for any tips or tools to restore delegates please. thanks in advance