Programming and Coding
Programming and coding tips, help and solutions...
1,882 topics in this forum
-
Write Multiple Bytes To Memory [delphi]
by Departure- 14 replies
- 8.4k views
Hey people I just need a little help from someone with some delphi experiance, Im new to delphi coming over from Vb6 and I have no problem writting to memory in Vb6 But I want to do it in delphi, I have used something similar that I would have used in vb6. But I would like to know how I would write multiple bytes to a single address implementation const Address1=$0054B28B; //These will be the address's im going to write to Address2=$0054B297; Address3=$0054B29C; {$R *.dfm}procedure TForm1.Button1Click(Sender: TObject); var Path : string; StartInfo : TStartupInfo; ProcInfo : TProcessInformation; CreateOK : Boolean; Write: Cardinal; NumberOfByt…
-
Looking for Regular Expression lib
by LCF-AT- 8 replies
- 5.9k views
Hello, at the moment I trying to lern how to work with RegEx syntax and I have to say it makes fun and seems to be also very usefully.I also like the online site regex101 for testing / checking and to get the results and infos in realtime.(I would like to have any offline tool similar as regex101 [not notepad++]) Now my question is whether there are also any libs for MASM already I could use for myself in my apps if I need or want to check text sources for anything,so with RegEx it would be much better than to search manually with limited small pattern.Maybe any lib with functions I can also use with same string syntax etc.Does anyone know some latest thing etc…
-
Looking for all JavaVMOption opt
by CodeExplorer- 1 reply
- 7.9k views
Looking for all JavaVMOption opt; What I have so far: public static string GetDescriptionFromComand(string command) { if (command.Equals("-Djava.compiler=NONE")) return "disable JIT"; if (command.StartsWith("-Djava.class.path=")) return "user classes"; if (command.StartsWith("-Djava.library.path=")) return "set native library path"; if (command.Equals("-verbose:jni")) return "print JNI-related messages"; return ""; } Any help will be great, also searched with google but no good result.
-
help me ,...can you convert c++ to delphi?
by Guest Steve- 3 replies
- 5.1k views
#include <windows.h> #include <stdio.h> #include <tlhelp32.h> unsigned long _GetProcessId( char* szProcName ) { PROCESSENTRY32 pe32; HANDLE hHandle; hHandle = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); pe32.dwSize = sizeof( PROCESSENTRY32 ); if( !Process32First( hHandle, &pe32 ) ) return 0; while( Process32Next( hHandle, &pe32 ) ) { if( strcmp( szProcName, pe32.szExeFile ) == 0 { CloseHandle( hHandle ); return pe32.th32ProcessID; } CloseHandle( hHandle ); return 0; } unsigned long _ScanForBytes( c…
-
How to map large files?
by LCF-AT- 5 replies
- 7.2k views
Hi guys, today I got a error message trying to map a large file +1 GB and get error code ERROR_NOT_ENOUGH_MEMORY.For smaller files it works.My question now is how to handle large files without to get any problems? CreateFile GetFileSize // till max 4 GB = -1h CreateFileMapping MapViewOfFile,handle,FILE_MAP_READ,0,0,0 // = ERROR_NOT_ENOUGH_MEMORY (00000008) dwNumberOfBytesToMap --------------------------- Specifies the number of bytes of the file to map. If dwNumberOfBytesToMap is zero, the entire file is mapped. How to handle large files?What is the normal way for that?Should I first check how much virtualmemory the system has (in my case 4 GB - 1 GB for g…
-
Writing plugin for IDA Pro
by Aldhard Oswine- 1 reply
- 7.8k views
I'm reading IDA pro Book 2nd edition, author talks about writing plugin for IDA and uses C++, is this possible to write a plugin entire with python, plugin with menu item and shortcut?
-
- 3 replies
- 5.3k views
If i try to insert a call after a Instruction im getting a Method is not defined in this Module Exception using dnlib.DotNet; using dnlib.DotNet.Emit; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace LeafObfuscator.Protection { //TODO: Fix class Int32 { public static void encode(ModuleDefMD md) { Inject.injectmethods(md,Int(md)); foreach (TypeDef type in md.Types) { foreach (MethodDef method in type.Methods) { CilBody body = method.Body; …
-
- 0 replies
- 4.8k views
If i try to insert a call after a Instruction im getting a Method is not defined in this Module Exception using dnlib.DotNet; using dnlib.DotNet.Emit; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace LeafObfuscator.Protection { //TODO: Fix class Int32 { public static void encode(ModuleDefMD md) { Inject.injectmethods(md,Int(md)); foreach (TypeDef type in md.Types) { foreach (MethodDef method in type.Methods) { CilBody body = method.Body; …
-
How To Read Text From Labels Menus Etc..
by ChupaChu- 19 replies
- 10.2k views
Hi there, i have a question for Delphi code. I want to be able to read all text from other processess windows. Now i am aware of FindWindow API, but it only reads Caption of a main form - and I want to be able to read from status bar, menus, memoboxes, from everything that might contain text. So is there a way to get this (except capturing a screen and using ocr to recognize eventualy text)? Any ideas, comments?
-
Winlicense HWID bypass loader ?
by Sh4DoVV- 0 replies
- 6.1k views
Hi How to write a loader for bypass hwid of winlicense protected file ? i can patch it in Ollydbg , but i don't know how to write loader for it thanks
-
- 3 replies
- 4.9k views
Hii! i am almost about to release my first old-school intro with some friends! the only thing left is to know how to bind textures to a quad i am working with opengl 1.1 as much as i can, for this intro to work on old windows/old integrated graphic chips, so i want to avoid libraries and do it as vanilla as posible also to learn from it! = p i created a new opengl template in Code::Blocks to work in a cleaner environment, the code is as follow: https://pastebin.com/raw/XpS0hRpj which output this nice square on the screen: BUT instead i want to use this nice snowflake: and since afaik i can't use png files without a library, here is the …
-
x64 inline patching
by T-Mixer- 7 replies
- 6.3k views
Is there any way please (code or tool) for x64 '.dll' files inline patching ? I will be a great favor. Thanks.
-
.net IL Memory Patching?
by PermaNull- 4 replies
- 9.7k views
I'm wondering if there's any library available for patching IL code in-memory at run-time of a remote App, similar to how you'd perform detours or write memory to a remote C app. Basically I'm dealing with an application I'd like to bypass some checks on but getting defeated by the packer's integrity protection when manipulating the IL in the binary itself, so I figured my next best option was to write a loader and patch the process in memory. I've looked through a few different things: https://github.com/0xd4d/dnlib - I haven't discovered any in-memory patching functions for IL code in specific locations in dnlib if it exists please do let me know. Most o…
-
Problem calling hooked function (MinHook)
by Zeupert- 5 replies
- 8.8k views
In my DLL I am using the MinHook library to hook certain functions based on their address. The problem is, if I try to directly call the original function with the address that MinHook gives me, it ends up crashing, it only works when jumping directly to the address. I am working in x64 btw. I am hooking the function in a way like this: extern "C" LPVOID originalFunc; LPVOID myAddress = 0xDEADC0DE; MH_CreateHook(myAddress, &myCustomFunc, &originalFunc) the "myCustomFunc" is also declared extern "C" and is a function in a seperate assembly file, looking like this: myCustomFunc: *push all registers, similar to pushad* call myFunction *po…
-
- 7 replies
- 10.4k views
Hii, there's been a lots of obstacles on my first intro making BUT most of them have been resolved either by trying hard or looking for threads on forums BUT this time i can't find the answer anywhere, so i ask your help to solve this puzzle on my main.c project (Code::Blocks always create it with .c when using the OpenGL Project template BUT i still use C++ on it) i have included this ufmod.h header: https://pastebin.com/raw/UMuqxB6h (Note that it specifies Compiler: Visual C, Dev-C++ BUT i want to use Code::Blocks :c) and have this function to play music /* music function */ void play_xm(){ uFMOD_PlaySong((char*)1, 0, XM_RESOURCE); …
-
- 4 replies
- 4.8k views
Recently lost a bunch of old pdf files and whitepapers I had covering these kinds of topics. Looking for any examples/papers/pdfs etc. that contain things like: Anti-Decompiler Techniques Anti-Debugger Techniques Anti-Disassembler Techniques Mainly looking for native code protection information, not .NET related stuff.
-
[DELPHI 7 SOURCE] Simple Layered Encryption
by JohnWho- 3 replies
- 6.8k views
I have been working on a EXE protector for a looooooooooooong time and in the process i have coded a lot of test functions, here is a first and very basic version of one of them. Instead of just sharing the code snippets i put the functions to use by showing it in action. The example does: 1). Add a new section to a 32-bit .exe 2). Change entry point to new section, 3). Add variables to layer encrypted function and encrypt the 5 layers 4). Write layer encrypted function to new section When target file is executed the 5 layers is decrypted, on last layer OEP is decrypted and jump is taken to OEP. All is simple xor encryption. …
-
- 0 replies
- 4.2k views
Syntia is a program synthesis based framework for deobfuscation. It uses instruction traces as an blackbox oracle to produce random input and output pairs. From these I/O pairs, the synthesizer learns the code's underlying semantic. https://github.com/RUB-SysSec/syntia
-
Allocate Console in Java
by CodeExplorer- 3 replies
- 12.7k views
Allocate Console in Java??? When I try to run the bolded one it doesn't work: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); int compilationResult = compiler.run(null, null, null,sourceFile.getPath()); The run method can use streams to handle input and output: int run(InputStream in, OutputStream out, OutputStream err, String... arguments) When I run the program from console with java.exe or even javaw.exe all works ok. SO I think it fails because it doesn't have a console window or such... Anyone know how to solve the problem?
-
Execute an exe in same process Java
by CodeExplorer- 2 replies
- 4.5k views
Hi guys and gals. I wanna execute an exe inside same process with Java code. Hopefully someone will give some advices , I am not familiarly not even with executing exes from native code. So first I have to use LoadLibrary of the exe, then what? From what I've read on https://stackoverflow.com/questions/44912/java-delegates I'm fornicated since there are no delegates on Java!
-
Java Compilers
by CodeExplorer- 2 replies
- 9k views
Java Compilers Some time ago I've searched over NET for java compilers, then without good results, Now I've found some: https://blogs.oracle.com/sundararajan/week-end-fun-with-the-java-compiler-source-code https://en.wikipedia.org/wiki/Javac http://janino-compiler.github.io/janino/ https://github.com/janino-compiler/janino https://stackoverflow.com/questions/616532/on-the-fly-in-memory-java-code-compilation-for-java-5-and-java-6 https://commons.apache.org/proper/commons-jci/ jci seems tom be the winner, trough is a bit outdated.
-
C++ end-of-function hooking
by JQueue- 5 replies
- 22.3k views
Are there any C++ hooking libraries that also allows a function to be called right before the return statement? I would like to get some values from two registers after the function has executed, without having to hook all the places where this function is called.
-
Annoying error
by Avenger- 1 reply
- 4.1k views
Hi When i load and save assembly(without any editing) (using dnlib) result is broken When i run result I got below message: And when I open it on dnspy : What's wrong?
-
Invoke method
by Avenger- 3 replies
- 6.2k views
Hi I want to invoke method from c++/cli assembly but when I use Assembly.Load(filename) I get caught in catch block with below message: "Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.)" What should i do to load assembly and invoke method?
-
Assembly.Load vs LoadFile vs LoadFrom
by CodeExplorer- 2 replies
- 10k views
Assembly.Load vs LoadFile vs LoadFrom Link: />http://codingarchitect.wordpress.com/2006/09/11/assembly-load-vs-loadfile-vs-loadfrom/