This file contains hidden or 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
| #include <windows.h> | |
| #include <stdio.h> | |
| // Inject a DLL into a process | |
| void Inject(HANDLE hProcess, const char* dllname, const char* funcname); | |
| // Program entry point | |
| int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) | |
| { | |
| // Structures for creating the process |
This file contains hidden or 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
| #include <windows.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <io.h> | |
| //----------------------------------------------------------------------------- | |
| // Codecave function | |
| VOID Codecave(DWORD destAddress, VOID (*func)(VOID), BYTE nopCount); |
This file contains hidden or 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
| $NTVerKeyPath = "Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | |
| $WindowsDisplayVersionObj = Get-ItemProperty -ErrorAction SilentlyContinue -Path "$NTVerKeyPath" -Name DisplayVersion | |
| $WindowsDisplayVersionObj | |
| $WindowsDisplayVersionObj.DisplayVersion |
This file contains hidden or 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
| $cfg = new-object -com "BssCfg815.BssCfg815" | |
| $cfg.settings.SetDefaults() | |
| $cfg.settings.access.SetDefaults() | |
| $cfg.settings.access.winGroups.Clear() | |
| $cfg.settings.access.winGroups.new.SetDefaults() | |
| $cfg.settings.access.winGroups.new.loginAllowed = $true | |
| $cfg.settings.access.winGroups.NewCommit() | |
| $cfg.settings.Save() |
This file contains hidden or 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
| test_name "puppetserver jruby does not retain Catalog objects in memory after requests finish" do | |
| tag 'audit:high', | |
| 'server' | |
| require 'puppet/acceptance/common_utils' | |
| extend Puppet::Acceptance::PackageUtils | |
| extend Puppet::Acceptance::ManifestUtils | |
| skip_test 'jruby is only available on server nodes' unless master |
This file contains hidden or 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
| // Close all open file descriptors above stderr | |
| #if defined(HAS_CLOSEFROM) | |
| closefrom(STDERR_FILENO + 1); | |
| #elif defined(HAVE_PROC_PID) | |
| uint64_t fd; | |
| const char* fdpath = "/proc/self/fd"; | |
| std::list<uint64_t> fd_list; | |
| if (is_directory(fdpath)) { | |
| for (const directory_entry& dent : directory_iterator(fdpath)) { |
This file contains hidden or 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
| include(FindDependency) | |
| find_dependency(UDEV DISPLAY "udev" HEADERS "libudev.h" LIBRARIES "udev") | |
| include(FeatureSummary) | |
| set_package_properties(UDEV PROPERTIES DESCRIPTION "A device manager for the Linux kernel" URL "http://www.freedesktop.org/wiki/Software/systemd") | |
| set_package_properties(UDEV PROPERTIES PURPOSE "Reports disks serial numbers.") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| #!/usr/bin/env python | |
| import shutil | |
| import os | |
| import glob | |
| import filecmp | |
| from timeit import timeit | |
| def number_of_tests(problem): | |
| return len([name for name in os.listdir('tests/%s' % problem) if os.path.isfile(os.path.join('tests', problem, name))]) / 2 |