Skip to content

Instantly share code, notes, and snippets.

View Metnew's full-sized avatar

Vladimir Metnew Metnew

View GitHub Profile
@Metnew
Metnew / calling_printf_osx.c
Created November 12, 2023 19:32 — forked from P1kachu/calling_printf_osx.c
Calling printf in OSX - The overkill way
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
#include <mach-o/dyld_images.h>
#include <mach/mach_vm.h>
/* Dyld is the OSX Dynamic Linker
* /usr/include//mach-o/loader.h
module.exports = [
{
service: "AWS/S3",
banner: ["The specified bucket does not exist"]
},
{ service: "Bitbucket", banner: ["Repository not found"] },
{
service: "Campaign Monitor",
banner: ["'Trying to access your account?'"]
},
module.exports = [
{
service: "AWS/S3",
banner: ["The specified bucket does not exist"]
},
{ service: "Bitbucket", banner: ["Repository not found"] },
{
service: "Campaign Monitor",
banner: ["'Trying to access your account?'"]
},
module.exports = [
{
service: "AWS/S3",
banner: ["The specified bucket does not exist"]
},
{ service: "Bitbucket", banner: ["Repository not found"] },
{
service: "Campaign Monitor",
banner: ["'Trying to access your account?'"]
},
var cards = document.querySelectorAll('.mn-connection-card')
var modalTop = document.querySelector('#artdeco-modal-outlet')
cards.forEach((card, i) => {
console.log(card)
var date = card.querySelector('.time-badge.time-ago').innerText
if (date.includes('год')) {
var name = card.querySelector('span.mn-connection-card__name').innerText
var career = card.querySelector('span.mn-connection-card__occupation').innerText
var optionsBtn = card.querySelector('li-icon[type="ellipsis-horizontal-icon"]')
@Metnew
Metnew / info.plist
Created February 10, 2019 18:23
XProtect matches
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Description</key>
<string>OSX.28a9883</string>
<key>LaunchServices</key>
<dict>
<key>LSItemContentType</key>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Metnew
Metnew / pure.c
Created January 6, 2019 22:34
Shells
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
int main(int argc, char *argv[])
{
struct sockaddr_in sa;
#!/bin/bash
objdump -d "${1}" | grep -Eo '\$0x[0-9a-f]+' | cut -c 2- | sort -u | while read const; do echo $const | python -c 'import sys, struct; sys.stdout.write("".join(struct.pack("<I" if len(l) <= 11 else "<Q", int(l,0)) for l in sys.stdin.readlines()))' > testcases/$const; done
i=0; strings "${1}"| while read line; do echo -n "$line" > testcases/string_${i} ; i=$[ $i + 1 ] ; done
@Metnew
Metnew / karabiner.json
Created December 22, 2018 17:50
my karabiner config
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,