Programming and Coding
Programming and coding tips, help and solutions...
1,885 topics in this forum
-
AVR Assembly USART problem
by quosego- 6 replies
- 6k 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.8k 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.3k 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.2k 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.3k views
tips and tricks and tricks and tips ..just wonderful />http://scottcate.com/Tricks/
-
- 1 reply
- 3k 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.9k 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.3k 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.
-
VB.NET Trainer Template
by Caliber.- 5 replies
- 9.1k views
File Name: VB.NET Trainer Template File Submitter: Caliber. File Submitted: 01 Mar 2011 File Category: Source Code GencliQ Cracking Team Trainer Template & Source Code Compiler : VB.NET Author : zugo & Caliber Click here to download this file
-
Writing a Simply debugger
by ragdog- 5 replies
- 10k views
Hi I Write a simply debugger in masm32 now have i a problem why crash it the Target If set a Bp by other Address Test Target if "crackme.upx.exe" from Apox Set i a BP by 004082AF works it fine But set i a bp by 004082A8 or other address if my Bp not reached and the target crash it ;004082A6 .^\EB E1 JMP SHORT 00408289 ;004082A8 > FF96 54850000 CALL DWORD PTR DS:[ESI+8554] ;004082AE > 61 POPAD ;004082AF .- E9 0C90FFFF JMP 004012C0 ;004082B4 00 DB 00 mov eax,004082A8h mov [bpAddress],eax invoke SetBP,eax ;Set a Int3 Breakpoint ;from winhex if INT3 written ? ;and Yes if written ;EBE1(CC)965485 .while TRUE invoke WaitForDebug…
-
Collection.of.Delphi.Examples.v2.7
by CodeExplorer- 0 replies
- 3.2k views
Collection.of.Delphi.Examples.v2.7 by Cin TEAM />http://www.mediafire.com/?p0gzngq1q6hsgoa
-
C# Keygen and Solution
by argv_arteam- 5 replies
- 7.1k views
Hi. I wanted to ask a small favor if anyone has some spare time. I guess most of you could do it in 15min or so. I am working on a project but I don't want bla bla bla about that and I found myself in need of C# Keygen and also solution. While I may be one of best ARM Assembly guys around, C# is really not my thing. So, I was thinking something in these lines: 1. Make a "standard" C# keygen 2. Put a small "twist" in it (if possible). By that I mean a small obstacle. Anything you can think of. 3. Make a solution. 4. PM me the stuff. If anyone could do it I would be very grateful and if you need something from ARM world, just let me know and it is done. I hope you understoo…
-
exe/dll
by deepzero- 7 replies
- 4.3k views
Hi, I´m trying to create an .exe file, which can be used as a dll file at the same time. Take, for example, this piece of code: #include <Windows.h>BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { MessageBoxA(0,"dll","dll",0); } int main() { MessageBoxA(0,"exe","exe",0); } Just executing it like any other exe will run int main(). Now, the idea is that when this .exe file is loaded via LoadLibrary DllMain is called as if it was a dll. Is this actually possible? Or is there any other way the exe gets notified when it is LoadLibrary loaded? deep
-
Compressing floats in a tiny format
by hmi222- 6 replies
- 3.9k views
Hi. I want to store floats in a tiny format. As small as possible eg to 8bit or 16bit. Anyone an idea how that could be done? I need to have a precicion of 3 digits behind the comma. Thanx in advance
-
VB.NET 2008 Simple Debugger CORE
by Kurapica- 0 replies
- 3.4k views
This is an old Project to create a debugger core using VB.NET 2008 ofc it's not the best choice to code a debugger not because it's weak ! but because VB.NET doesn't support unsafe code like C# so you will have to add extra lines of code to pass structures between managed and native code. this Project requires some knowledge of Marshaling techniques, i.e passing data structures between native and managed code. I hope someone will find it useful all comments are welcome ofc P.S : It won't work on XP because I used a new API which is only supported by Vista and later OS, this API is "GetFinalPathNameByHandleW" ofc it can be wrapped using some other techniques to …
-
Methods Parser Source Code
by Kurapica- 2 replies
- 5.1k views
This is the full source of this little tool, I hope someone will find it useful as you can see It was a 2 day tool so don't expect too much but I commented the code well The Project is coded with Visual studio 2008 using C# Any comments are welcome, you can use this code as you like but It will be nice if you give some credit to Black Storm TEAM... />http://portal.b-at-s.net/download.php?view.479
-
Multi-Threaded Debugger-Injector *Delphi Source
by Kurapica- 0 replies
- 3.1k views
This is a simple multi-threaded debugger which can be used to inject a DLL into a creatable process and detaches from the process before it starts. It can be used for many purposes... Works like a charm on Windows 7 Source code is included in Delphi Pascal />http://portal.b-at-s.net/download.php?view.480
-
Using RuntimeTypeHandles to improve Memory of .NET Apps
by CodeExplorer- 4 replies
- 5.2k views
Using RuntimeTypeHandles to improve Memory of .NET Apps />http://www.bryancook.net/2009/07/runtimetypehandle-performance-memory.html
-
VB.net LateBinding?
by high6- 2 replies
- 19.6k views
Does the VB.net compiler using LateBinding or is this a feature of the obfuscator being used? And what is LateBinding? Is it just helper functions for reflection? public static byte[] Ã?a????Ã?öo??aâ?I(string Ã?????ÕoÓ??o??â??) { byte[] buffer2 = Ã?Å?Ò??áu????óaaÂø?oÃ(Convert.FromBase64String(Ã?????ÕoÓ??o??â??)); using (object obj2 = new MemoryStream()) { int num = BitConverter.ToInt32(buffer2, 0x0); object[] arguments = new object[] { buffer2, 0x4, buffer2.Length - 0x4 }; bool[] copyBack = new bool[] { true, false, false }; NewLateBinding.LateCall(obj2, null, "Write", arguments, null, null, copyBack, true); if (copyBack[0x0]) { b…
-
calloc question
by ToMKoL- 6 replies
- 7.6k views
I've got question about calloc. From what i know calloc uses two paramas - size of element & number of elements. It allocates memory of size of elements * number of elements and returns a pointer to that memory in eax. Memory allocated is filled with 0. My question is what is in four bytes before the pointer? I.e.: push size of elements push number of elements call calloc ;now eax holds pointer to mem mov edx,[eax-4] - what will be in edx Is it totally random or is it somehow determined?
-
custom string class: memory leak
by deepzero- 5 replies
- 5.6k views
hi guys, i was trying to implement a custom string class for practicing purposes, but i hit a problem regarding memory leaks... to be more precise, the problem is the substring-method: substr(int start, int length); to be used like this: mystring a = "deepzero"; mystring b = a.substr(4,4);//b == "zero" or MessageBox(0,a.subtr(4,4),"test",0); the problem is: when i create the substring, where do i store it? When i allocate space on the heap, it wont be freed anymore... So i figured i`d have .substr() return a mystring object (containing the substring): mystring mystring::substr(int start,int len) { //ptrtostr == pointer to the actual char-array which stores t…
-
PELOCKnt decryptor
by bigboss-62- 3 replies
- 9.4k views
Yohoo guys, I'm proud to present my new decryptor: PELOCKnt decryptor v1.0. This one is based on my previous BJFnt decryptor, because PELOCKnt is an update release of BJFnt. It currently has support for PELOCKnt v2.01, v2.03 and v2.04. (I haven't actually PELOCKnt v2.02) If someone have a copy of PELOCKnt v2.02, don't hesitate to send me it... I will include support in my decrypter... As usual, source code in masm and cryptors are also included for interested ones... Any comments, bug reports or others are welcome... See you soon ... Laurent aka BIGBOSS from COPs CPS!UnPELOCKnt_v1.0.zip PELOCKnt_v2.01.zip PELOCKnt_v2.03.zip PELOCKnt_v2.04.zip
-
[c++ snippet] MD5 of string using wincrpyt API
by deepzero- 0 replies
- 7.5k views
Hi, I always thought calculating the MD5 digest of a string required adding external code, i was using this: http://www.zedwood.com/article/121/cpp-md5-function which works fine. I was messing around with Windows crypt api, and noticed one can easily calculate the digest using WinCrypt APIs: string MD5(string input) { HCRYPTPROV CryptProv; HCRYPTHASH CryptHash; BYTE BytesHash[33];//! DWORD dwHashLen; string final; if(CryptAcquireContext(&CryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)) { if(CryptCreateHash(CryptProv, CALG_MD5, 0, 0, &CryptHash)) { if(CryptHashData(CryptHash, (BYTE*)input.c_str(), input.le…
-
breaking nicely out of nested loops
by deepzero- 5 replies
- 5.7k views
hi, everyone seems to hate on the use of "goto" commands in c/c++ and i dont like it too much myself, but i dont see any other way with nested loops: good: for(...) { if(...) break; } not good: for(...) { for(...) { for(...) { if(...) goto done; } } }done: ... any "better" or "cleaner" way, avoiding the goto commmand?