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 main | |
import ( | |
"fmt" | |
"github.com/miekg/dns" | |
) | |
func main() { | |
// Create a DNS server instance | |
server := &dns.Server{Addr: ":53", Net: "udp"} |
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
Mix.install([ | |
:req, | |
:csv, | |
:parallel_stream | |
]) | |
Logger.configure(level: :info) | |
# Desktop.ini, /.git/config, /.DS_Store, /.subversion/config, | |
# Dockerfile, package.json, .env, appsettings.json, secrets.json |
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
/* | |
* CVE-2021-22555: Turning \x00\x00 into 10000$ | |
* by Andy Nguyen (theflow@) | |
* | |
* theflow@theflow:~$ gcc -m32 -static -o exploit exploit.c | |
* theflow@theflow:~$ ./exploit | |
* [+] Linux Privilege Escalation by theflow@ - 2021 | |
* | |
* [+] STAGE 0: Initialization | |
* [*] Setting up namespace sandbox... |
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
#source https://dzhavat.github.io/2019/07/09/making-http-requests-inside-azure-functions.html | |
const fetch = require("node-fetch"); // 1 | |
module.exports = async function (context, req) { // 2 | |
const accessToken = '...'; | |
const url = 'https://api.github.com/user'; | |
const headers = { | |
'Authorization': `token ${accessToken}` | |
}; |
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 HomeController : Controller | |
{ | |
private readonly ILogger<HomeController> _logger; | |
public HomeController(ILogger<HomeController> logger) | |
{ | |
_logger = logger; | |
} | |
public IActionResult Index() |
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
# New vs project cspoj file format appends .net framework version to output folder | |
# https://stackoverflow.com/questions/43602782/how-do-i-set-outputpath-in-a-visual-studio-2017-project-new-csproj-file-form | |
# Search for all projectfiles containing net472 and not AppendTargetFrameworkToOuputPath | |
Get-ChildItem -Recurse *.csproj | where { ($_ | Select-String net472) -and -not ($_ | Select-String AppendTargetFrameworkToOutputPath) } |
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
# source https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-debian-9 | |
sudo apt update | |
# let apt use package over https | |
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
# add docker gpg key | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
# add docker repository to apt | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
sudo apt update |
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
using Microsoft.Office.Interop.Excel; | |
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
namespace excelinterop | |
{ | |
class Program | |
{ |
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 main | |
import ( | |
"syscall" | |
"fmt" | |
) | |
func main() { | |
disk := "\\\\.\\C:" |
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 main | |
import( b64 "encoding/base64" | |
"fmt" | |
"log" | |
"flag" | |
"io/ioutil" | |
) | |
func main() { |
NewerOlder