This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERES UN CRACK! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script: ~/dam1_scp_actividad1.sh | |
# Uso: Ejecutar como root o con sudo en Ubuntu Server | |
# Crear usuarios y grupos | |
sudo groupadd dev_team | |
sudo groupadd auditors | |
sudo useradd -m -G dev_team usuario_desarrollador | |
sudo useradd -m -G auditors usuario_auditor | |
echo "usuario_desarrollador:dam1" | sudo chpasswd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
base_dir=~/caso_sospechoso | |
# Crear estructura de directorios | |
mkdir -p $base_dir | |
mkdir $base_dir/logs | |
mkdir $base_dir/tmp | |
mkdir $base_dir/config | |
mkdir $base_dir/users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASE=~/seguridad_informatica | |
mkdir -p $BASE/{documentos,logs/{nuevos,antiguos},binarios,backups,usuarios/.secretos,scripts,test,reportes/red,reportes/usuarios} | |
# Archivos en documentos | |
echo "Informe confidencial sobre vulnerabilidades del sistema." > $BASE/documentos/informe.txt | |
echo "Lista de contraseñas comprometidas." > $BASE/documentos/.passwords.txt | |
echo "Top 10 exploits recientes." > $BASE/documentos/exploits_recientes.txt | |
echo "Ejemplo de phishing detectado." > $BASE/documentos/email_falso.eml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tweaked from: https://stackoverflow.com/a/42718113/1170664 | |
func getXML(url string) ([]byte, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return []byte{}, fmt.Errorf("GET error: %v", err) | |
} | |
defer resp.Body.Close() | |
if resp.StatusCode != http.StatusOK { | |
return []byte{}, fmt.Errorf("Status error: %v", resp.StatusCode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"syscall/js" | |
) | |
func editionMode(this js.Value, args []js.Value) interface{} { | |
if len(args) != 1 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="main" class="center"> | |
<h1>Webassembly tutorial<h1> | |
<h2 id="description">JSON Beautifier Online service</h2> | |
<div> | |
<label for="input">Raw JSON</label> | |
<textarea rows="10" cols="100" id="input" name="input" onfocus="editionMode(this)" onblur="prettify(this)"></textarea> | |
</div> | |
<div> | |
<label for="output">Pretty JSON</label> | |
<textarea rows="10" cols="100" id="output" name="output" readonly="true"></textarea> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"strings" | |
"syscall/js" | |
) | |
func main() { | |
document := js.Global().Get("document") | |
input := document.Call("getElementById", "description"). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="main" class="center"> | |
<h1>Webassembly tutorial<h1> | |
<h2 id="description">Sample 6 | Reading the HTML content from Go</h2> | |
<h2 id="descriptionUppercase"></h2> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"syscall/js" | |
"time" | |
) | |
func main() { | |
document := js.Global().Get("document") | |
message := document.Call("getElementById", "description") |
NewerOlder