This is actually pointer how to get download tool.
Mostly I use linux machine of-course at home also. Now any flavor of linux has it own repository so just google for youtube-dl package for your linux. Get it and install, then do man youtube-dl you will get to know how to use.
Coming to windows users, there is lot of exes available but really you are looking for script then got and get the source code of youtube-dl then... code is in your hand so do what ever you want.
Tuesday, October 1, 2013
youtube video downloader script or say command line tool
Tuesday, November 27, 2012
Increment mac address by count using tcl script
Below copied the proc used to increment physical address (mac) by given count.
proc incrmentMac { mac byCount} {
while { $byCount } {
set hexValues [ split $mac ":" ]
set position 5
set carryFwd 1
while { $carryFwd && [expr $position + 1]} {
set carryFwd 0
set hexVal [lindex $hexValues $position]
scan $hexVal "%x" decimal_value
incr decimal_value
set hexVal [format "%x" $decimal_value]
if { $hexVal == 100 } {
set hexValues [lreplace $hexValues $position $position "00"]
set carryFwd 1
incr position -1
} elseif { [string length $hexVal] == 1 } {
set hexValues [lreplace $hexValues $position $position "0$hexVal"]
set carryFwd 0
} else {
set hexValues [lreplace $hexValues $position $position "$hexVal"]
set carryFwd 0
}
}
set mac ""
for {set position 0 } {$position < 6} {incr position} {
if { $position == 0 } {
set mac "$mac[lindex $hexValues $position]"
} else {
set mac "$mac:[lindex $hexValues $position]"
}
}
incr byCount -1
}
return "$mac"
}
Tuesday, November 22, 2011
DNS(dnsmasq) on Fedora machine
Steps to Install and configure local DNS(dnsmasq) on Fedora machine
============================== =====================
Server side
~~~~~~~~
1, Download the dnsmasq software package from site http://www.thekelleys.org.uk/ dnsmasq/
Untar it and compile it
# tar -zxvf
# cd
# make
Or you can simply do
# yum install dnsmasq
2, Start service
# /etc/init.d/dnsmasq start
3, Append domain name and dhcp range information in /etc/dnsmasq.conf file
For example:
expand-hosts
domain=
dhcp-range=192.169.1.1,192. 169.1.100,168h
4, Append the dns entries in /etc/hosts file
For example
192.169.1.1 testhost1
192.169.1.2 testhost2
5, Stop the iptables
#service iptables stop
6, Restart the dnsmasq service
# /etc/init.d/dnsmasq restart
Client side
~~~~~~~~
1, Change nameserver IP address in /etc/resolv.conf file, Remove existing nameserver IP addresses and give the IP address of machine which is running dnsmasq
2, Send dns request
# host testhost1
It will give you the corresponding IP address you have configured in /etc/hosts file in dnsmasq server configuration.
For further clarifications you can visit http://www. enterprisenetworkingplanet. com/netos/article.php/10951_ 3377351_1
==============================
Server side
~~~~~~~~
1, Download the dnsmasq software package from site http://www.thekelleys.org.uk/
Untar it and compile it
# tar -zxvf
# cd
# make
Or you can simply do
# yum install dnsmasq
2, Start service
# /etc/init.d/dnsmasq start
3, Append domain name and dhcp range information in /etc/dnsmasq.conf file
For example:
expand-hosts
domain=
dhcp-range=192.169.1.1,192.
4, Append the dns entries in /etc/hosts file
For example
192.169.1.1 testhost1
192.169.1.2 testhost2
5, Stop the iptables
#service iptables stop
6, Restart the dnsmasq service
# /etc/init.d/dnsmasq restart
Client side
~~~~~~~~
1, Change nameserver IP address in /etc/resolv.conf file, Remove existing nameserver IP addresses and give the IP address of machine which is running dnsmasq
2, Send dns request
# host testhost1
It will give you the corresponding IP address you have configured in /etc/hosts file in dnsmasq server configuration.
For further clarifications you can visit http://www.
Monday, October 10, 2011
Basic WIFI packets and its functionality.
There is 3 types of frames exists
1) management frames
2) control frames
3) data frames
Management Frames
802.11 management frames enable stations to establish and maintain communications. The following are common 802.11 management frame subtypes:
- Authentication frame: 802.11 authentication is a process whereby the access point either accepts or rejects the identity of a radio NIC. The NIC begins the process by sending an authentication frame containing its identity to the access point. With open system authentication (the default), the radio NIC sends only one authentication frame, and the access point responds with an authentication frame as a response indicating acceptance (or rejection). With the optional shared key authentication, the radio NIC sends an initial authentication frame, and the access point responds with an authentication frame containing challenge text. The radio NIC must send an encrypted version of the challenge text (using its WEP key) in an authentication frame back to the access point. The access point ensures that the radio NIC has the correct WEP key (which is the basis for authentication) by seeing whether the challenge text recovered after decryption is the same that was sent previously. Based on the results of this comparison, the access point replies to the radio NIC with an authentication frame signifying the result of authentication.
- Deauthentication frame: A station sends a deauthentication frame to another station if it wishes to terminate secure communications.
- Association request frame: 802.11 association enables the access point to allocate resources for and synchronize with a radio NIC. A NIC begins the association process by sending an association request to an access point. This frame carries information about the NIC (e.g., supported data rates) and the SSID of the network it wishes to associate with. After receiving the association request, the access point considers associating with the NIC, and (if accepted) reserves memory space and establishes an association ID for the NIC.
- Association response frame: An access point sends an association response frame containing an acceptance or rejection notice to the radio NIC requesting association. If the access point accepts the radio NIC, the frame includes information regarding the association, such as association ID and supported data rates. If the outcome of the association is positive, the radio NIC can utilize the access point to communicate with other NICs on the network and systems on the distribution (i.e., Ethernet) side of the access point.
- Reassociation request frame: If a radio NIC roams away from the currently associated access point and finds another access point having a stronger beacon signal, the radio NIC will send a reassociation frame to the new access point. The new access point then coordinates the forwarding of data frames that may still be in the buffer of the previous access point waiting for transmission to the radio NIC.
- Reassociation response frame: An access point sends a reassociation response frame containing an acceptance or rejection notice to the radio NIC requesting reassociation. Similar to the association process, the frame includes information regarding the association, such as association ID and supported data rates.
- Disassociation frame: A station sends a disassociation frame to another station if it wishes to terminate the association. For example, a radio NIC that is shut down gracefully can send a disassociation frame to alert the access point that the NIC is powering off. The access point can then relinquish memory allocations and remove the radio NIC from the association table.
- Beacon frame: The access point periodically sends a beacon frame to announce its presence and relay information, such as timestamp, SSID, and other parameters regarding the access point to radio NICs that are within range. Radio NICs continually scan all 802.11 radio channels and listen to beacons as the basis for choosing which access point is best to associate with.
- Probe request frame: A station sends a probe request frame when it needs to obtain information from another station. For example, a radio NIC would send a probe request to determine which access points are within range.
- Probe response frame: A station will respond with a probe response frame, containing capability information, supported data rates, etc., when after it receives a probe request frame.
Control Frames
802.11 control frames assist in the delivery of data frames between stations. The following are common 802.11 control frame subtypes:
- Request to Send (RTS) frame: The RTS/CTS function is optional and reduces frame collisions present when hidden stations have associations with the same access point. A station sends a RTS frame to another station as the first phase of a two-way handshake necessary before sending a data frame.
- Clear to Send (CTS) frame: A station responds to a RTS with a CTS frame, providing clearance for the requesting station to send a data frame. The CTS includes a time value that causes all other stations (including hidden stations) to hold off transmission of frames for a time period necessary for the requesting station to send its frame. This minimizes collisions among hidden stations, which can result in higher throughput if you implement it properly.
- Acknowledgement (ACK) frame: After receiving a data frame, the receiving station will utilize an error checking processes to detect the presence of errors. The receiving station will send an ACK frame to the sending station if no errors are found. If the sending station doesn't receive an ACK after a period of time, the sending station will retransmit the frame.
Data Frames
Of course the main purpose of having a wireless LAN is to transport data. 802.11 defines a data frame type that carries packets from higher layers, such as web pages, printer control data, etc., within the body of the frame. When viewing 802.11 data frames with a packet analyzer, you can generally observe the contents of the frame body to see what packets that the 802.11 data frames are transporting.
--TBD-- other info added soon..
Subscribe to:
Posts (Atom)