Programming and Coding
Programming and coding tips, help and solutions...
1,877 topics in this forum
-
injection : how to add messagebox to exe
by Pushad- 3 replies
- 3.8k views
i want inject messagebox in exe from start with ollydbg
-
Inline OEP finder
by listito- 1 reply
- 14.9k views
I'd like to code an OEP finder for aspack for example, so to do it i'm going to have to make a simple debugger and do all things we ussualy do with olly to find it's oep?
-
Queryassemblyinfo - problem solved
by CodeExplorer- 3 replies
- 3.9k views
QueryAssemblyInfo ****s my brain if I remove the two comment (lines) gacfilepath will have the right path; if I don't gacfilepath will be null; Assembly executingasm = Assembly.GetExecutingAssembly(); string currentassemblyname = executingasm.Location; string asmname = executingasm.GetName().ToString(); //int untilat = asmname.IndexOf(", PublicKeyToken="); //asmname = asmname.Remove(untilat, asmname.Length-untilat); string gacfilepath = Fusionhelper.QueryAssemblyInfo(asmname); Any idea guys?
-
JaCIL: A .NET to Java Compiler
by CodeExplorer- 2 replies
- 5.3k views
JaCIL: A .NET to Java Compiler JaCIL (pronounced "jackal") is a project to create a byte-code compiler to translate .NET assemblies to Java class files. Link: />http://sourceforge.net/projects/jacil/
-
Windows Hook Library
by CodeExplorer- 0 replies
- 4.8k views
Windows Hook Library The WindowsHookLib is a single library to hook the mouse, keyboard and the clipboard system wide. WindowsHookLib library is written in C# and there for it uses Common Language Runtime (CLR). This means that the library can be referenced from various projects in Dot Net. The mouse and keyboard hooks are low level so you can use the Handled property of the MouseEventArgs or the KeyboardEventArgs to prevent the windows messages be passed to the other applications. Note you need to use the dll file not the classes in your projects; otherwise they might not work correctly. Link: />http://www.code2point.com/Project.aspx?proj=4
-
- 0 replies
- 3.5k views
Found a nice snippet it's from the book OReilly.C.Sharp.4.0.in.a.Nutshell Packing a single-file executable: using System; using System.IO; using System.Reflection; using System.Collections.Generic;public class Loader { static Dictionary <string, Assembly> libs = new Dictionary <string, Assembly>(); static void Main() { AppDomain.CurrentDomain.AssemblyResolve += FindAssem; Program.Go(); } static Assembly FindAssem (object sender, ResolveEventArgs args) { string shortName = new AssemblyName (args.Name).Name; if (libs.ContainsKey (shortName)) return libs [shortName]; using (Stream s = Assembly.GetExecutingAssembly(). Ge…
-
data transfer between user and kernel mode
by abhijit mohanta- 2 replies
- 5.5k views
I am new to device driver programming.I was going through the following link http://www.codeproject.com/KB/system/hide-driver.aspx NtQueryDirectoryfile in the diagram in the section named "NT Function Call Scheme and Hook" returns an process list. Can anybody tell me how does the list transferred to user mode. Please give me a little detailed description like how irp wud be filled with data etc.
-
c++ & gdi+: stretch a screenshot
by deepzero- 1 reply
- 7.3k views
hi, for quiet some time i am occupied by this little assignment: my code: int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) { using namespace Gdiplus; UINT num = 0; // number of image encoders UINT size = 0; // size of the image encoder array in bytes ImageCodecInfo* pImageCodecInfo = NULL; GetImageEncodersSize(&num, &size); if(size == 0) return -1; // Failure pImageCodecInfo = (ImageCodecInfo*)(GlobalAlloc(0,size)); if(pImageCodecInfo == NULL) return -1; // Failure GetImageEncoders(num, size, pImageCodecInfo); for(UINT j = 0; j < num; ++j) { if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 ) { *pClsid = pImageC…
-
nasm assembler input output
by sage1130- 1 reply
- 14.2k views
I want to write an assembly language program for nasm assembler which will read an integer and print the same in linux. The program should keep reading integers until a particular integer say 50 occurs. When 50 occurs program should not print it and exit. But I don't know how to input integer. Can someone explain and give the complete asm program? Thanks
-
API Hooks Detours in MASM32
by clip- 12 replies
- 8.3k views
Hi, I'm working on a socket debugger, I know there are plenty of this around, but I want to learn how to make my own in MASM32. Initially I'm trying to hook the "send" function from wsock32.dll then open firefox. I would like to replace the information being sent by firefox with "Gotcha". I used jaghook for this. So far it's not working. Does anyone have a clue why? replace.asm .486 .model flat, stdcall option casemap: noneinclude \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc include \masm32\include\wsock32.incincludelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\wsock32.libincl…
-
How i can get commands of a debugged process ?
by mrousse83- 10 replies
- 4k views
Hello, I search how i can get each commands of a debugged process in OllyDbg. I think i need to use this function : ulong Readcommand(ulong ip,char *cmd); My program entry point : 004C5C74 > $ 55 PUSH EBP var Commande : string;if Readcommand($004C5C74, PAnsiChar(Commande)) > 0 then // success else // error But when u try it, it's not working Readcommand return all time 0 ! I need to have : Commande := 'PUSH EBP' Can you help me ? Thanks, Mathieu
-
- 2 replies
- 5.8k views
Hello, I need your help for make ollydbg.lib with the file ollydbg.def in Microsoft Visual C++ 2010 Express Edition. Thanks, Mathieu
-
Get Api name from address
by ragdog- 3 replies
- 15.6k views
Hi I coding a function to Get Api name from address. Now I am confused in my Iat have i this Address 74A44619 00403000 . 19467574 DD comctl32.InitCommonControls Ok i enum all process modules und parsing all found dll for this address for get the api name I use LoadLibrary and GetProcAddress with LoadLibrary and GetProcAddress get i this address 75AB1739 to the APi InitCommonControls Why? I use Win7 Thanks,
-
[Delphi] Reload Registry Settings...
by mAStEr pAIn- 3 replies
- 8.1k views
Hi Guys... Hope someone can help me out with a problem in delphi programming. First of all i'm coding in delphi since around 3 month. I want to describe my prob a little bit more... I'm using windows 7 x64. In win7 and also in win vista you can add program links to the task bar. But you can only do this when the string "IsShortcut" is written in the windows registry. When this string exists you have on your desktop some "freeky" arrows on your links. So i made a little app to write and delete this string to the registry. For now so good. But you only see the changes take effect when you log off and on again. Or you do a complete system restart. And theres my problem. I kn…
-
- 2 replies
- 6.2k views
Hi, I need you help me. I want to use SetWindowsHookEx to hook a function exported from a dll to a run a process but it did not work. Detail: I'm have 3 files: Audition.exe, Hooker.exe & DllHook.dll, I'm using Hooker.exe to load that dll & execute function SetHook (exported in dll for Hooker.exe use it). SetHook function in dll will excute to use SetWindowsHookEx to hook a other function in dll into Audition.exe. If hook success it'll show a nag is the PID of Audition.exe process is running. But it's hook isn't success. I want to you help me. This is code in DllHook: Project: This is project of it, i uploaded in attachment file. I hope yous hlp me right now. Tkz…
-
Win32 Assembly Cheat Sheet
by N1ghtm4r3- 0 replies
- 6.6k views
Handy thing.
-
AVR Assembly USART problem
by quosego- 6 replies
- 5.9k views
Hey all, Something else than those C++ and x86 asm programming stuff topics. Let's hope someone knows soemthing. I've been attempting to code an interrupt driven usart connection between an AVR chip board and the PC. (the PC is sending the data) However it seems that when an byte is recieved it keeps giving interrupts even when the buffer is read. (which should stop that according to the datasheet) Interrupt code which is properly triggered when recieving a byte but just keeps interrruptingand spamming my terminal: Serial_Recieve: ;store incoming bytes in r24,UDR out UDR, r24 reti Am I missing something here. Afaik I am initing the serial connecti…
-
wired visual studio problem
by deepzero- 6 replies
- 4.7k views
right, so yesterday night i had a native vsc++ 2008 project display a dialogbox using the DialogBox(...) functon. worked perfectly fine. i then went to bed, and when i got up this morning, the exact same DialogBox call would just return -1 and fail. I then did some further testing: 1) Creating a dialogbox with a list view on it always fails 2) creating a dialogbox with NO list view on it always succeeds. sometimes the dialog will get display correctly, sometimes the form-background is missing and some dialog items are floating around freely.it always takes up 100% cpu power. 3) creating a new,clean project with a dialog but no list view, it works in the beginning, but aft…
-
[C++] char Error
by argv_arteam- 2 replies
- 6.2k views
Hello. I have no idea why this code won't compile. I get: error C2440: 'return' : cannot convert from 'char *' to 'const char' error. I compiled it before. Can anyone take a look at the solution and try to fix the problem? It is only few KB is size and project is already created. Thanks in advance! Project.rar
-
[.NET] GacHelper
by sirp- 0 replies
- 5.1k views
voyce / gachelper A quick project to wrap the unmanaged C++ APIs in the .NET GAC API known as Fusion internally), in a way that they can be called easily from managed code (C#, F# etc). voyce gachelper Example where it's used using-mono-cecil-and-f-to-get-assembly-dependencies/
-
Visual Studio Tricks (ROX!)
by sirp- 3 replies
- 7.2k views
tips and tricks and tricks and tips ..just wonderful />http://scottcate.com/Tricks/
-
- 1 reply
- 2.9k views
hi, so i have been messing with native GUI programming in msvs2008 recently and lots and lots of problems & questions arose... Most of them were exterminated by a quick google search. This one is a little persistent, though: I have a class, myclass. The user can create multiple instances of that class. Every class instance has its own instance of a dialog box, which can be displayed at the same time. How can i now link a class instance to a dialog box? ie, if the dialog boxes CALLBACK routine is called, how can i know which class instances dialog box send the message? deep0
-
- 0 replies
- 2.8k views
I have this problem need help, I created a button in VB.Net, then I make the following code VB.NET 2008: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FileOpen(1, My.Application.Info.DirectoryPath & "\file.exe", OpenMode.Binary) FilePut(1, &H5003C0, &H7600) FileClose(1)This code will make the process as follows: First it will download a file (file.exe) to specify its path with the old file.exe will then open this file and overwrite. But here it just file.exe changed from old to new file.exe a new file, but does not override Please help me about this code in VB.NET 2008 Here's…
-
x86 hash optimization toolkit (MASM)
by CodeExplorer- 2 replies
- 5.4k views
x86 hash optimization toolkit (MASM) />http://www.paco.net/~tol/hash/x86hotk.html Looks great!
-
increasing pointers
by deepzero- 2 replies
- 4.2k views
hi all, this little problem is killing me: char data[256]; mystruct* mystructptr; //copy some stuff into the data buffer int the buffer "data",there are 12 junk bytes, but then there is a mystruct struct. i need to point to that struct... way #1: mystructptr = (mystruct*)(data+12); this works just fine, mystructptr points to the address of "data" + 12. this, however, doesnt work: mystructptr = (mystructptr*)data; mystructptr = (mystruct*)(mystructptr + 12); or mystructptr = (mystructptr + 12) or mystructptr += 12; the data buffer gets increased by ~0x400 bytes, not 12... i really cant see why #2 wouldnt work.