Jump to content


Photo
- - - - -

Quick and dirty


  • Please log in to reply
4 replies to this topic

#1 dual

dual

    BinRev veteran

  • Agents of the Revolution
  • 1,196 posts
  • Gender:Male

Posted 10 August 2008 - 01:21 PM

So this thread is for those quick and dirty hacks that you don't even think about; those hacks that pop out of necessity and just stick around cuz they're useful. This first one came from a time when I was at a car dealership which provided wifi for waiting customers. They also provided access to their corporate intranet and I wanted a quick, automated way to see what was there.

It started with map...

#!/bin/bash
nmap -n -sP -PI $(ifconfig en1 | head -3 | tail -1 | awk '{print $2}' | awk -F. '{print $1"."$2"."$3}').1-254 | tee ~/map.txt

and then went to scanall, using scan...

#!/bin/bash
for i in $(grep "up\." ~/map.txt | awk '{print $2}'); do
		echo
		echo ">>> Scanning $i..."
		scan $i
done

#!/bin/bash
nmap -n -P0 -sS -O $1

And wrapped all up with now.

#!/bin/bash
map && scanall | tee ~/scanall.txt

Get an IP, type "now" and we're off. Yes, it's noisy and there's probably a better way to do it. They can be used individually as needed. So, what are your quick and dirties?

#2 operat0r

operat0r

    Dangerous free thinker

  • Members
  • 793 posts
  • Location:ops

Posted 11 August 2008 - 02:43 PM

ghetto wesside-ng:
http://forums.remote...ead.php?t=12767

http://rmccurdy.com/.../quickclean.exe ( or anything really in scripts ... )

working on some Bt3 scripts as soon as I get a laptop :(

#3 thenotwist

thenotwist

    Mack Daddy 31337

  • Members
  • 216 posts

Posted 12 August 2008 - 03:30 PM

I wanted a quick and easy way to extract the audio from YouTube (music)videos which are stored in one folder.
@ECHO OFF

IF "%1"=="" GOTO END

IF NOT EXIST %1 mkdir %1

FOR %%a in (*.flv) do helper.bat %1 %%a %2

:END

HELPER.BAT
SET _Path=%1
SET _FileName=%2
SET _FileName=\%_FileName:~0,-4%.mp3

FOR /f "tokens=1,2 delims=-" %%a in ("%_FileName%") do set _Interpret=%%a&set _SongTitle=%%b

SET _Interpret=%_Interpret:_= %
SET _SongTitle=%_SongTitle:_= %

ffmpeg -i %2 -acodec "copy" -title "%_SongTitle:~1,-4%" -author "%_Interpret:~1,-1%" %_Path%%_FileName%

IF "%3"=="-d" DEL %2

SET _Path=
SET _FileName=

Uses ffmpeg.

#4 thepcdude

thepcdude

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 353 posts
  • Location:Computer, Desk

Posted 12 August 2008 - 06:36 PM

Sorry to break the line of leetness, but I was always wondering how people get into those "databases" and "records" of doctor's offices, car dealerships. How exactly does this work? I just cant grab a clue about it. I would be really grateful if someone explained this to me. Thanks.

*******
Completely disregard this. :)

Edited by thepcdude, 13 August 2008 - 09:52 AM.


#5 thenotwist

thenotwist

    Mack Daddy 31337

  • Members
  • 216 posts

Posted 13 August 2008 - 07:41 AM

First of all, way to thread hijack! And I don't think anybody here is going to answer your question... you might want to check the forum rules.




BinRev is hosted by the great people at Lunarpages!