Sponsored Content
Full Discussion: Setting X-Forwarded-For In C
Top Forums Programming Setting X-Forwarded-For In C Post 302979416 by Azrael on Sunday 14th of August 2016 11:24:18 AM
Old 08-14-2016
Setting X-Forwarded-For In C

Question, I've been trying to find information for setting the X-Forwarded-For header in C programs, or basically how spoofing it works. I've seen how to do this in ruby, python, and even with curl. I tried searching Google for it, but have came up empty handed. Any links, examples or advice much appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

New ip setting

I want to change the IPsetting and the broadcast setting. With ipconfig I get this: hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet xx.17x.18x.xx netmask fffffff0 broadcast xx.17x.18x.xx ether yy:0:yy:b6:yy:xx What command(squence) do I use to... (6 Replies)
Discussion started by: kuultak
6 Replies

2. AIX

Timezone Setting

Hi On several AIX 5.3 LPARs the timezone is currrently set to: TZ=NZST-12NZDT,M9.5.0/02:00,M4.1.0/03:00 Daylight savings in NZ starts on Sun 28th Sep 2008, which is the fourth Sunday. Do I need to change my TZ variable to NZST-12NZDT,M9.4.0/02:00,M4.1.0/03:00 or will AIX interpret the fifth... (2 Replies)
Discussion started by: KiwiP
2 Replies

3. AIX

Syslog - Message forwarded from

I am not a Unix / AIX admin, but am working with one that doesn't seem to know how to set up syslog to forward messages to me the way I need them. Every message they send me has "Message forwarded from <insert host name here>:" but I need it to only have the host name. In the examples below,... (2 Replies)
Discussion started by: mlbillow
2 Replies

4. Fedora

Setting up Cronjob

Hi, I had to setup some cron jobs using crontab -e when logged in as root. I noticed that the jobs only run when the permissons on the shell script file are set to execute on root and other. Why does "other" have to have its execution permission set? (6 Replies)
Discussion started by: mojoman
6 Replies

5. UNIX for Dummies Questions & Answers

Need some help on setting up rsync

I need to "sync" a directory from a prod server to a test server. Rsync is working but it prompts for a password and I'd like to automate the process. The directory on the prod/source server is owned by root, and some subdirectories are only readable by root. On the test/destination servers, I can... (1 Reply)
Discussion started by: LAToro
1 Replies

6. Shell Programming and Scripting

alias setting

I want to set an alias to connect to sqlplus and also run a command while it it logs in. How can I do that? (4 Replies)
Discussion started by: som.nitk
4 Replies

7. Red Hat

Cronjob setting

Hi there There's a script I would like to run daily every 5 minutes and this job should restart every 12:03AM so it would append to a new file with the following day date format instead of running and updating continuously into one log. I am not sure of the syntaxing, what I did was to set it... (9 Replies)
Discussion started by: hedkandi
9 Replies

8. UNIX for Dummies Questions & Answers

Setting up Xlaunch

I have a Win7 laptop that I have installed Xming with Xlaunch so that I can remote a Solaris10 server. After the initial install on my Win7 machine what do I need to set and configure to be able to remote Solaris. This is my 3rd day working with Unix. (1 Reply)
Discussion started by: SIFT3R
1 Replies

9. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

10. UNIX for Dummies Questions & Answers

Is it possible that X11 can be forwarded through a SSH tunnel

I communicate with the server via a ssh tunnel, configured via Putty. Recently, I'm trying to forward the X11 through it, but it doesn't work. Is there any one work this way? Searched with google, but didn't find anything. Thx in adv. (2 Replies)
Discussion started by: sleepy_11
2 Replies
forw(1mh)																 forw(1mh)

Name
       forw - forward messages

Syntax
       forw [ msgs ] [ +folder ] [ options ]

Description
       Use to send one or more messages on to recipients who were not the original addressees.	All messages to be forwarded are encapsulated, and
       a message header is added.  Forwarded messages appear to originate from the forwarder and not the sender of the original message.

       You can specify the message which you want to forward by giving a msg argument.	You can supply one or more message numbers, or a range	of
       messages.   If  you  do not supply a message number, takes the current message.	You can also specify a message in another folder by giving
       the +folder argument.  This argument can be used in conjunction with the msg argument.

       An editor is invoked so that you can edit the forwarded message, or add text before or after the encapsulated message.  When you exit  from
       the  editor,  you  receive a prompt asking what you want to do with the completed draft.  This prompt usually takes the form What now?  See
       for more information on the options available.

       If you forward a number of messages, each forwarded message is encapsulated separately.	When received, the message is suitable for expand-
       ing with

       By  default, the mail system uses a standard message header for forwarded messages.  This is taken from the system file You can supply your
       own header by creating a file called in your Mail directory.  If this file exists, automatically uses the header in it when creating  draft
       messages.

       If  you	do not have a draft folder set up, creates your new draft in a file called in your Mail directory, usually This file must be empty
       before you can create a new draft, which means that you can only store one draft at a time.  If it is not empty, the mail system  will  ask
       you what you want to do with the existing contents.  The options are:

       quit	 Aborts leaving the draft intact.

       replace	 Replaces the existing draft with the appropriate message form.

       list	 Displays the draft message.

       refile	 Refiles the existing draft message in the specified folder, and provides a new message form for you to complete.

       If you want to be able to have more than one draft message at a time, you can set up a draft folder in your This allows you to keep as many
       unsent drafts as space allows, and still create new messages as you wish.  To do this, make sure that the following line is in your
       Draft-folder: +drafts
       For more information on how to do this, see

       If you set up a draft folder, all draft messages are created in that folder.  If you decide not to send the draft, by typing  at  the  What
       now?  prompt,  the  message is stored in the draft folder.  You can then re-edit the message, or send it at a later date, by using the -use
       option to the command.

       If you use as your editor, you can specify the -prepend option to in the file.  If you do this, any text you add is entered before the for-
       warded messages.  See for details of the other options.

Options
       -annotate
       -noannotate
		 Annotates the message you are forwarding.  The following lines are added to the message that you are forwarding:
		 Forwarded: date
		 Forwarded: address(es)
		 The  first  line  records  the time at which the message was forwarded; the second records the addresses of the recipients of the
		 forwarded message.

		 The command only annotates messages when they are successfully sent.  If you do not send the message  immediately  and  file  the
		 unsent  draft,  it will not be annotated.  It is also possible to confuse by using to send the message, and renumbering it before
		 it is sent, for example by using to reorder the folder.

       -draftfolder foldername
       -nodraftfolder
		 Specifies the folder in which the draft message is created.  If you do not send the draft, the mail system will store it in  this
		 folder.

		 This option is usually set up in your See for more information.  If you have this option set up, you can override it by using the
		 -nodraftfolder option.

       -draftmessage filename
		 Specifies the file in which the draft message is created.  If no absolute pathname is given, the file is assumed to  be  in  your
		 Mail directory, usually If you do not send the message, it is stored in the named file until you delete it, or send it at a later
		 date.

       -editor editorname
		 Specify the editor that you want to use to edit your forwarded message.  You can supply the name of any approved ULTRIX editor.

       -filter filterfile
		 Reformats (filters) the forwarded messages prior to inclusion in the draft message.  If you do not specify -filter, the forwarded
		 messages are included in the draft exactly as they appear.  This option allows you to re-format them according to instructions in
		 a named filter file.  This must be an mhl file; see for more information.

		 The -format option also re-formats messages before encapsulating them in the draft.  However, -format always re-formats according
		 to  the  instructions	in  the default file.  The -filter option allows you to use your own, named filter file to format the mes-
		 sages.

       -form formfile
		 Specifies the message header to be used in the draft message.	If this option is present, takes the header of the  draft  message
		 from  the  named file.  If this option is not present, the header is taken from the file in your Mail directory, or failing that,
		 from the mail system default header.  However, the -form option overrides both of these.

       -format
       -noformat Reformats the messages to be forwarded before enclosing them in the draft message.  If this option is not supplied, the forwarded
		 messages  are	included  in  the  draft  exactly  as they appear.  With the -format option, the forwarded message is re-formatted
		 according to the instructions in the file in your Mail directory.  If this file does not exist, the message is formatted  accord-
		 ing to the system file The file is an mhl file; see for more information.

		 You  can  also use the -filter filterfile option to re-format messages.  The difference is that -format always takes its instruc-
		 tions from the file.  With -filter, you can specify the name of the filter file you want to use.

       -help	 Prints a list of the legal options to this command.

       -inplace
       -noinplace
		 Causes annotation to be done in place, to preserve links to the annotated message.  This option only  works  with  the  -annotate
		 option.

       -noedit	 Suppresses editing of the draft message altogether.

       -whatnowproc program
       -nowhatnowproc
		 Specifies  an	alternative  program.  Normally, invokes the default program.  See for a discussion of available options.  You can
		 specify your own alternative to the default program using the -whatnowproc program option.  If you do specify your  own  program,
		 you should not call it

		 You  can  suppress  the program entirely by using the -nowhatnowproc option.  However, as the program normally starts the initial
		 edit, the -nowhatnowproc option will prevent you from editing the message.

       The following are defaults for this command:

	      +folder defaults to the current folder
	      msgs defaults to the current message
	      -noannotate
	      -nodraftfolder
	      -noformat
	      -noinplace

Profile Components
       Path:	       To determine your Mail directory
       Draft-Folder:   To find the default draft folder
       Editor:	       To override the default editor
       Msg-Protect:    To set mode when creating a new message (draft)
       fileproc:       Program to refile the message
       mhlproc:        Program to filter messages being forwarded
       whatnowproc:    Program to ask the "What now?" questions

Files
       The default system template for forwarded messages.

       The user-supplied alternative to the default system template.

       The user-supplied alternative to the system message template
		 used with -digest.

       The default message filter.

       The user-supplied alternative to the default system message filter.

       The user profile.

       The draft file.

See Also
       comp(1mh), dist(1mh), refile(1mh), repl(1mh), send(1mh), whatnow(1mh)
       Proposed Standard for Message Encapsulation (RFC 934)

																	 forw(1mh)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy