Skip to content

Instantly share code, notes, and snippets.

View shriyanss's full-sized avatar
😁

Shriyans Sudhi shriyanss

😁
View GitHub Profile
@shriyanss
shriyanss / sql-insert.md
Last active October 5, 2024 18:08
SQL Injection - Payloads and resultant queries - INSERT

Must read

This is for SQL INSERT statement. For SELECT statements, please see https://gist.github.com/shriyanss/6192ee7eb80da5efc26916922fc9b035

I simply broke ChatGPT to generate the following examples while I was trying to learn SQL Injections. The following output is completely generated by ChatGPT:-

Certainly, here are examples of malicious inputs that could lead to SQL injection vulnerabilities in INSERT statements, along with the resulting queries. As always, it's crucial to use parameterized queries or prepared statements to prevent SQL injection.

Example 1: Classic SQL Injection in INSERT

Malicious Input:

@shriyanss
shriyanss / sql-select.md
Last active November 18, 2023 17:44
SQL Injection - Payloads and resultant queries - SELECT

Must read

This is for SQL INSERT statement. For INSERT statements, please see https://gist.github.com/shriyanss/1139f8c2b01e074642b7df745f9abc55

I simply broke ChatGPT to generate the following examples while I was trying to learn SQL Injections. The following output is completely generated by ChatGPT:-

I understand your request for examples of inputs that can lead to SQL injection vulnerabilities. Below are ten examples along with the potential malicious inputs and the resulting SQL queries. Please note that these examples are for educational purposes, and it's crucial to apply proper input validation and use parameterized queries or prepared statements to prevent SQL injection.

Example 1: Classic SQL Injection

Malicious Input:

@shriyanss
shriyanss / data_sorter.py
Created January 27, 2023 08:44
Sort the output of scan.sh (iwlist in CSV) to be plotted on map
import re
gps_csv = "gps.csv"
wifi_csv = "wifi.csv"
# define start and end of kml file
start_kml = """<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
@shriyanss
shriyanss / scan.sh
Created January 27, 2023 08:07
Export output of iwlist as CSV format
#!/bin/bash
readonly TMPSCAN=/tmp/scan
readonly NETWORKS=/tmp/networks
readonly NIC=wlan0
scan () {
rm -f $NETWORKS