Skip to content

Instantly share code, notes, and snippets.

View scmanjarrez's full-sized avatar
🧠
hungry mind

Sergio C scmanjarrez

🧠
hungry mind
  • Spanish National Research Council (CSIC)
  • Madrid
View GitHub Profile
@scmanjarrez
scmanjarrez / gist:cbfa6900349c090fcaec
Created March 20, 2016 18:24
Decode/decypher MEGA mega://enc? links
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mega Decrypter</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
</head>
<body>
<div class="header">
@scmanjarrez
scmanjarrez / lanzador_nuevo.sh
Created May 15, 2016 14:31
Corrector casero con las pruebas de la práctica SERVIDOR (Sistemas Operativos)
#!/bin/bash
#!/bin/zsh
########################################################################
# Descripción:
# Fichero auxiliar para el corrector.
#
########################################################################
PID_SRV=""
@scmanjarrez
scmanjarrez / testerDMUTEX
Last active May 16, 2016 11:42
Corrector casero con las pruebas de la práctica DMUTEX (Sistemas Distribuidos)
#!/bin/bash
test_run() # Command [args...] [| Command...] [<2>> redirections...]
{
echo "$ $@"
[ -x $1 ] || (echo "No existe el ejecutable $1"; exit 1)
"$@" > .fd1 2> .fd2
xtatus=$?
return $xtatus
}
@scmanjarrez
scmanjarrez / git-clearHistory
Created December 8, 2017 01:12 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@scmanjarrez
scmanjarrez / boot windows
Last active March 4, 2018 21:01
Change boot to grub from command line (windows)
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
if doesn't work, then:
bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi
@scmanjarrez
scmanjarrez / filter_monitor.js
Created March 14, 2018 17:06
filter alt+tab by monitor, need Alternatetab addon
// https://www.reddit.com/r/gnome/comments/507bqd/only_feature_im_missing_alttab_filterd_by_monitor/
// open lg and copypaste this
imports.ui.altTab.WindowSwitcherPopup.prototype._getWindowList = function() {
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
allWindows = allWindows.filter(w => w.get_monitor() === global.screen.get_current_monitor());
return allWindows;
}
@scmanjarrez
scmanjarrez / radare.md
Last active May 4, 2018 00:48
radare cheatsheet (official cheatsheet)

Radare2

Command line options

-L: List of supported IO plugins
-q: Exit after processing commands
-w: Write mode enabled
-i [file]: Interprets a r2 script
-A: Analyze executable at load time (xrefs, etc)
-n: Bare load. Do not load executable info as the entrypoint
@scmanjarrez
scmanjarrez / efi_boot.bat
Last active June 13, 2018 10:45
Change efi boot order
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
REM bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi
REM bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi
@scmanjarrez
scmanjarrez / setColorsSiko.py
Created May 11, 2018 02:03
change colors of calls and crypto-xor in IDA Pro, from https://practicalmalwareanalysis.com/setcolorssiko-py/
from idautils import *
from idc import *
#Color the Calls off-white
heads = Heads(SegStart(ScreenEA()), SegEnd(ScreenEA()))
funcCalls = []
for i in heads:
if GetMnem(i) == "call":
funcCalls.append(i)
print "Number of calls: %d" % (len(funcCalls))
@scmanjarrez
scmanjarrez / fkucortana.ps
Created August 17, 2019 19:34
fix the f***ng cortana index problem resulting in best match not clickable
Get-AppXPackage -Name Microsoft.Windows.Cortana | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}