View json2csv.py
import json | |
import csv | |
# Read JSON File | |
with open('users.json') as json_file: | |
data = json.load(json_file) | |
user_data = data['users'] | |
# Prepare CSV file |
View GeoLocationTest.html
<!DOCTYPE HTML> | |
<HTML> | |
<HEAD> | |
<TITLE>PSR Geo Location Test</TITLE> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" | |
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" | |
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" | |
crossorigin=""></script> |
View truecryptMountUnmount.bat
@echo off | |
set TrueSource=E:\ProgramFiles\TrueCrypt\truecrypt | |
set Source=E:\ProgramFiles\TrueCrypt\test | |
set Drive=P: | |
set KeyFile=E:\ProgramFiles\TrueCrypt\keyfile1 | |
set Password=abcd1234ABCD!@#$ | |
set BrowserPath="C:\Program Files (x86)\Internet Explorer\iexplore.exe" | |
set WebSite=ELS | |
set URL="http://localhost:86" |
View PostgreConnectionTest.java
/* | |
* This Java source file was to test the database connection. | |
*/ | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; |
View CommandInjectionExample.java
/* | |
* Assuming user has folder "Important" -> C:/Important | |
* The folder has confidential data | |
* In this example, we are trying to show the command injection attack | |
*/ | |
public class CommandInjectionExample { | |
public static void main(String[] args) { | |
evalScript(); | |
} |
View ConvertCurrencyToEnglish.txt
Function ConvertRupeesToEnglish(ByVal MyNumber) | |
Dim Temp | |
Dim Rupees, Paise | |
Dim DecimalPlace, Count | |
ReDim Place(9) As String | |
Place(2) = " Thousand " | |
Place(3) = " lakh " | |
Place(4) = " Crore " | |
View deleteAllUserObjects.sql
BEGIN | |
FOR record IN (SELECT object_name, object_type | |
FROM user_objects | |
WHERE object_type IN | |
('TABLE', | |
'VIEW', | |
'PROCEDURE', | |
'FUNCTION', | |
'SEQUENCE', | |
'TYPE', |
View dos2unixfolder.bat
for /f "tokens=* delims=" %%a in ('dir . /s /b') do ( | |
"dos2unix.exe" %%a | |
) |