This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SimplySimple

Pages: [1]
1
Anonymity and Privacy / Question about ScriptBlock
« on: June 19, 2015, 03:22:50 PM »
Hello All,

I have a question that was raised when I was looking into the anonymity of tor.
Basically I read,
That using ScriptBlock, no-script, etc. can be identifying.
Because when you whitelist sites, that whitelist travels with you to new sites.
So someone would be able to see the same whitelist going site to site.


What I don't understand is how the fuck does the site I'm going to know what sites I have whitelisted? Isn't that list kept locally and never given out?

Thank you,
Simple

EDIT: Just went though my whole history and can't find the site where I read this, ugh, how helpful.
EDIT2: Found it through Google
https://www.torproject.org/docs/faq.html.en#TBBJavaScriptEnabled


2
Networking / Re: Bridge LAN and WLAN
« on: June 08, 2015, 05:15:34 PM »
When you say you can access it from lan, do you mean the Desktop it is hosted on? Try from another device on lan if so.

3
Hacking and Security / Re: Data Recovery
« on: June 02, 2015, 05:59:36 PM »
EDIT: I just re-read you post and this isn't going to teach you data recovery, it simply does it.

I will be doing a post in a lot more detail on this.

But these linux tools are indispensable...

Testdisk
Photorec

I have used these countless times after fucking up a partition.

4
Networking / Re: Cisco Networking Question
« on: May 26, 2015, 06:42:58 PM »
I wouldn't waste the time doing CCENT. Especially if you're going for the CCNA anyway. Even more so if you're paying for it yourself. If you want the Knowledgebase you can get it without the cert... and if you have a CCNA you're going to be seen (by those who value certifications) as more competent than someone with a CCENT anyway... So why would you?


If you're doing it to build your resume, sure... but most companies would hire someone with experience over someone that is just highly certified. So I'd not waste the time certifying past CCNA, instead I'd invest more time working in the field.


Couldn't agree more with this.
Every person who has ONLY completed CCNA, is a fucking idiot. At least from my experience.


Those certs are good for Cisco specific knowledge, but Cisco isn't everything these days.
Well I supposed truly it matters on what you want to do.


I recommend you just setup some VM's and do some labs, best way to learn in my opinion.
You can use Vyos if you want something free but very similar to Cisco's IOS.




5
Scripting Languages / Bandwidth Monitoring Script
« on: May 12, 2015, 01:22:18 PM »
Hello All!

FILE ATTACHED

This is my first post to Evilzone, I just wanted to share what I have made.
Only reason I'm sharing this is because I could not, for the life of me, find
a simple program that sends alerts when bandwidth goes above a limit.

Originally I had everything in the one file; it was set-up as an if statement to
send an alert if the result from vnstat was above X. But since I use nagios
where I am implementing this, I set it up to use exit codes.

It works alone as well. It uses vnstat to retrieve the actual traffic.
Also you need bc to do calculations that are in decimal.


I hope this isn't too elementary for you guys.
Thanks

Code: (bash) [Select]
#!/bin/bash

#* Version 0.9 *#

if [[ `which vnstat` == $! ]]; then
echo;
echo "Sorry which can't find vnstat"
echo;
echo "vnstat can be installed by running these two commands"
echo;
echo "yum install -y epel-release"
echo "yum install -y vnstat"
echo;
echo "NOTE: yum may not be your package installer"
exit 3;
fi

 

####  Parsing user options  ####
function HELP() {
echo;
        echo "Usage: band -i interface -t sampletime -d trafficdirection -w warnthresh -c critthresh"
echo;
echo;
        echo " OPTIONAL: -i interface"
        echo "                  default eth0 - defined in vnstat.conf"
        echo " OPTIONAL: -t sampletime"
        echo "                  default 5 secs - defined in vnstat.conf"
        echo " OPTIONAL: -d {in|both|out}"
        echo "                  traffic coming in, out, or both, default is both"
echo " OPTIONAL: -w RXbit/s:TXbit/s"
        echo "                  warning threshold  NOTE: This is in bits per second"
echo " OPTIONAL: -c RXbit/s:TXbit/s"
        echo "                  critical threshold  NOTE: You must define warning threshold to modify critical threshold"
echo;
echo "Comming Soon - because it hurts my head to think about this"
echo;
echo " OPTIONAL: -b {bits|bytes}"
echo "                  default bits - this will change from bits to bytes"
echo " OPTIONAL: -u {K|M|G}"
echo " default is unabbreviated bits - this will abbreviate to Killobits, Megabits, Gigabits"
}

while [[ $# > 0 ]]; do
  key="$1"
  shift
  case $key in
-i) interface=$1; shift;;
-t) sampletime=$1; shift;;
-d) direction=$1; shift;;
-w) warn=$1; shift;;
-c) crit=$1; shift;;
*) HELP; exit 3;;
  esac
done

rxwarn="`echo $warn|cut -f1 -d":"`"
rxcrit="`echo $crit|cut -f1 -d":"`"
txwarn="`echo $warn|cut -f2 -d":"`"
txcrit="`echo $crit|cut -f2 -d":"`"

###########################################################
## Using getopts ##
## Here we check to make sure user has entered tresholds ##
OPT=""
extraParams=""
if [ -n "$interface" ]; then
        OPT="$OPT -i$interface"
vnface="-i $interface"
fi
if [[ $sampletime = 1 ]]; then
echo "Time must be more than 1 second"
exit 3;
fi
if [ -n "$sampletime" ]; then
        OPT="$OPT -t$sampletime"
fi
if [ -n "$direction" ]; then
        OPT="$OPT -d$direction"
fi
if [ -n "$warn" ]; then
        OPT="$OPT -w$warn"
warnthresh=$warn
else
echo "Need to specify warning threshold with -w #:#"
echo "Recommended start treshold is 20000"
echo "NOTE: This is in bit/s"
echo;
exit 3;
fi
if [ -n "$crit" ]; then
        OPT="$OPT -c$crit"
critthresh=$crit
else
echo "Need to specify critical threshold with -c #:#"
echo "Recommended start threshold is 80000"
echo "NOTE: This is in bit/s"
echo;
exit 3;
fi



####  Finding valid interfaces for error handling  ####
faces=(`ifconfig|grep 'Link encap'|awk '{print $1}'`)

foundface=0

for i in "${faces[@]}"
do
    if [[ $i == $interface || $interface == "" ]]; then
        foundface=1
    fi
done

if [ $foundface == 0 ]; then
echo "Sorry that is not an interface on this machine"
echo;
echo "Availble Interfaces:"
printf '%s\n' "${faces[@]}"
exit
fi

#### Gathering data using vnstat ####
vnstat=`vnstat -tr $sampletime $vnface`

########  Down Traffic Formating  ########
band="`echo "$vnstat"|grep rx|awk '{print $2}'`"

bando=`bc -l <<< "$band * 1000"`
## I use no decimals when calculating ##
bandf=${bando%.*}
## Kbit/s conversion ##
kband=`bc -l <<< "scale = 2; $bandf/1000"`

######## Up Traffic Formating  ########
up="`echo "$vnstat"|grep tx|awk '{print $2}'`"

upo=`bc -l <<< "$up * 1000"`
## I use no decimals when calculating ##
upf=${upo%.*}
## Kbit/s conversion ##
kup=`bc -l <<< "scale = 2; $upf/1000"`


###########################################################
########        if statements for tresholds        ########
###########################################################
if [[ $direction == "in" || $direction == "both" || $direction == "" ]];then
####  Down If  ####
if [[ $bandf -gt 0 && $bandf -lt $rxwarn ]]; then
echo "Ok - Machine RX idling @ $kband Kb/s"
RXEXITCODE=0
elif [[ $bandf -ge $rxwarn && $bandf -lt $rxcrit ]]; then
echo "Warning - Machine using RX bandwidth @ $kband Kb/s"
RXEXITCODE=1
elif [[ $bandf -ge $rxcrit ]]; then
echo "Critical - Machine using a lot of RX bandwidth @ $kband Kb/s"
RXEXITCODE=2
else
echo "Unkown - Unkown RX output"
RXEXITCODE=3
fi
fi


if [[ $direction == "out" || $direction == "both" || $direction == "" ]];then
####  Up If  ####
if [[ $upf -ge 0 && $upf -lt $txwarn ]]; then
        echo "Ok - Machine TX idling @ $kup Kb/s"
        TXEXITCODE=0
elif [[ $upf -ge $txwarn && $upf -lt $txcrit ]]; then
        echo "Warning - Machine using TX bandwidth @ $kup Kb/s"
        TXEXITCODE=1
elif [[ $upf -ge $txcrit ]]; then
        echo "Critical - Machine using a lot of TX bandwidth @ $kup Kb/s"
        TXEXITCODE=2
else
        echo "Unkown - Unkown TX output"
        TXEXITCODE=3
fi
fi


####  Nagios Exitcode Handling  ####
if [[ $RXEXITCODE == 0 && $TXEXITCODE == 0 ]];then
EXITCODE="0"
nagiosmsg="OK"
elif [[ $RXEXITCODE == 2 || $TXEXITCODE == 2 ]];then
EXITCODE="2"
nagiosmsg="Critical"
elif [[ $RXEXITCODE -le 1 || $TXEXITCODE -le 1 ]];then
EXITCODE="1"
nagiosmsg="Warning"
else
EXITCODE="3"
nagiosmsg="Unkown"
fi


exit $EXITCODE

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.