Skip to content

Instantly share code, notes, and snippets.

@iomoath
iomoath / client_ip.php
Last active June 15, 2023 10:51
Get client actual IP address - Based on HTTP headers - Detect Transparent proxy
<?php
function get_client_ip()
{
try {
// Get real visitor IP behind CloudFlare network
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
$_SERVER["HTTP_CLIENT_IP"] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
@iomoath
iomoath / pfx2john.py
Created June 8, 2023 03:25 — forked from tijme/pfx2john.py
Python3 version of `pfx2john.py` from John the Ripper
#!/usr/bin/env python
# coding: utf-8
"""
Modified for JtR by Dhiru Kholia in July, 2016
Copyright (c) 2015 Will Bond <will@wbond.net>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@iomoath
iomoath / TwitterClient.cs
Created May 26, 2023 03:34 — forked from sdesalas/TwitterClient.cs
An ultra-lightweight Twitter client in C# using OAuth
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Cryptography;
using System.Linq;
using System.Text.RegularExpressions;
using System.Net;
using System.Web;
@iomoath
iomoath / ubuntu-18.04-pipenv.bash
Last active June 27, 2023 12:00 — forked from nareshganesan/ubuntu-18.04-pipenv.bash
Ubuntu 18.04 install python3 with pip and pyenv - for multiple python versions
# install dependencies
sudo apt install -y make build-essential \
python3 python-pip libpq-dev python3-dev libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
# pyenv for installing different python versions
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
# export pyenv path for python environments
@iomoath
iomoath / MorseCode.cs
Created March 27, 2023 05:47
Morse code encoder & decoder c#
using System;
using System.Collections.Generic;
namespace MorseEncoder
{
internal class Program
{
private static void Main()
{
var text = "welcome to the new age";
@iomoath
iomoath / install-squid.sh
Last active March 23, 2023 01:46 — forked from bl4ck5un/install-squid.sh
Install a basic squid proxy with authentication on Centos 6 x64. Just modify the variables at the top and run the script on a clean system.
#!/bin/sh
PROXY_USER=user-name
PROXY_PASS=user-pass
PROXY_PORT=5061
# Clear the repository index caches
yum clean all
# Update the operating system
@iomoath
iomoath / dnsstager_dns_traffic_filter_detect.py
Created March 10, 2022 13:49
Script to detect possible/similar DNS traffic generated by DNSStager tool
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import requests
import json
@iomoath
iomoath / tenable_domains.txt
Created March 9, 2022 05:46
Tenable domains , backend, updates - not fully confirmed
127.0.0.2 tenable.io
127.0.0.2 tenable.com
127.0.0.2 downloads.tenable.io
127.0.0.2 downloads.tenable.com
127.0.0.2 nessus.com
127.0.0.2 activation.nessus.com
127.0.0.2 downloads.nessus.com
127.0.0.2 downloads.nessus.com
127.0.0.2 tenable.sc
127.0.0.2 cloud.tenable.io
@iomoath
iomoath / key.md
Created December 30, 2021 23:12
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@iomoath
iomoath / twitter-tweet.py
Created December 23, 2021 23:51 — forked from BitTheByte/twitter-tweet.py
Script to tweet like the Official Twitter Application with 2fa support
# -*- coding: utf-8 -*-
from base64 import b64decode,b64encode
from urllib.parse import quote,parse_qs,urlsplit,urlparse
from random import randint
from bs4 import BeautifulSoup
import calendar
import requests
import hashlib
import base64