This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def download_photo(obc, local): | |
data = system.obc.read_file(obc) | |
with open(local, 'wb') as f: | |
f.write(data) | |
result = [] | |
rem = data[4:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import threading | |
import time | |
import gc | |
for i in xrange(0, 100): | |
print i | |
port = serial.Serial(port='\\\\.\\COM8', baudrate = 250000, rtscts = True, writeTimeout=None) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NCalcVerifyNames : LogicalExpressionVisitor | |
{ | |
private readonly ITestOutputHelper _output; | |
public NCalcVerifyNames(ITestOutputHelper output) | |
{ | |
_output = output; | |
} | |
public override void Visit(LogicalExpression expression) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pather.Commands.Run | |
[<Verb("run", HelpText = "Run process with given path set")>] | |
type Args = { | |
[<Option('f', "file", Required = true, HelpText = "Input file")>]File: string; | |
[<Option('g', "group", Default = "default", HelpText = "Name of group to use")>]Group: string; | |
[<Option('m', "mode", Default = PathSet.MergeKind.Append, HelpText = "Pathset merge mode")>]Mode: PathSet.MergeKind; | |
[<Value(0, HelpText = "Command to run", Required = true)>]Command: string; | |
[<Value(1, HelpText = "Command args")>]Args: string seq | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="_AddInjections"> | |
<ItemGroup> | |
<Injections Include="Injection.x86"> | |
<Arch>x86</Arch> | |
</Injections> | |
<Injections Include="Injection.x64"> | |
<Arch>x64</Arch> | |
</Injections> | |
</ItemGroup> | |
<ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Collections.Immutable | |
CommandLineParser | |
PeNet | |
Antlr4.Runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let findFunction (processHandle: IntPtr) (library: string) (name: string) = | |
let library = ToolHelp.createSnapshot(ToolHelp.SnapshotFlags.Module ||| ToolHelp.SnapshotFlags.Module32) (GetProcessId(processHandle)) | |
|> ToolHelp.modules | |
|> Seq.find (fun m -> m.ModuleName.Equals(library, StringComparison.InvariantCultureIgnoreCase)) | |
let peFile = PeFile(library.ModulePath) | |
let func = peFile.ExportedFunctions |> Seq.find (fun f -> f.Name.Equals(name)) | |
library.BaseAddress + (nativeint func.Address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<DllImport("kernel32.dll", SetLastError = true)>] | |
extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, int * lpNumberOfBytesWritten); | |
[<DllImport("kernel32.dll", SetLastError = true)>] | |
extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, IntPtr dwSize, AllocationType flAllocationType, MemoryProtection flProtect); | |
[<DllImport("kernel32.dll")>] | |
extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, UInt32 dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, UInt32 dwCreationFlags, IntPtr * lpThreadId); | |
[<DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
let rec loop () = | |
let c = char (Console.Read()) | |
let response = match c with | |
| 'E' -> "echo" | |
| 'S' -> | |
let varName = Console.ReadLine() | |
let varValue = Console.ReadLine() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.io.IOException; | |
import org.kohsuke.github.GHCommitState; | |
import org.kohsuke.github.GHRepository; | |
import org.kohsuke.github.GitHub; | |
public class Program { |