Showing posts with label File-Sharing. Show all posts
Showing posts with label File-Sharing. Show all posts

Mounting Samba File Sharing on Linux / Ubuntu system within single command

The command used to mount Samba file sharing is 'gio'(gnome input/output) utility.
 gio mount smb://<server_address>/<share>
Where we need to provide three things :
  • Username
  • WORKGROUP
  • Password
Example :
 $ gio mount smb://192.168.56.101/Anonymous
 Password required for share anonymous on 192.168.1.100
 User [ajay]: Anonymous
 Domain [WORKGROUP]: WORKGROUP
 Password: <-------Password_here
Automating the whole Process with a Shell script :
File : smbmount.sh
#!/bin/bash
# Mount smb file server with below credentials 
# Name : Anonymous
# WORKGROUP : WORKGROUP
# Password : Anonymous

echo -e "Anonymous\nWORKGROUP\nAnonymous" | gio mount \
smb://192.168.1.100/Anonymous >> /dev/null 2>&1

Creating an alias for smbmount.sh in .bashrc file :

Open your '.bashrc' file on any editor and at the last line add this :
 alias smbmount="~/scripts/smbmount.sh"
I put script at "~/scripts/smbmount.sh", you can change it accoring to your location. Now open a new terminal and type 'smbmount' to mount smsb share on your destro.
 $ smbmount
Cheers !!
Read more »

How to Copy/Sync Files and Directories with Rsync in Linux : A Beginners Guide to Rsync

Rsync is a very flexible network-enabled syncing tool. It is a powerful tool that facilitates the transfer and synchronization of data between both local and remote systems. Rsync stands for "remote sync". It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed.
Read more »

Curl for Web Hacking and Pentesting

In the previous post we saw the basic uses of curl. Now at this we are going to see some useful and important command as web pentesting view.

1. Get the HTTP response header

We can get header information of a website with '-I' flag
 curl -I http://www.w3.org
2. Sending GET Requests
 curl "http://www.testserver.com/example.php?name=hacke&age=30"
3. Sending POST requests 
 curl -d "name=ajay&submit=Submit" http://www.testserver.com/example.php
4. To follow a redirect location:
 curl -L http://www.testserver.com
5. Sending custom Headers : 
 curl -H "user-agent:Mozilla/5.0 (X11; Linux x86_64) " http://www.testserver.com
 curl -H "Content-Type: text/xml" http://www.testserver.com
 curl -H "Host: www.unknownsite.com" http://www.testserver.com
6. Custom User-Agent Header :

We can send custom user agent header by '-A' flag
 curl -A "Mozilla/5.0 (X11; Linux x86_64)" http://www.testserver.com
 curl -A "Mozilla/5.0 (compatible;  Windows NT 5.0)" http://www.testserver.com
7. Custom Referrer field :
 curl -e http://referersite.com http://www.testserver.com
Or we can also send custom referrer with below command
 curl -H "Referrer: http://referersite.com"  http://www.testserver.com
8. Custom Cookies : 

To send custom cookies use '-b' flag
 curl -b "name=sectree" http://www.testserver.com
To store response cookies in a file use '-c' option. We can also send cookies which is stored in a file.
 curl -b current_cookies.txt -c new_cookies.txt http://www.testserver.com
where the current_cookies.txt are being sent to the web server and new_cookies.txt are response cookies by the server which is stored and written in that file.


Read more »

How to use Curl in Linux : Curl Guide For beginners

Curl is a command line tool for getting or sending files using URL syntax. It is used to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction. We can use curl for download files from internet, sending custom HTTP ( GET and POST ) request, as FPT client, sending e-mails etc. Curl can be used in many different and interesting ways. Some of the main features of curl is :
Read more »

How to Map a Network Drive in Windows 7/8/10


In windows Mapping a Shared Folder or Shared Drive into a Network Drive is very easy task. When we map a Shared Folder or Shared Drives into a Network Drive, then it will show up as a new drive in the 'My Computer' or 'This PC' in windows 10. So we can easily access the shared files and documents we need, just like local hard drive. Now follow the below steps To Map a Network Drive :

Read more »

How to Share Folders/Drives and Map Network Drives in Windows 7, 8 and 10 on your Home Network

Public folder sharing in Windows based system is suitable for anyone who wish to share files with many users on their and Lan network quickly. Sharing a folder or an entire hard drive with computers, connected over Home or Lan network has a number of benifits. All the computers and devices on the network can access the shared resource.

Read more »