Posts

libvirt frequently used commands summary virsh

libvirt frequently used commands summary virsh Let's summarize the frequently used commands for handling QEMU virtual machines with libvirt. Virsh define This command adds a virtual machine defined in  libvirt Domain XML Format (  https://libvirt.org/formatdomain.html  ) to libvirt. virsh define [libvirt 도메인 정의 xml 파일 경로] Virsh start start Use  to start a virtual machine  . virsh start [가상머신도메인 이름] View virtual machine list virsh list You can see the list of added virtual machines. virsh list -- all Virsh delete You can delete the added virtual machine. virsh delete [snapshot name] Pause / resume virtual machine virsh suspend, resume Use to pause the virtual machine  suspend . virsh suspend [snapshot name] resume Use  to resume a paused virtual machine  . virsh resume [snapshot name] Turn off the virtual machine virsh destroy Use to terminate the virtual machine you  destroy were using. virsh destroy [snapshot name] Create a v

SwiftUI] Displaying Modal View in SwiftUI (Modal View)

Image
Today, we will see how to launch Modal View in SwiftUI.  How to do the following in SwiftUI to bring up a modal view with existing Objective-C? - ( IBAction )showMyModal { MyModal *myModal = [[MyModal alloc]initWithNibName: @"MyModal" bundle: nil ]; [myModal setModalTransitionStyle: UIModalTransitionStylePartialCurl ]; [ self presentModalViewController:myModal animated: YES ]; } First, create a SwiftUI project as an example and add a Button to the ContentView. import SwiftUI struct ContentView : View { var body: some View { VStack{ Text( "Hello, World!" ) Button(action: { print( "hello button!!" ) }) { Text( /*@START_MENU_TOKEN@*/ "Button" /*@END_MENU_TOKEN@*/ ) } } } } struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } } Define the

DLL Injection using CreateRemoteThread in Windows 10

Image
DLL Injection using CreateRemoteThread One of the methods of DLL injection is to create a RemoteThread and load the desired DLL into the target process.  This is one of the simplest and most widely used methods.  CreateRemoteThread You can create a thread in another process using the API. CreateRemoteThread If you browse on MSDN, you'll see the following in Remarks: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createremotethread   CreateRemoteThread function (processthreadsapi.h)-Win32 apps Creates a thread that runs in the virtual address space of another process. docs.microsoft.com Terminal Services isolates each terminal session by design.  Therefore,  CreateRemoteThread  fails if the target process is in a different session than the calling process. In translation, Terminal Services Pros say that if the target process is running in a different session, it will fail because the session is specified and executed