Programming and Coding
Programming and coding tips, help and solutions...
1,882 topics in this forum
-
- 1 reply
- 3.9k views
dowload (git included) @: https://www.sublimemerge.com/ @CodeExplorer hehe they done it man, all in 14mb similar - https://www.sourcetreeapp.com/ bonus - Programming Facts
-
How to add new instruction with dexlib2?
by Modify- 2 replies
- 4.4k views
I try to add new instruction, // old const/v4 v?, 0x0 // new const/v4 v?, 0x0 const-string v?, "Hello" // new instruction can someone help me, adding instruction without duplicate register number?
-
Question about hostent struct
by LCF-AT- 8 replies
- 5.6k views
Hi guys, today I check some of my windows sockets codes and wanted to update & optimze it a little writing some clean code without to be messy to have also a better view on it.Now I came to the hostent struct which returns a pointer to this struct after calling gethostbyname / gethostbyaddr.Now in the MSDN description I can read that this struct is only used once for each call to this function and getting overwritten by another call.Now they say I should copy the struct into other buffer. So does it mean I dont need to copy it into extra buffer if I call the function from diffrent created threads?Just if I use same thread = copy to buffer?So normaly I ca…
-
Getting most significant bits...
by CodeExplorer- 4 replies
- 4.3k views
Getting most significant bits... I could only think of this: #define GetLSBs(x,n) (x&((1<<n)-1)) unsigned int GetMSBs(unsigned int x,unsigned n) // n number of bits to get from i = 0 { // n = numbers of bits to get unsigned int LSB = GetLSBs(x,32-n); unsigned int MSB = x-LSB; return MSB; } I've thinked of getting MSB with "and" instruction; anyway I've failed to get bits mask: first bit, first two bits, first 3 bits ...: 1000 // 8 1100 // 12 1110 // 14 1111 // 15
-
[?]how to begin game development
by abbas- 2 replies
- 4.2k views
hi all I want to create a language teaching game and I have 0 experience in this field but I played a lot of games. now I want you guys to tell me briefly what things I should go for and give me links you think is essential.
-
- 0 replies
- 4.7k views
I have a code for converting serials into segments written in C ++. Now I want to use this code in an application that I wrote in Delphi. I've translated some of the code but I did not understand a number of commands. Help me convert my code into Delphi std::string hwid_str = "aDBUvGX+SZeXe0ZRtjUGQTpD2jk="; size_t len = hwid_str.size(); uint8_t *hwid = new uint8_t[len]; Base64Decodehwid_str.c_str(), hwid_str.size(), hwid, len); for (size_t i = 0; i < len; i += 4) { uint32_t value = *reinterpret_cast<uint32_t *>(&hwid[i]); uint32_t id = value & ~3; switch (value & 3) { case 0: …
-
Four Ways to Compile C for Windows
by CodeExplorer- 2 replies
- 4.1k views
Four Ways to Compile C for Windows: https://nullprogram.com/blog/2016/06/13/ Pelles C statement: So that statement is true? Are performances lower if I use Pelles C???
-
Sending email using C++
by malware- 2 replies
- 4.1k views
How to send email smtp using winsock C++?
-
Easy way to write chars to file?
by CodeExplorer- 1 reply
- 3.8k views
Easy way to write chars to file? Tried http://www.java2s.com/Code/Cpp/File/Writeunsignedchartoafileandreaditback.htm ofstream out("D:\\block1"); out.write((char *) &block1Conv, sizeof block1Conv); out.close(); There is a problem: it will replace 0A with 0D0A How I can avoid the newline stuffs?
-
DrawTextEXT - DrawHTMLCODE and DrawBBCODE
by fearless- 0 replies
- 3.7k views
Mainly for anyone using asm and interested in custom controls or adding more functionality to their projects, I recently began work in porting over, adapting and adding to DrawHTML code from Ukkie9: https://www.codeproject.com/Articles/7936/DrawHTML I created two functions: DrawHTMLCODE and DrawBBCODE that processes html or bbcode tags in a string and adjusts the text and font style accordingly and outputs the result as per DrawText or DrawTextEx win32 api functions, but with the added enhancements. So far some tags are supported, not all. Mainly ones that are more common in use, or made sense to include. Anyhow I have put the code on github for anyone to u…
-
How to decompress CWS files?
by LCF-AT- 10 replies
- 10.3k views
Hi guys, does anyone know how to decompress CWS files to FWS (decompressed) manually or via dll / API xy? My first goal was it to find any internet request paramter what could do decompress directly on fly but I didnt found such command and can only download the CWS file.Now I got this in memory and would like to decompress it now before writing the file.Next I tried to find any way to do this manually but also didnt find a description how to decompress CWS by hand.As next I tried to find any dll / APIs which I could use to decompress the CWS / bytes in memory and just found infos about zlib but also there I found no infos about CWS etc.Now the question is how t…
-
what UI used by professional software?
by malware- 6 replies
- 5.7k views
What UI (user interface) used to develop kesperky antivirus? avat and eset and bitdefder? They have some sick gui. I wanna develop UI like them I guess bitdefender used embedded html and css UI..
-
How to monitor website traffic?
by LCF-AT- 0 replies
- 4k views
Hi guys, so I would like to visit a website as usual in browser (visit site / all links gets loaded / webconsole) but this time I wanna visit it "without using a browser".How can I do this and/or what kind of tools / libs engines etc are already out there I could use for that etc?So my goal is it to get all loading links of a site.So thats diffrent to just call only one website to grab the pagesource and in this new case I need to find some link/s during the site is loading it and which are not present into the main site.Maybe anyone could help with some infos for that etc. Thank you
-
Question on indexing mode in assembly?
by James Taylor- 11 replies
- 4.8k views
i am new to assembly programming. First i thank to member of tuts4you for being helpful in needy times. I am learning assembly from online and books. i am stuck on point. I am having problem using 1. lea eax, [esp-04h*2] 2. mov [ebx-04h], bp ; 3. cmp [esi+eax-06h], 'KCUF' 4. cmp word ptr [ebx+18h], 01h 5. cmp dword ptr [esi], 00455000h or similar code snippet. Thanks, I know this is very basic question to ask but i wanna learn from here as well. Please take some moment and explain what address mode it is and what does the code do. Thanks
-
what is assign to a random offset?
by James Taylor- 5 replies
- 4.4k views
the following cods is generated by IDA pro. I don't understand where and what is assigned to off_40G030? there is no reference in code section. what does the following code mean? what is the clean code of the following code?
-
write program in assembly
by pwnium- 7 replies
- 5.2k views
Hello there ! how to write a program add two numbers and print the result in text box in order to print the result we can use SetDlgItemText Funtion , the problem is i don't know how to add two numbers .. what functions we need ? am using MASM32 , and RadASM IDE Regards,
-
Quotation marks / CreateProcess problems
by LCF-AT- 4 replies
- 4.4k views
Hi guys, I have some trouble again with that quotation marks issues for paths etc.Just wanna ask again how to do it right and how to handle it without to get any errors starting commandline tools with paths and arguments.I get always problems if paths using spaces and if not all works.In this case I try to qms for the path but it also fails. Example: Below without qms for ffmpeg path so I changed the bin folder and added some spaces for testing... cmd.exe /c C:\FFMPEG_Sets\ffmpeg-3.3.4-win32-static\bin 1 2\ffmpeg.exe -i "https:///.....m3u8" -vcodec copy -acodec copy -f mpegts - | "C:\Program Files\VideoLAN\VLC\vlc.exe" - Now in cmd window I get this error…
-
- 6 replies
- 4.2k views
Local variables definition versus class (instance) variable definition speed: int K2[3] = { 0xd76aa478, 0xe8c7b756, 0x242070db}; void Function() { int K1[3] = { 0xd76aa478, 0xe8c7b756, 0x242070db}; int before2 = GetTickCount(); for (int ki2=0;ki2<1000000;ki2++) { for (int j=0;j<3;j++) { int a = K2[j]; } } int after2 = GetTickCount(); int before1 = GetTickCount(); for (int ki1=0;ki1<1000000;ki1++) { for (int j=0;j<3;j++) { int a = K1[j]; } } int after1 = GetTickCount(); // the results: int dif1 = after1-before1; int dif2 = after2-before2; } K1 version (local variable version) speed suppose to be much faster since is defined on stack, …
-
- 4 replies
- 4.7k views
i tried to write a small program that run some useful tools that i need , unfortunately the program run only in my computer how can i fix that problem , another question ... i'm just a beginner so the i've repeated CreateProcess and ResumeThread so many times i guess am doing this wrong ! please correct me i called this small Program EX_Runner the source code , .386 .model flat, stdcall ;32 bit memory model option casemap :none ;case sensitive include EX_Runner.inc include comdlg32.inc includelib comdlg32.lib .const sla db"\",0 FilterStr db "Executable Files","*.exe",0,0 .data olly db "C:\RCE\RAMODBG v1.1\OLLYDBG.EXE",0 IDA db "C:\RCE\Tools\IDA Pro\IDA…
-
How to walk through resource directory? 1 2 3
by LCF-AT- 58 replies
- 18.7k views
Hi guys, I am trying to read the resources directory of any target to read the whole content inside but now I have the problem that I dont understand it yet correctly using the structs for them. Example: Below the structs I found for resources IMAGE_RESOURCE_DIRECTORY STRUCT Characteristics dd ? TimeDateStamp dd ? MajorVersion dw ? MinorVersion dw ? NumberOfNamedEntries dw ? NumberOfIdEntries dw ? IMAGE_RESOURCE_DIRECTORY ENDS IMAGE_RESOURCE_DIRECTORY_ENTRY STRUCT union rName RECORD NameIsString:1,NameOffset:31 Name1 dd ? Id dw ? ends union OffsetToData dd ? …
-
What is the assembly source code of the following C code?
by James Taylor- 4 replies
- 4.1k views
What is the assembly source code of the following C code? line 1 loading address of array from stack. what the 2 and 3 and others line are doing? Thanks
-
Load DLL From Memory not working on Win8 and Win10
by GautamGreat- 3 replies
- 4.3k views
Hi, I'm trying to load a dll from a memory section in a compiled program. I written a MultiASM Assembly (Which works pretty well on Window 7), Everything seems Ok on windows 7, but it does not work on win8 and win10. Since I don't know what is wrong, could someone tell what is wrong? Spoiler Solved Here is my ugly assembly, but it works Edit (13 July 2018) I managed to fix the error, Thanks you guys
-
- 4 replies
- 4.5k views
helloo! may i ask which assembler is better suited for a < 4k intro for a 32 bits windows? = 3 thaanks beforehand! x3
-
add eax edx ?
by James Taylor- 7 replies
- 8.4k views
is the lea edx, [esp+24] start of array ? and eax, [esp+140] index? then whats add eax, edx doing here and this source code mean ? can you please explain
-
- 1 follower
- 1 reply
- 3.7k views
Hii! i've stumbled on PNGlib like it's the only png decoder for masm, it is the only one out there? this is the site of PNGlib http://www.madwizard.org/programming/projects/pnglib while it's considerably small, uPNG on C output is even smaller, counting kb; but some pairs of kb makes the difference on tiny intros may i ask if anyone knows another png decoder for masm? any idea is very welcome! x3