Skip to content

Instantly share code, notes, and snippets.

View shriyanss's full-sized avatar
😁

Shriyans Sudhi shriyanss

😁
View GitHub Profile
@shriyanss
shriyanss / neo-6m-gps-read-rpi.py
Created December 27, 2024 14:58
Read GPS from Neo-6M GPS Module on a Raspberry Pi
import re
latitude = None
longitude = None
def parse_gprmc(sentence):
"""Parse GPRMC sentence to extract and convert GPS coordinates."""
parts = sentence.split(',')
if len(parts) < 7 or parts[2] != 'A': # Check for valid data (A = Active)
return None, None
# this script automatically set up required drivers for alfa awus036ach
# this script has been tested on Kali VM on M2 mac and Raspberry Pi
# it is expected to work on other systems also
sudo apt update -y
sudo apt install -y linux-headers-$(uname -r)
sudo apt install -y build-essential dkms
sudo apt install -y realtek-rtl88xxau-dkms
git clone https://github.com/aircrack-ng/rtl8812au
cd rtl8812au
make
@shriyanss
shriyanss / sql-insert.md
Last active January 7, 2025 19:09
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