Programming and Coding
Programming and coding tips, help and solutions...
1,894 topics in this forum
-
i wanna generate random numbers with no repeats, i have this code #include <cstdlib> #include <iostream> using namespace std; int main() { int randomNumber; for(int i = 0; i < 15 ; i++) //print random #s 15 times {randomNumber = (rand() % 25) + 1; cout << randomNumber << endl;getchar( ); } return 0; } but it generate the same sequence 17-18-10-1-20-25-4-9-13-15-6-21-7-3-12 everytime how can i fix it
-
Hey all, I am searching for an unpacker source code coded in assembly , the reason for this is I want to start coding unpackers you know teach myself. I havn't found any tutorials on coding unpacker's if you happen to come across any let me know , anyways... your help is appreciated! Tipidy
-
Sorry my english is bad. How to input music in Borland Delhpi 7??? Please Tell Me???
-
i am just learnign asm and just trying to code a simple exe which on opening first open a site like www.tuts4you.com Then the main program executes. I know about coding a message box and little bit more but open site on opening site is little interesting one so i want that if anyone know how to do that coding or any source related to that please share with us
-
Anyone have an example of hooking a kernel32 api with a driver? Also can more than one driver hook an api at a time? Side question: Can you call a drivers functions directly? Or do you have to do the Read/Write file stream?
-
Dear all friends in tuts4you, rite now i'm try to build a simulation local server for my favourite online game so i can play it in my computer without internet connection (in additional to practice the game n because verry expensive internet connection in my country).. i try to build it in visual basic 6 because limited knowledge off programming language that i have. at first, i've captured all packets sent n recieved using WPE. the problem is, i send the packet i recieved in wpe with winsock, the server respond the connection but the game not responding the connection. some off my codes are: Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) Winsock1.Close …
-
Hi. I've got a problem. I'm creating a fake signer, thats adding a new section to the PE, adds the sig, and a push/retn to go back to the OEP. Now, my problem is an odd one, while I've been building it I've been calling the function(s) via Form.Create event, and all is working perfectly, but now everything is ready I started to make the GUI and call via button click events, this is when I started running into problems. Just doesn't make sense to me, if it works via Form.Create should work anywhere else, no? This is the add section function I'm using, I ported it from a VB version, I forget who that was by. Please excuse the mess I've changed all the read/write to copymem …
-
Recently, I downloaded a free video to flv software. It will check for update every time it starts up, and there's no option to disable it visiting its website. For example, some freeware will download ads from its website. Without internet connection, it will work fine. The problem is how to disable it from visiting internet without using internet firewall. I tried using winHex to replace its domain to ip address 0.0.0.0, but the application might encrypt its domain. Windows hosts file may solve this problem, but it will not the best solution for sharing clean software to others. I will appreciate your good suggestions. Thank you in advance. I coded a demo program. See P…
-
Hello, guys and gals. I have a question involving patching system DLLs to allow hooking or loading of user's modules inside an app. For instance, I picked msvcrt.dll from system32 for this task. Loading up the DLL in Olly shows this: So, let's say I want to write some code inside the DLL, then place a JMP or PUSH+RET at DLL's EP to redirect it to first execute my code, then restore code at EP, after which I'll resume execution to the DLL. All easy and done, I pick some empty space from .data section, as below: So, EP: 77C1F2A1 CAVE: 77C5D300 It would work pretty well, except, if I copy DLL to Desktop and open it in Olly, I get this: Under these circumstances …
-
Hallo I'm coding with RadASM Program. Not so good . I have now a Problem with RC-file... If I create a dialog Normally the RC-file content should be such!! 100 DIALOGEX 6, 6, 207, 96 STYLE DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Reference Sans Serif" BEGIN CONTROL "IDC_BTN", 101, BUTTON, BS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 125,24,62,15 CONTROL "OK", 102, BUTTON, BS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 125,41,62,15 CONTROL "Cancel", 103, BUTTON, BS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 125,59,62,15 CONTROL "IDC_GRP", 104, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 117,12,78,69 ENDBut R…
-
Enjoy, everybody! http://www.sendspace.com/file/wnbgdq Use it as you want, credits or not; it's not terribly messy, some parts were a bit inflexible (e.g.: The GetFunction function should accept one or two more parameters for the hostname and request to be sent, etc). Otherwise, I think it works fairly well.
-
Hey, Porting this post to the public area. Anyway, here it goes: I've been writing a small ruby extension which provides to functions in a class, to log some text to Olly's log window and to put a MessageBox on the screen; nothing complex. I then embedded a ruby interpreter into an Olly plugin, hoping to be able to call the extension function from my script. But calling the script using the embedded ruby interpreter causes either an exception or simply doesn't work (with ruby_exec doing nothing). If anyone has been working with an embedded ruby interpreter before: suggestions are welcome. Regards, metr0
-
Why not mov eax, 0 ? Any advantages using xor eax, eax ? Is it faster?
-
Just like C function MyProc() { char szTemp[] = "Hello World!" } In MASM: MyProc PROC local szTemp:byte MyProc ENDP The problem is how to transfer "Hello World!" to szTemp, WITHOUT defining global variable in .DATA segment. I figured out one way, but it will not be the best way. MyProc PROC local szTemp[128]:byte mov al, 48h ;ASCII of 'H' mov szTemp, al mov al,65h ;ASCII of 'e' mov szTemp+1, al ;etc... MyProc ENDP Could any buddy suggest me better solutions? Thanks in advance.
-
Hello, i would like to add some bytes to an existing program, so i can execute them later in the reversed program. how would i do such a thing? would i have to mess with the file system? the root directory? or can i just modify the size of the file with a tool like OLLYDBG? thanks in advance.
-
I want to stream raw audio through the microphone input. How do you do something like that? Is it possible without creating a custom driver? This library looks like it could do it. http://www.ambiera.com/irrklang/
-
-
kernel32.GetSystemTimeAsFileTime how do I hook this api and return to the date I want ?
-
Does anyone know where I can find tutorials and ebooks on programming in Hex and or Binary.I tried talkbinary.com but that wasn't much of help,this is my latest effort in conducting research into more advanced insight into computing.
-
Hi all, I've tried unsuccessfully on several occasions to compile C code to a static library so i can use it with MASM, but every time i try, i add the lib file to a project (created just for testing) and try to compile and i get the following error message: error LNK2001: unresolved external symbol _Function1@16I've used extern "C" to prevent the names being decorated, but this doesnt seem to make any difference to the error, as it is identical regardless of the name being decorated or not. I've tried using stdcall, no joy. Does anybody know what needs to be done to succeed with this? Also, i've succeeded in making a static library from a VC++ dll with Dll2Lib (an altern…
-
The Assembly Language course is intended for those who wish to write assembly for both Windows and Linux. It uses the freely available NASM assembler, which is feature-complete and produces object code in a variety of formats. The predominant CPUs today use the Intel instruction set, and all examples in the course use that instruction set. The course covers the background information necessary for assembly programming and it covers the forms programs must take to operate in the systems. Some time is spent with low-level I/O, but many of the examples interface with C mainline programs. The emphasis of the course is in writing assembly language functions that can be called …
-
Hi! I have some problems reversing programs in this kind of scenario: 1)Application uses custom made GUI (graphics user interface), that is made by DirectDraw or similar graphics api 2)There is no references for text, even encrypted ones, just because all text is drawn using images Application must use some sort of way to find out when mouse is clicked, so i could break on that function call and then step code to find what i want. Just i dont know what should i search for. I see that application uses USER32.PeekMessageA and other related messaging functions, im thinking that i could use code cave to create some conditional breakpoint if message signalizes that i have mou…
-
Here is the loader I built. Might be useful for someone trying to patch some bytes. The code may look like a certain tutorial from arteam. But I can reassure you that it took 3 of us. To make that code work. It took us 5 hours of editing that piece of **** tutorial that arteam built to make it work properly. So here is working code as of May 30th 2009. Can be used for games or programs to patch certain memory addresses. #include "stdafx.h"#include "windows.h" #include "string.h" void GetLastErrorMsg(char *szBuf) { // DWORD szBuf; LPVOID lpMsgBuf; DWORD dw = GetLastError(); FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, …
-
What is this used for? And is there C++/C code that when compiled uses this(to give a better understanding of it)? I checked the help file but I don't really get what it is used for. Is there an unlock? I am probably getting confused due to the lack of knowing more about how the cpu/etc interact, etc.
-
Someone can explain to me like adapting this asm code for delphi? Thank in advance!!! @label1_00XXXXXX: mov eax,esi cdq idiv dword ptr [ebp-8] mov eax,esi push $019 pop edi lea ecx,[edx+ebx] cdq idiv dword ptr [ebp-$0c] mov eax,[ebp+8] movzx eax,byte ptr [edx+eax] ==>First char edit1.text (HEX) movzx edx,byte ptr [ecx] ==> First char Fixed String (HEX) xor eax,edx cdq idiv edi add dl,$041 inc esi cmp esi,[ebp-4] mov [ecx],dl jl @label1_00XXXXXX