Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= fcgi - The New generation of FastCGI library for Ruby.
Version 0.9.2.1
== Depends
=== C version
=== Pure Ruby Version
== Install
$ gem install fcgi
== Usage === Class Method --- FCGI.accept Returns FCGI instance --- FCGI.each
--- FCGI.each_request
--- FCGI.is_cgi?
--- FCGI.each_cgi Automatically detects whether this program is running under the FastCGI environment, and generates a 'CGI' type object for each request. Also installs signal handlers for graceful handling of SIGPIPE (which may occur if a client gives up on a request before it is complete) and SIGUSR1 (generated by Apache for a 'graceful' exit)
If you are using the HTML output methods you can also pass the HTML type
e.g. FCGI.each_cgi('html3') do ... end
However, you should beware that the CGI library is quite slow when
used in this way, as it dynamically adds a large number of methods
to itself each time a new instance is created.
=== Instance Method --- FCGI#finish Finish
--- FCGI#in Returns Stream or StringIO
--- FCGI#out Returns Stream or StringIO
--- FCGI#err Returns Stream or StringIO
--- FCGI#env Returns Environment(Hash)
== Sample
Using the FastCGI native interface:
#!/usr/bin/ruby require "fcgi"
FCGI.each {|request| out = request.out out.print "Content-Type: text/plain\r\n" out.print "\r\n" out.print Time.now.to_s request.finish }
Using the CGI-compatible interface, which works both as a standalone CGI and under FastCGI with no modifications:
#!/usr/bin/ruby require "fcgi"
FCGI.each_cgi {|cgi| name = cgi['name'][0] puts cgi.header puts "You are #{name} " if name puts "Connecting from #{cgi.remote_addr}" }
Note: you can't reference CGI environment variables using ENV when under FastCGI. It is recommended that you use the CGI-generated methods, e.g. cgi.remote_addr as above.
If you need to access environment variables directly, perhaps extra ones set in your Apache config, then use cgi.env_table['REMOTE_ADDR'] instead. This isn't quite as portable because env_table is a private method in the standard CGI library.
== License
== Copyright
fcgi.c 0.1 Copyright (C) 1998-1999 Network Applied Communication Laboratory, Inc. 0.8 Copyright (C) 2002 MoonWolf moonwolf@moonwolf.com 0.9 Copyright (C) 2013 mva mva@mva.name Alpha, LLC
fastcgi.rb 0.7 Copyright (C) 2001 Eli Green fcgi.rb 0.8 Copyright (C) 2002 MoonWolf moonwolf@moonwolf.com fcgi.rb 0.8.5 Copyright (C) 2004 Minero Aoki
FAQs
Unknown package
We found that fcgi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.