Skip to content

Instantly share code, notes, and snippets.

View pacifiquem's full-sized avatar

Murangwa Pacifique pacifiquem

View GitHub Profile
@mugishap
mugishap / toPDF.ts
Created October 31, 2022 12:30
Simple function that transforms HTML to PDF.
import html2canvas from "html2canvas";
import jsPDF from "jspdf";
const exportPDF = () => {
const input = document.getElementById("documentID") as HTMLElement;
html2canvas(input, { logging: true, useCORS: true }).then((canvas) => {
const imgWidth = 290;
const imgHeight = 210;
const imgData = canvas.toDataURL("img/png"); transform canvas to an image
const pdf = new jsPDF("l", "mm", "a4"); // L is landscape, you can use whatever you want for example p to make it portrait

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@pacifiquem
pacifiquem / hello_world.asm
Created November 26, 2023 07:53
Hello World in assembly!
section .data
hello db 'Hello, World!',0
section .text
global _start
_start:
; write the string to stdout
mov eax, 4 ; system call number for sys_write
mov ebx, 1 ; file descriptor 1 is stdout
@pacifiquem
pacifiquem / input_output.asm
Created November 26, 2023 07:57
Get input from user (his/her) name and then print it to the screen by using ``assembly``!
section .data
msg db 'Enter your name: ', 0
msg_len equ $ - msg
buffer resb 64 ; Buffer to store the user's input
output_msg db 'Hello, ', 0
section .text
global _start