Skip to content

Instantly share code, notes, and snippets.

View siddicky's full-sized avatar

siddicky siddicky

View GitHub Profile
@siddicky
siddicky / testing-openai-parallel_tool_calls.ipynb
Created July 19, 2024 10:05
Testing OpenAI parallel_tool_calls
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@siddicky
siddicky / README.md
Last active April 16, 2024 22:30
LCEL Sequence chain preserving initial query and returning dict

Langchain Sequential Chain

Requirements

Construct a runnable which returns a dictionary with the following structure:

{
  "question": "Placeholder",
  "rude_response": "Output from chain one",
 "analysis": "Output from chain two"
@siddicky
siddicky / README.md
Last active March 2, 2024 04:46
Langchain: How do I define an output parser like a dictionary?

LangChain Market Analysis Tool (Example)

This Python tool leverages the LangChain framework to suggest products that could be successful in various industries and performs market analysis through parallel execution chains. It uses OpenAI's GPT-3.5 model for generating insights based on the given industry sector.

Features

  • Model Definitions: Defines Pydantic models for handling company, subsidiary, and ticker data, ensuring type safety and easy data manipulation.
  • Sequential Chains: Constructs a sequential chain for generating product suggestions within a specific industry.
  • Parallel Chains: Implements parallel execution chains to analyze multiple industries simultaneously, showcasing the power of RunnableParallel for concurrent data processing.
  • Dynamic Environment Configuration: Uses environment variables for OpenAI API credentials, promoting security and ease of configuration.
Host IP
192.168.100.1

Launch msfconsole

service postgresql start
sudo msfdb start
msfconsole -qr /home/siddicky/tools/multi-handler.rc
@siddicky
siddicky / main.py
Created August 29, 2023 06:26 — forked from jvelezmagic/main.py
QA Chatbot streaming with source documents example using FastAPI, LangChain Expression Language, OpenAI, and Chroma.
"""QA Chatbot streaming using FastAPI, LangChain Expression Language , OpenAI, and Chroma.
Features
--------
- Persistent Chat Memory:
Stores chat history in a local file.
- Persistent Vector Store:
Stores document embeddings in a local vector store.
- Standalone Question Generation:
Rephrases follow-up questions to standalone questions in their original language.
@siddicky
siddicky / troubleshooting.sh
Created May 8, 2023 14:32
Offensive-Security's troubleshooting script
#!/bin/bash
## Offensive-Security's troubleshooting script
## Last updated: 2017-03-20
## Bash colours
YELLOW="\033[01;33m"
BLUE="\033[01;34m"
BOLD="\033[01;01m"
RED="\033[01;31m"
@siddicky
siddicky / powershell_reverse_shell_vba.md
Last active April 1, 2023 11:35
PEN-200 Macro Generation

Generate powershell reverse shell

ps_gen.py

import sys
import base64

def help():
    print("USAGE: %s IP PORT" % sys.argv[0])
 print("Returns reverse shell PowerShell base64 encoded cmdline payload connecting to IP:PORT")
@siddicky
siddicky / Encoder.py
Created October 13, 2022 00:07
Python shellcode encoder
#!/usr/bin/env python3
import argparse
import binascii
def encode_caesar(buf, args):
return [(c + args.shift) % 256 for c in buf]
def encode_xor(buf, args):
return [(c ^ args.shift) % 256 for c in buf]
@siddicky
siddicky / PowerView-3.0-tricks.ps1
Created August 26, 2022 00:02 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set