├── installer ├── useNativeLAF ├── README ├── shortcutSpec.xml └── izpack.xml ├── frozenlibs ├── chardet:chardet:jar:1.0 ├── htmlparser:htmlparser:jar:1.5 ├── chardet-1.0.jar └── htmlparser-1.5.jar ├── server.p12 ├── lib ├── chardet.jar ├── openamf.jar ├── W32WinInet.dll ├── bsf-2.3.0.jar ├── bsh-2.0b1.jar ├── concurrent.jar ├── htmlparser.jar ├── p11-capi.dll ├── jcifs-1.3.14.jar ├── jhall-2.0_02.jar ├── xalan-2.7.1.jar ├── xmlsec-1.4.3.jar ├── jcommon-1.0.16.jar ├── joda-time-2.1.jar ├── tagsoup-1.0rc2.jar ├── jfreechart-1.0.13.jar ├── openid4java-0.9.7.jar ├── bcpkix-jdk15on-148.jar ├── bcprov-jdk15on-148.jar ├── flex-messaging-core.jar ├── commons-logging-1.0.4.jar ├── flex-messaging-common.jar ├── flex-messaging-remoting.jar └── help.jnlp ├── webscarab_logo.gif ├── doc ├── userguide │ ├── proxies.png │ └── tools.html └── certificates.html ├── src ├── org │ └── owasp │ │ └── webscarab │ │ ├── webscarab_logo.gif │ │ ├── plugin │ │ ├── identity │ │ │ ├── IdentityStore.java │ │ │ ├── FileSystemStore.java │ │ │ ├── TokenParser.java │ │ │ ├── ScriptableIdentity.java │ │ │ ├── Transition.java │ │ │ └── CookieTokenParser.java │ │ ├── proxy │ │ │ ├── swing │ │ │ │ └── ProxyPluginUI.java │ │ │ ├── BeanShellUI.java │ │ │ ├── ManualEditUI.java │ │ │ ├── ProxyPlugin.java │ │ │ ├── ProxyUI.java │ │ │ ├── ListenerSpec.java │ │ │ └── ScriptableConnection.java │ │ ├── sessionid │ │ │ ├── SessionIDListener.java │ │ │ ├── Calculator.java │ │ │ ├── SessionIDAnalysisUI.java │ │ │ ├── SessionIDStore.java │ │ │ ├── SessionID.java │ │ │ └── swing │ │ │ │ └── BigRenderer.java │ │ ├── fuzz │ │ │ ├── FuzzSource.java │ │ │ ├── sql.txt │ │ │ ├── FuzzerListener.java │ │ │ ├── FuzzerEvent.java │ │ │ ├── RegexSource.java │ │ │ └── xss.txt │ │ ├── CredentialManagerUI.java │ │ ├── fragments │ │ │ ├── FragmentListener.java │ │ │ ├── FragmentsStore.java │ │ │ └── swing │ │ │ │ └── FragmentsFrame.form │ │ ├── scripted │ │ │ ├── ScriptedUI.java │ │ │ └── script.bsh │ │ ├── ScriptListener.java │ │ ├── manualrequest │ │ │ ├── ManualRequestModel.java │ │ │ └── ManualRequestUI.java │ │ ├── DomainCredential.java │ │ ├── BasicCredential.java │ │ ├── saml │ │ │ ├── Occurences.java │ │ │ ├── SignatureType.java │ │ │ ├── Wrapper.java │ │ │ ├── SamlProxyListener.java │ │ │ ├── SamlSignatureException.java │ │ │ ├── VerifyReference.java │ │ │ ├── SamlProxyConfig.java │ │ │ └── swing │ │ │ │ └── SamlReplayConversationAction.java │ │ ├── FrameworkUI.java │ │ ├── PluginUI.java │ │ ├── openid │ │ │ ├── OpenIdProxyConfig.java │ │ │ ├── AXFetchRequestAttribute.java │ │ │ ├── swing │ │ │ │ ├── AssociationOPUrlAction.java │ │ │ │ ├── AssociationSessionComboBoxModel.java │ │ │ │ └── AssociationTableModel.java │ │ │ ├── AXFetchResponseAttribute.java │ │ │ └── PAPEResponse.java │ │ ├── ScriptableConversation.java │ │ ├── spider │ │ │ ├── SpiderUI.java │ │ │ └── Link.java │ │ └── Hook.java │ │ ├── ui │ │ └── swing │ │ │ ├── WebScarabUI.java │ │ │ ├── editors │ │ │ ├── XMLPanel.form │ │ │ ├── ImagePanel.form │ │ │ ├── ByteArrayEditor.java │ │ │ ├── HTMLPanel.form │ │ │ ├── MultiPartPanel.form │ │ │ └── HexPanel.form │ │ │ ├── MessagePanel.form │ │ │ ├── EnabledBooleanTableCellRenderer.java │ │ │ ├── ContentPanel.form │ │ │ ├── DateRenderer.java │ │ │ ├── UrlFilteredConversationModel.java │ │ │ ├── SwingPluginUI.java │ │ │ └── UrlTreeRenderer.java │ │ ├── httpclient │ │ ├── Authenticator.java │ │ ├── ConversationHandler.java │ │ ├── CertificateRepository.java │ │ ├── HTTPClient.java │ │ ├── ClientTrustManager.java │ │ └── ChunkedOutputStream.java │ │ ├── model │ │ ├── UrlListener.java │ │ ├── ConversationListener.java │ │ ├── FrameworkListener.java │ │ ├── UrlModel.java │ │ ├── UrlEvent.java │ │ ├── ConversationEvent.java │ │ ├── ConversationModel.java │ │ ├── FrameworkEvent.java │ │ ├── NamedValue.java │ │ └── StoreException.java │ │ ├── util │ │ ├── RFC2822.java │ │ ├── NullComparator.java │ │ ├── CharsetUtils.java │ │ ├── swing │ │ │ ├── TreeUtil.java │ │ │ ├── ProgrammaticConversationColumnDataModel.java │ │ │ ├── ColumnDataListener.java │ │ │ ├── ColumnDataEvent.java │ │ │ ├── treetable │ │ │ │ ├── AbstractCellEditor.java │ │ │ │ ├── AbstractTreeTableModel.java │ │ │ │ └── TreeTableModel.java │ │ │ ├── NoWrapEditorKit.java │ │ │ ├── DOMTreeModel.java │ │ │ ├── ExceptionHandler.form │ │ │ └── HeapMonitor.java │ │ ├── LogOutputStream.java │ │ └── TextFormatter.java │ │ ├── Main.java │ │ └── parser │ │ └── ContentParser.java └── javax │ └── net │ └── ssl │ └── X509ExtendedTrustManager.java ├── ChangeLog ├── .gitignore ├── scripts ├── no-images.bsh ├── multipartify.bsh ├── forcebrowse.bsh └── webgoat-session-brute.bsh ├── README ├── test └── resources │ └── log4j.xml ├── izpack ├── shortcutSpec.xml └── install.xml └── INSTALL /installer/useNativeLAF: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frozenlibs/chardet:chardet:jar:1.0: -------------------------------------------------------------------------------- 1 | chardet-1.0.jar -------------------------------------------------------------------------------- /frozenlibs/htmlparser:htmlparser:jar:1.5: -------------------------------------------------------------------------------- 1 | htmlparser-1.5.jar -------------------------------------------------------------------------------- /installer/README: -------------------------------------------------------------------------------- 1 | This installer uses IzPack from www.izforge.com 2 | -------------------------------------------------------------------------------- /server.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/server.p12 -------------------------------------------------------------------------------- /lib/chardet.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/chardet.jar -------------------------------------------------------------------------------- /lib/openamf.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/openamf.jar -------------------------------------------------------------------------------- /lib/W32WinInet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/W32WinInet.dll -------------------------------------------------------------------------------- /lib/bsf-2.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/bsf-2.3.0.jar -------------------------------------------------------------------------------- /lib/bsh-2.0b1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/bsh-2.0b1.jar -------------------------------------------------------------------------------- /lib/concurrent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/concurrent.jar -------------------------------------------------------------------------------- /lib/htmlparser.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/htmlparser.jar -------------------------------------------------------------------------------- /lib/p11-capi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/p11-capi.dll -------------------------------------------------------------------------------- /webscarab_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/webscarab_logo.gif -------------------------------------------------------------------------------- /lib/jcifs-1.3.14.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/jcifs-1.3.14.jar -------------------------------------------------------------------------------- /lib/jhall-2.0_02.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/jhall-2.0_02.jar -------------------------------------------------------------------------------- /lib/xalan-2.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/xalan-2.7.1.jar -------------------------------------------------------------------------------- /lib/xmlsec-1.4.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/xmlsec-1.4.3.jar -------------------------------------------------------------------------------- /lib/jcommon-1.0.16.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/jcommon-1.0.16.jar -------------------------------------------------------------------------------- /lib/joda-time-2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/joda-time-2.1.jar -------------------------------------------------------------------------------- /lib/tagsoup-1.0rc2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/tagsoup-1.0rc2.jar -------------------------------------------------------------------------------- /doc/userguide/proxies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/doc/userguide/proxies.png -------------------------------------------------------------------------------- /lib/jfreechart-1.0.13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/jfreechart-1.0.13.jar -------------------------------------------------------------------------------- /lib/openid4java-0.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/openid4java-0.9.7.jar -------------------------------------------------------------------------------- /frozenlibs/chardet-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/frozenlibs/chardet-1.0.jar -------------------------------------------------------------------------------- /lib/bcpkix-jdk15on-148.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/bcpkix-jdk15on-148.jar -------------------------------------------------------------------------------- /lib/bcprov-jdk15on-148.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/bcprov-jdk15on-148.jar -------------------------------------------------------------------------------- /lib/flex-messaging-core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/flex-messaging-core.jar -------------------------------------------------------------------------------- /frozenlibs/htmlparser-1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/frozenlibs/htmlparser-1.5.jar -------------------------------------------------------------------------------- /lib/commons-logging-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/commons-logging-1.0.4.jar -------------------------------------------------------------------------------- /lib/flex-messaging-common.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/flex-messaging-common.jar -------------------------------------------------------------------------------- /lib/flex-messaging-remoting.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/lib/flex-messaging-remoting.jar -------------------------------------------------------------------------------- /src/org/owasp/webscarab/webscarab_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OWASP/OWASP-WebScarab/HEAD/src/org/owasp/webscarab/webscarab_logo.gif -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | Please see http://dawes.za.net/gitweb.cgi?p=rogan/webscarab/webscarab.git;a=summary 2 | for an up to date list of changes to WebScarab 3 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/IdentityStore.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | public interface IdentityStore { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .externalToolBuilders/ 3 | .keystore 4 | .project 5 | maven-eclipse.xml 6 | nbactions.xml 7 | target/ 8 | build/ 9 | dist/ 10 | doc/ 11 | webscarab*.jar 12 | *~ 13 | -------------------------------------------------------------------------------- /scripts/no-images.bsh: -------------------------------------------------------------------------------- 1 | response = conversation.getResponse(); 2 | // out.println("Got a " + response.status); 3 | type=response.getHeader("Content-Type"); 4 | // out.println("With content-type " + type); 5 | if (type!=null && type.startsWith("image")) { 6 | conversation.setCancelled(true); 7 | } 8 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/FileSystemStore.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | import java.io.File; 4 | 5 | import org.owasp.webscarab.model.StoreException; 6 | 7 | public class FileSystemStore implements IdentityStore { 8 | 9 | public FileSystemStore(File dir, String session) throws StoreException { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/help.jnlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JavaHelp 5 | Sun Microsystems, Inc. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/WebScarabUI.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.ui.swing; 2 | 3 | import java.io.File; 4 | 5 | import javax.swing.JFrame; 6 | 7 | public interface WebScarabUI extends Runnable { 8 | 9 | public JFrame getFrame(); 10 | 11 | public void addPlugin(final SwingPluginUI plugin); 12 | 13 | public void loadSession(File session); 14 | 15 | public void createTemporarySession(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/TokenParser.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | import java.util.List; 4 | 5 | import org.owasp.webscarab.model.NamedValue; 6 | import org.owasp.webscarab.model.Request; 7 | import org.owasp.webscarab.model.Response; 8 | 9 | public interface TokenParser { 10 | 11 | List getTokens(Request request); 12 | 13 | List getTokens(Response response); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/proxy/swing/ProxyPluginUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ProxyPluginUI.java 3 | * 4 | * Created on 15 December 2004, 11:13 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.proxy.swing; 8 | 9 | import org.owasp.webscarab.plugin.PluginUI; 10 | import javax.swing.JPanel; 11 | 12 | /** 13 | * 14 | * @author rogan 15 | */ 16 | public interface ProxyPluginUI extends PluginUI { 17 | 18 | JPanel getPanel(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/httpclient/Authenticator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Authenticator.java 3 | * 4 | * Created on 21 June 2005, 09:28 5 | */ 6 | 7 | package org.owasp.webscarab.httpclient; 8 | 9 | import org.owasp.webscarab.model.HttpUrl; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface Authenticator { 16 | 17 | String getCredentials(HttpUrl url, String[] challenges); 18 | 19 | String getProxyCredentials(String hostname, String[] challenges); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is the WebScarab OpenSource project, hosted at 2 | http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project 3 | 4 | It aims to become a tool that may be used automatically or interactively 5 | to test web applications for their security. 6 | WebScarab is written in 100% pure java and designed using a fairly clean 7 | set of interfaces to allow for removal and substitution of existing 8 | components, or addition of new analysis systems. 9 | 10 | For more details, please see the URL above. 11 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/UrlListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UrlListener.java 3 | * 4 | * Created on 13 April 2005, 04:01 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.EventListener; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface UrlListener extends EventListener { 16 | 17 | void urlAdded(UrlEvent evt); 18 | 19 | void urlChanged(UrlEvent evt); 20 | 21 | void urlRemoved(UrlEvent evt); 22 | 23 | void urlsChanged(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/sessionid/SessionIDListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * SessionIDListener.java 3 | * 4 | * Created on 29 April 2005, 08:28 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.sessionid; 8 | 9 | import java.util.EventListener; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface SessionIDListener extends EventListener { 16 | 17 | void sessionIDAdded(String key, int index); 18 | 19 | void sessionIDsChanged(); 20 | 21 | void calculatorChanged(String key); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fuzz/FuzzSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FuzzSource.java 3 | * 4 | * Created on 17 June 2005, 02:43 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.fuzz; 8 | 9 | /** 10 | * 11 | * @author rogan 12 | */ 13 | public interface FuzzSource { 14 | 15 | String getDescription(); 16 | 17 | int size(); 18 | 19 | void reset(); 20 | 21 | boolean hasNext(); 22 | 23 | Object current(); 24 | 25 | void increment(); 26 | 27 | FuzzSource newInstance(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/RFC2822.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.util; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | import java.util.Locale; 7 | 8 | public class RFC2822 { 9 | 10 | private static String datePattern = "EEE, dd MMM yyyy HH:mm:ss Z"; 11 | 12 | public static Date parseDate(String dateString) throws ParseException { 13 | SimpleDateFormat format = new SimpleDateFormat(datePattern, Locale.ENGLISH); 14 | return format.parse(dateString); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/ScriptableIdentity.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | import org.owasp.webscarab.model.ConversationModel; 4 | 5 | public class ScriptableIdentity { 6 | 7 | private Identity identity; 8 | 9 | public ScriptableIdentity(Identity identity) { 10 | this.identity = identity; 11 | } 12 | 13 | public ConversationModel getConversationModel() { 14 | return identity.getFramework().getModel().getConversationModel(); 15 | } 16 | 17 | public void removeTransitions() { 18 | identity.removeTransitions(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/ConversationListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConversationListener.java 3 | * 4 | * Created on 13 April 2005, 03:20 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.EventListener; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface ConversationListener extends EventListener { 16 | 17 | void conversationAdded(ConversationEvent evt); 18 | 19 | void conversationChanged(ConversationEvent evt); 20 | 21 | void conversationRemoved(ConversationEvent evt); 22 | 23 | void conversationsChanged(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/FrameworkListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FrameworkListener.java 3 | * 4 | * Created on 13 April 2005, 05:17 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | /** 10 | * 11 | * @author rogan 12 | */ 13 | public interface FrameworkListener extends java.util.EventListener { 14 | 15 | void cookieAdded(FrameworkEvent evt); 16 | 17 | void cookieRemoved(FrameworkEvent evt); 18 | 19 | void cookiesChanged(); 20 | 21 | void conversationPropertyChanged(FrameworkEvent evt); 22 | 23 | void urlPropertyChanged(FrameworkEvent evt); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/CredentialManagerUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * CredentialManagerUI.java 3 | * 4 | * Created on 04 January 2006, 09:09 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.plugin; 12 | 13 | /** 14 | * 15 | * @author rdawes 16 | */ 17 | public interface CredentialManagerUI { 18 | 19 | void requestCredentials(String host, String[] challenges); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/UrlModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UrlModel.java 3 | * 4 | * Created on 13 April 2005, 03:58 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import EDU.oswego.cs.dl.util.concurrent.Sync; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface UrlModel { 16 | 17 | int getChildCount(HttpUrl parent); 18 | 19 | HttpUrl getChildAt(HttpUrl parent, int index); 20 | 21 | int getIndexOf(HttpUrl url); 22 | 23 | Sync readLock(); 24 | 25 | void addUrlListener(UrlListener listener); 26 | 27 | void removeUrlListener(UrlListener listener); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fragments/FragmentListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FragmentListener.java 3 | * 4 | * Created on 13 April 2005, 06:23 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.fragments; 8 | 9 | import java.util.EventListener; 10 | 11 | import org.owasp.webscarab.model.ConversationID; 12 | import org.owasp.webscarab.model.HttpUrl; 13 | 14 | /** 15 | * 16 | * @author rogan 17 | */ 18 | public interface FragmentListener extends EventListener { 19 | 20 | void fragmentAdded(HttpUrl url, ConversationID id, String type, String key); 21 | 22 | void fragmentAdded(String type, String key, int position); 23 | 24 | void fragmentsChanged(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fuzz/sql.txt: -------------------------------------------------------------------------------- 1 | 'sqlvuln 2 | '+sqlvuln 3 | sqlvuln; 4 | (sqlvuln) 5 | a' or 1=1-- 6 | a" or 1=1-- 7 | a" or "a" = "a 8 | a' or 'a' = 'a 9 | 1 or 1=1 10 | a' waitfor delay '0:0:10'-- 11 | 1 waitfor delay '0:0:10'-- 12 | declare @q nvarchar (4000) select @q = 13 | 0x770061006900740066006F0072002000640065006C00610079002000270030003A0030003A 14 | 0 15 | 031003000270000 16 | declare @s varchar(22) select @s = 17 | 0x77616974666F722064656C61792027303A303A31302700 exec(@s) 18 | declare @q nvarchar (4000) select @q = 19 | 0x730065006c00650063007400200040004000760065007200730069006f006e00 exec(@q) 20 | declare @s varchar (8000) select @s = 0x73656c65637420404076657273696f6e 21 | exec(@s) 22 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fuzz/FuzzerListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FuzzListener.java 3 | * 4 | * Created on 06 February 2005, 08:42 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.fuzz; 8 | 9 | import java.util.EventListener; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface FuzzerListener extends EventListener { 16 | 17 | void fuzzHeaderAdded(FuzzerEvent evt); 18 | 19 | void fuzzHeaderChanged(FuzzerEvent evt); 20 | 21 | void fuzzHeaderRemoved(FuzzerEvent evt); 22 | 23 | void fuzzParameterAdded(FuzzerEvent evt); 24 | 25 | void fuzzParameterChanged(FuzzerEvent evt); 26 | 27 | void fuzzParameterRemoved(FuzzerEvent evt); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/scripted/ScriptedUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScriptedUI.java 3 | * 4 | * Created on 03 January 2005, 12:37 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.scripted; 8 | 9 | import java.io.PrintStream; 10 | import java.io.File; 11 | 12 | /** 13 | * 14 | * @author rogan 15 | */ 16 | public interface ScriptedUI { 17 | 18 | PrintStream getOutputStream(); 19 | 20 | PrintStream getErrorStream(); 21 | 22 | void scriptStarted(); 23 | 24 | void scriptStopped(); 25 | 26 | void scriptError(String reason, Throwable error); 27 | 28 | void setEnabled(boolean enabled); 29 | 30 | void scriptFileChanged(File file); 31 | 32 | void scriptLanguageChanged(String language); 33 | 34 | void scriptChanged(String script); 35 | } 36 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/httpclient/ConversationHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConversationHandler.java 3 | * 4 | * Created on 10 January 2006, 06:24 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.httpclient; 12 | 13 | import java.io.IOException; 14 | import org.owasp.webscarab.model.Request; 15 | import org.owasp.webscarab.model.Response; 16 | 17 | /** 18 | * 19 | * @author rdawes 20 | */ 21 | public interface ConversationHandler { 22 | 23 | void responseReceived(Response response); 24 | 25 | void requestError(Request request, IOException ioe); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/UrlEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UrlEvent.java 3 | * 4 | * Created on 13 April 2005, 04:03 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.EventObject; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public class UrlEvent extends EventObject { 16 | 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = -2563329935372684632L; 21 | private HttpUrl _url; 22 | private int _position; 23 | 24 | /** Creates a new instance of UrlEvent */ 25 | public UrlEvent(Object source, HttpUrl url, int position) { 26 | super(source); 27 | _url = url; 28 | _position = position; 29 | } 30 | 31 | public HttpUrl getUrl() { 32 | return _url; 33 | } 34 | 35 | public int getPosition() { 36 | return _position; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/ConversationEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConversationEvent.java 3 | * 4 | * Created on 13 April 2005, 03:25 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.EventObject; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public class ConversationEvent extends EventObject { 16 | 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 5382638131336063659L; 21 | private ConversationID _id; 22 | private int _position; 23 | 24 | /** Creates a new instance of ConversationEvent */ 25 | public ConversationEvent(Object source, ConversationID id, int position) { 26 | super(source); 27 | _id = id; 28 | _position = position; 29 | } 30 | 31 | public ConversationID getConversationID() { 32 | return _id; 33 | } 34 | 35 | public int getPosition() { 36 | return _position; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/ScriptListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScriptListener.java 3 | * 4 | * Created on 09 January 2005, 08:32 5 | */ 6 | 7 | package org.owasp.webscarab.plugin; 8 | 9 | import java.util.EventListener; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public interface ScriptListener extends EventListener { 16 | 17 | void hooksChanged(); 18 | 19 | void hookStarted(String plugin, Hook hook); 20 | 21 | void hookEnded(String plugin, Hook hook); 22 | 23 | void scriptAdded(String plugin, Hook hook, Script script); 24 | 25 | void scriptRemoved(String plugin, Hook hook, Script script); 26 | 27 | void scriptStarted(String plugin, Hook hook, Script script); 28 | 29 | void scriptEnded(String plugin, Hook hook, Script script); 30 | 31 | void scriptChanged(String plugin, Hook hook, Script script); 32 | 33 | void scriptError(String plugin, Hook hook, Script script, Throwable error); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/Transition.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | import java.util.Date; 4 | 5 | import org.owasp.webscarab.model.ConversationID; 6 | 7 | public class Transition { 8 | private ConversationID conversation; 9 | private Date date; 10 | private String tokenName, tokenValue, identity; 11 | 12 | public Transition(ConversationID conversation, Date date, String tokenName, String tokenValue, String identity) { 13 | this.conversation = conversation; 14 | this.date = date; 15 | this.tokenName = tokenName; 16 | this.tokenValue = tokenValue; 17 | this.identity = identity; 18 | } 19 | 20 | public ConversationID getConversation() { 21 | return conversation; 22 | } 23 | 24 | public Date getDate() { 25 | return date; 26 | } 27 | 28 | public String getTokenName() { 29 | return tokenName; 30 | } 31 | 32 | public String getTokenValue() { 33 | return tokenValue; 34 | } 35 | 36 | public String getIdentity() { 37 | return identity; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fuzz/FuzzerEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FuzzerEvent.java 3 | * 4 | * Created on 11 March 2005, 10:51 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.fuzz; 8 | 9 | /** 10 | * 11 | * @author rogan 12 | */ 13 | public class FuzzerEvent { 14 | 15 | public final static int FUZZHEADER_ADDED = 101; 16 | public final static int FUZZHEADER_CHANGED = 102; 17 | public final static int FUZZHEADER_REMOVED = 103; 18 | public final static int FUZZPARAMETER_ADDED = 104; 19 | public final static int FUZZPARAMETER_CHANGED = 105; 20 | public final static int FUZZPARAMETER_REMOVED = 106; 21 | 22 | private int _type; 23 | private int _row; 24 | 25 | /** Creates a new instance of FuzzerEvent */ 26 | public FuzzerEvent(Object source, int eventType, int row) { 27 | _type = eventType; 28 | _row = row; 29 | } 30 | 31 | public int getType() { 32 | return _type; 33 | } 34 | 35 | public int getRow() { 36 | return _row; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /installer/shortcutSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 21 | 22 | 23 | 24 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /izpack/shortcutSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 32 | 33 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/NullComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * NullComparator.java 3 | * 4 | * Created on 12 January 2006, 05:37 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.util; 12 | 13 | import java.util.Comparator; 14 | 15 | /** 16 | * 17 | * @author rdawes 18 | */ 19 | public class NullComparator implements Comparator { 20 | 21 | public NullComparator() { 22 | } 23 | 24 | @SuppressWarnings("unchecked") 25 | public int compare(Object o1, Object o2) { 26 | if (o1 == null && o2 == null) return 0; 27 | if (o1 == null && o2 != null) return 1; 28 | if (o1 != null && o2 == null) return -1; 29 | if (o1 instanceof Comparable) return ((Comparable)o1).compareTo(o2); 30 | throw new ClassCastException("Incomparable objects " + o1.getClass().getName() + " and " + o2.getClass().getName()); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/javax/net/ssl/X509ExtendedTrustManager.java: -------------------------------------------------------------------------------- 1 | package javax.net.ssl; 2 | 3 | import java.net.Socket; 4 | import java.security.cert.X509Certificate; 5 | import java.security.cert.CertificateException; 6 | 7 | /** 8 | * Dummy implementation for Java 6 compatibility with Java 7 code. The methods 9 | * are not actually called (internally) in Java 6, just in Java 7. It is used by 10 | * {@code org.owasp.webscarab.httpclient.ClientTrustManager}. 11 | */ 12 | public abstract class X509ExtendedTrustManager implements X509TrustManager { 13 | 14 | public abstract void checkClientTrusted(X509Certificate[] chain, 15 | String authType, Socket socket) throws CertificateException; 16 | 17 | public abstract void checkServerTrusted(X509Certificate[] chain, 18 | String authType, Socket socket) throws CertificateException; 19 | 20 | public abstract void checkClientTrusted(X509Certificate[] chain, 21 | String authType, SSLEngine engine) throws CertificateException; 22 | 23 | public abstract void checkServerTrusted(X509Certificate[] chain, 24 | String authType, SSLEngine engine) throws CertificateException; 25 | } 26 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/manualrequest/ManualRequestModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ManualRequestModel.java 3 | * 4 | * Created on 01 May 2005, 11:12 5 | */ 6 | 7 | package org.owasp.webscarab.plugin.manualrequest; 8 | 9 | import org.owasp.webscarab.model.FrameworkModel; 10 | import org.owasp.webscarab.model.ConversationModel; 11 | import org.owasp.webscarab.model.Cookie; 12 | import org.owasp.webscarab.model.HttpUrl; 13 | 14 | import org.owasp.webscarab.plugin.AbstractPluginModel; 15 | 16 | /** 17 | * 18 | * @author rogan 19 | */ 20 | public class ManualRequestModel extends AbstractPluginModel { 21 | 22 | private FrameworkModel _model; 23 | 24 | /** Creates a new instance of ManualRequestModel */ 25 | public ManualRequestModel(FrameworkModel model) { 26 | _model = model; 27 | } 28 | 29 | public ConversationModel getConversationModel() { 30 | return _model.getConversationModel(); 31 | } 32 | 33 | public Cookie[] getCookiesForUrl(HttpUrl url) { 34 | return _model.getCookiesForUrl(url); 35 | } 36 | 37 | public void addCookie(Cookie cookie) { 38 | _model.addCookie(cookie); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/DomainCredential.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DomainCredential.java 3 | * 4 | * Created on 04 January 2006, 09:23 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.plugin; 12 | 13 | /** 14 | * 15 | * @author rdawes 16 | */ 17 | public class DomainCredential { 18 | 19 | private String _host; 20 | private String _domain; 21 | private String _username; 22 | private String _password; 23 | 24 | /** Creates a new instance of DomainCredential */ 25 | public DomainCredential(String host, String domain, String username, String password) { 26 | _host = host; 27 | _domain = domain; 28 | _username = username; 29 | _password = password; 30 | } 31 | 32 | public String getHost() { 33 | return _host; 34 | } 35 | 36 | public String getDomain() { 37 | return _domain; 38 | } 39 | 40 | public String getUsername() { 41 | return _username; 42 | } 43 | 44 | public String getPassword() { 45 | return _password; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/BasicCredential.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BasicCredential.java 3 | * 4 | * Created on 04 January 2006, 09:20 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.plugin; 12 | 13 | /** 14 | * 15 | * @author rdawes 16 | */ 17 | public class BasicCredential { 18 | 19 | private String _host; 20 | private String _realm; 21 | private String _username; 22 | private String _password; 23 | 24 | /** 25 | * Creates a new instance of BasicCredential 26 | */ 27 | public BasicCredential(String host, String realm, String username, String password) { 28 | _host = host; 29 | _realm = realm; 30 | _username = username; 31 | _password = password; 32 | } 33 | 34 | public String getHost() { 35 | return _host; 36 | } 37 | 38 | public String getRealm() { 39 | return _realm; 40 | } 41 | 42 | public String getUsername() { 43 | return _username; 44 | } 45 | 46 | public String getPassword() { 47 | return _password; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/CharsetUtils.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.owasp.webscarab.util; 5 | 6 | import org.mozilla.intl.chardet.nsDetector; 7 | import org.mozilla.intl.chardet.nsICharsetDetectionObserver; 8 | import org.mozilla.intl.chardet.nsPSMDetector; 9 | 10 | /** 11 | * @author rdawes 12 | * 13 | */ 14 | public class CharsetUtils { 15 | 16 | public static String getCharset(byte[] bytes) { 17 | nsDetector det = new nsDetector(nsPSMDetector.ALL); 18 | CharsetListener listener = new CharsetListener(); 19 | det.Init(listener); 20 | 21 | boolean isAscii = det.isAscii(bytes,bytes.length); 22 | // DoIt if non-ascii and not done yet. 23 | if (!isAscii) 24 | det.DoIt(bytes,bytes.length, false); 25 | det.DataEnd(); 26 | if (isAscii) return "ASCII"; 27 | 28 | return listener.getCharset(); 29 | } 30 | 31 | private static class CharsetListener implements nsICharsetDetectionObserver { 32 | 33 | private String charset = null; 34 | 35 | public void Notify(String charset) { 36 | this.charset = charset; 37 | } 38 | 39 | public String getCharset() { 40 | return this.charset; 41 | } 42 | 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/ConversationModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConversationModel.java 3 | * 4 | * Created on 13 April 2005, 03:00 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import EDU.oswego.cs.dl.util.concurrent.Sync; 10 | import java.util.Date; 11 | 12 | /** 13 | * 14 | * @author rogan 15 | */ 16 | public interface ConversationModel { 17 | 18 | int getConversationCount(); 19 | 20 | ConversationID getConversationAt(int index); 21 | 22 | int getIndexOfConversation(ConversationID id); 23 | 24 | Sync readLock(); 25 | 26 | String getConversationOrigin(ConversationID id); 27 | 28 | String getConversationProperty(ConversationID id, String property); 29 | 30 | void setConversationProperty(ConversationID id, String property, String value); 31 | 32 | Date getConversationDate(ConversationID id); 33 | 34 | String getRequestMethod(ConversationID id); 35 | 36 | HttpUrl getRequestUrl(ConversationID id); 37 | 38 | String getResponseStatus(ConversationID id); 39 | 40 | Request getRequest(ConversationID id); 41 | 42 | Response getResponse(ConversationID id); 43 | 44 | void addConversationListener(ConversationListener listener); 45 | 46 | void removeConversationListener(ConversationListener listener); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/XMLPanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/httpclient/CertificateRepository.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.httpclient; 2 | 3 | import java.io.IOException; 4 | import java.security.KeyManagementException; 5 | import java.security.KeyStoreException; 6 | import java.security.NoSuchAlgorithmException; 7 | import java.security.cert.Certificate; 8 | import java.security.cert.CertificateException; 9 | 10 | /** 11 | * 12 | * @author Frank Cornelis 13 | */ 14 | public interface CertificateRepository { 15 | 16 | boolean isProviderAvailable(String type); 17 | 18 | void setDefaultKey(String fingerprint); 19 | 20 | Certificate getCertificate(int keystoreIndex, int aliasIndex); 21 | 22 | boolean isKeyUnlocked(int keystoreIndex, int aliasIndex); 23 | 24 | void unlockKey(int keystoreIndex, int aliasIndex, String keyPassword) throws KeyStoreException, KeyManagementException; 25 | 26 | String getFingerPrint(Certificate cert) throws KeyStoreException; 27 | 28 | int loadPKCS12Certificate(String filename, String ksPassword) 29 | throws IOException, KeyStoreException, CertificateException, NoSuchAlgorithmException; 30 | 31 | String getKeyStoreDescription(int keystoreIndex); 32 | 33 | int initPKCS11(String name, String library, int slotListIndex, String kspassword); 34 | 35 | int getKeyStoreCount(); 36 | 37 | int getAliasCount(int keystoreIndex); 38 | 39 | String getAliasAt(int keystoreIndex, int aliasIndex); 40 | } 41 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/MessagePanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/FrameworkEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * FrameworkEvent.java 3 | * 4 | * Created on 13 April 2005, 05:11 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.EventObject; 10 | 11 | /** 12 | * 13 | * @author rogan 14 | */ 15 | public class FrameworkEvent extends EventObject { 16 | 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 6301623751009629601L; 21 | private ConversationID _id = null; 22 | private HttpUrl _url = null; 23 | private Cookie _cookie = null; 24 | private String _property = null; 25 | 26 | /** Creates a new instance of FrameworkEvent */ 27 | public FrameworkEvent(Object source, ConversationID id, String property) { 28 | super(source); 29 | _id = id; 30 | _property = property; 31 | } 32 | 33 | public FrameworkEvent(Object source, HttpUrl url, String property) { 34 | super(source); 35 | _url = url; 36 | _property = property; 37 | } 38 | 39 | public FrameworkEvent(Object source, Cookie cookie) { 40 | super(source); 41 | _cookie = cookie; 42 | } 43 | 44 | public ConversationID getConversationID() { 45 | return _id; 46 | } 47 | 48 | public HttpUrl getUrl() { 49 | return _url; 50 | } 51 | 52 | public Cookie getCookie() { 53 | return _cookie; 54 | } 55 | 56 | public String getPropertyName() { 57 | return _property; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fuzz/RegexSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * RegexSource.java 3 | * 4 | * Created on 28 February 2006, 06:16 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.plugin.fuzz; 12 | 13 | import java.util.regex.PatternSyntaxException; 14 | import org.owasp.webscarab.util.RegexExpansion; 15 | 16 | /** 17 | * 18 | * @author rdawes 19 | */ 20 | public class RegexSource extends RegexExpansion implements FuzzSource { 21 | 22 | private String description; 23 | 24 | /** Creates a new instance of RegexSource */ 25 | public RegexSource(String description, String regex) throws PatternSyntaxException { 26 | super(regex); 27 | this.description = description; 28 | } 29 | 30 | protected RegexSource(RegexSource rs) { 31 | super(rs); 32 | this.description = rs.description; 33 | } 34 | 35 | public Object current() { 36 | return super.get(super.getIndex()); 37 | } 38 | 39 | public String getDescription() { 40 | return this.description; 41 | } 42 | 43 | public void increment() { 44 | super.next(); 45 | } 46 | 47 | public FuzzSource newInstance() { 48 | return new RegexSource(this); 49 | } 50 | 51 | public void reset() { 52 | super.setIndex(0); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /izpack/install.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | WebScarab 8 | ${project.version} 9 | 1.6 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | The WebScarab application 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/saml/Occurences.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ********************************************************************* 3 | * 4 | * $CVSHeader$ 5 | * 6 | * This file is part of WebScarab, an Open Web Application Security Project 7 | * utility. For details, please see http://www.owasp.org/ 8 | * 9 | * Copyright (c) 2012 FedICT 10 | * 11 | * This program is free software; you can redistribute it and/or modify it under 12 | * the terms of the GNU General Public License as published by the Free Software 13 | * Foundation; either version 2 of the License, or (at your option) any later 14 | * version. 15 | * 16 | * This program is distributed in the hope that it will be useful, but WITHOUT 17 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 19 | * details. 20 | * 21 | * You should have received a copy of the GNU General Public License along with 22 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 23 | * Place - Suite 330, Boston, MA 02111-1307, USA. 24 | * 25 | * Getting Source ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a repository 28 | * for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | package org.owasp.webscarab.plugin.saml; 34 | 35 | /** 36 | * Enumeration of occurences. 37 | * 38 | * @author Frank Cornelis 39 | */ 40 | public enum Occurences { 41 | 42 | ALL, FIRST, LAST 43 | } 44 | -------------------------------------------------------------------------------- /scripts/multipartify.bsh: -------------------------------------------------------------------------------- 1 | /* 2 | * Multipartify.java - Quick and dirty BeanShell for WebScarab to 3 | * convert urlencoded POST HTTP requests to multipart requests. 4 | * 5 | * Copyright (C) 2007 Meder Kydyraliev 6 | * 7 | * http://o0o.nu/~meder 8 | * 9 | */ 10 | import org.owasp.webscarab.model.Request; 11 | import org.owasp.webscarab.model.Response; 12 | import org.owasp.webscarab.httpclient.HTTPClient; 13 | import org.owasp.webscarab.model.NamedValue; 14 | import java.io.IOException; 15 | 16 | public Response fetchResponse(HTTPClient nextPlugin, Request request) throws IOException { 17 | 18 | private static final String contentType = "multipart/form-data; boundary=o0oo0oo0oo0oo0oo0oo0o"; 19 | private static final String boundary= "\r\n--o0oo0oo0oo0oo0oo0oo0o"; 20 | private static final String contentDisp= "\r\nContent-Disposition: form-data; name="; 21 | 22 | if (request.getMethod().equals("POST") && request.getContent() != null) { 23 | String body = new String(request.getContent()); 24 | StringBuffer newBody = new StringBuffer(); 25 | NamedValue[] postParams = NamedValue.splitNamedValues(body, "&", "="); 26 | for (int ix=0; ix < postParams.length; ix++) { 27 | newBody.append(boundary + contentDisp + "\"" + postParams[ix].getName() + "\"\r\n\r\n" + postParams[ix].getValue() + " "); 28 | } 29 | newBody.append(boundary + "--\r\n"); 30 | request.setHeader("Content-Type", contentType); 31 | request.setContent(newBody.substring(2).getBytes()); 32 | } 33 | 34 | response = nextPlugin.fetchResponse(request); 35 | 36 | return response; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/TreeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TreeUtil.java 3 | * 4 | * Created on 11 October 2005, 09:34 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.util.swing; 12 | 13 | import javax.swing.JTree; 14 | import javax.swing.tree.TreePath; 15 | 16 | /** 17 | * 18 | * @author rdawes 19 | */ 20 | public class TreeUtil { 21 | 22 | /** Creates a new instance of TreeUtil */ 23 | private TreeUtil() { 24 | } 25 | 26 | public static void expandAll(JTree tree, boolean expand) { 27 | // Traverse tree from root 28 | expandAll(tree, new TreePath(tree.getModel().getRoot()), expand); 29 | } 30 | 31 | private static void expandAll(JTree tree, TreePath path, boolean expand) { 32 | Object parent = path.getLastPathComponent(); 33 | int childCount = tree.getModel().getChildCount(parent); 34 | for (int i=0; i 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/ProgrammaticConversationColumnDataModel.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.util.swing; 2 | 3 | import org.apache.bsf.BSFException; 4 | import org.apache.bsf.BSFManager; 5 | import org.owasp.webscarab.model.ConversationID; 6 | import org.owasp.webscarab.model.FrameworkModel; 7 | import org.owasp.webscarab.model.Request; 8 | import org.owasp.webscarab.model.Response; 9 | 10 | public class ProgrammaticConversationColumnDataModel extends ColumnDataModel { 11 | 12 | private BSFManager manager = new BSFManager(); 13 | 14 | private FrameworkModel model; 15 | 16 | private String name, language, expression; 17 | 18 | public ProgrammaticConversationColumnDataModel(FrameworkModel model, String name, String language, String expression) throws BSFException { 19 | super(name, Object.class); 20 | this.model = model; 21 | manager.declareBean("model", model, FrameworkModel.class); 22 | this.language = language; 23 | this.expression = expression; 24 | } 25 | 26 | @Override 27 | public Object getValue(ConversationID key) { 28 | try { 29 | manager.declareBean("id", key, ConversationID.class); 30 | Request request = model.getRequest(key); 31 | manager.declareBean("request", request, Request.class); 32 | Response response = model.getResponse(key); 33 | manager.declareBean("response", response, Response.class); 34 | Object result = manager.eval(language, name, 0, 0, expression); 35 | manager.undeclareBean("id"); 36 | manager.undeclareBean("request"); 37 | manager.undeclareBean("response"); 38 | return result; 39 | } catch (BSFException bsfe) { 40 | return bsfe; 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/Main.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab; 2 | 3 | import java.io.File; 4 | import java.io.FilenameFilter; 5 | import java.net.MalformedURLException; 6 | import java.net.URL; 7 | import java.net.URLClassLoader; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | public class Main { 12 | 13 | public static void main(String[] args) throws Exception { 14 | File dir = new File("./plugins/"); 15 | List urls = new ArrayList(); 16 | findJars(dir, urls); 17 | ClassLoader loader = ClassLoader.getSystemClassLoader(); 18 | if (urls.size() > 0) { 19 | URL[] u = urls.toArray(new URL[urls.size()]); 20 | System.out.println("Creating new ClassLoader"); 21 | Thread.currentThread().setContextClassLoader(new URLClassLoader(u, loader)); 22 | } else { 23 | System.err.println("No plugins found!"); 24 | } 25 | WebScarab.main(args); 26 | } 27 | 28 | private static void findJars(File dir, List urls) { 29 | if (!dir.isDirectory()) 30 | return; 31 | FilenameFilter filter = new FilenameFilter() { 32 | public boolean accept(File dir, String name) { 33 | return name.endsWith(".jar") || new File(dir, name).isDirectory(); 34 | } 35 | }; 36 | String[] items = dir.list(filter); 37 | if (items == null) 38 | return; 39 | for (int i=0; i targetWidth && i < formats.length); 52 | setText(text); 53 | } 54 | return this; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/proxy/BeanShellUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * BeanShellUI.java 36 | * 37 | * Created on August 20, 2004, 6:43 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.proxy; 41 | 42 | import java.io.PrintStream; 43 | 44 | /** 45 | * 46 | * @author knoppix 47 | */ 48 | public interface BeanShellUI { 49 | 50 | PrintStream getOut(); 51 | 52 | PrintStream getErr(); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/saml/SamlProxyListener.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2010 FedICT 9 | * Copyright (c) 2010 Frank Cornelis 10 | * 11 | * This program is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU General Public License 13 | * as published by the Free Software Foundation; either version 2 14 | * of the License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | * 25 | * Getting Source 26 | * ============== 27 | * 28 | * Source for this application is maintained at Sourceforge.net, a 29 | * repository for free software projects. 30 | * 31 | * For details, please see http://www.sourceforge.net/projects/owasp 32 | * 33 | */ 34 | 35 | package org.owasp.webscarab.plugin.saml; 36 | 37 | import java.util.EventListener; 38 | import org.owasp.webscarab.model.ConversationID; 39 | 40 | /** 41 | * 42 | * @author Frank Cornelis 43 | */ 44 | public interface SamlProxyListener extends EventListener { 45 | 46 | void replayChanged(ConversationID replayId); 47 | } 48 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/ColumnDataListener.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ColumnDataListener.java 36 | * 37 | * Created on 06 December 2004, 04:54 38 | */ 39 | 40 | package org.owasp.webscarab.util.swing; 41 | 42 | import java.util.EventListener; 43 | 44 | /** 45 | * 46 | * @author rogan 47 | */ 48 | public interface ColumnDataListener extends EventListener { 49 | 50 | public void dataChanged(ColumnDataEvent cde); 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/openid/OpenIdProxyConfig.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * This file is part of WebScarab, an Open Web Application Security 4 | * Project utility. For details, please see http://www.owasp.org/ 5 | * 6 | * Copyright (c) 2011 FedICT 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | * 22 | */ 23 | 24 | package org.owasp.webscarab.plugin.openid; 25 | 26 | /** 27 | * 28 | * @author Frank Cornelis 29 | */ 30 | public interface OpenIdProxyConfig { 31 | 32 | boolean doSomething(); 33 | 34 | boolean doCorruptSignature(); 35 | 36 | boolean doRemoveSignature(); 37 | 38 | boolean doRemoveRequestedAttribute(); 39 | 40 | boolean doAppendAttribute(); 41 | 42 | String getRemoveAttributeType(); 43 | 44 | String getAppendAttributeType(); 45 | String getAppendAttributeAlias(); 46 | String getAppendAttributeValue(); 47 | 48 | boolean doRemoveRequestAssociationHandle(); 49 | boolean doRemoveResponseAssociationHandle(); 50 | } 51 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/ScriptableConversation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScriptableConversation.java 3 | * 4 | * Created on 20 June 2005, 09:03 5 | */ 6 | 7 | package org.owasp.webscarab.plugin; 8 | 9 | import org.owasp.webscarab.model.ConversationID; 10 | import org.owasp.webscarab.model.Request; 11 | import org.owasp.webscarab.model.Response; 12 | 13 | /** 14 | * 15 | * @author rogan 16 | */ 17 | public class ScriptableConversation { 18 | 19 | private ConversationID _id; 20 | private Request _request; 21 | private Response _response; 22 | private String _origin; 23 | 24 | private boolean _cancelled = false; 25 | private boolean _analyse = true; 26 | 27 | /** Creates a new instance of ScriptableConversation */ 28 | public ScriptableConversation(ConversationID id, Request request, Response response, String origin) { 29 | _id = id; 30 | _request = request; 31 | _response = response; 32 | _origin = origin; 33 | } 34 | 35 | public ConversationID getId() { 36 | return _id; 37 | } 38 | 39 | public Request getRequest() { 40 | return new Request(_request); // protective copy 41 | } 42 | 43 | public Response getResponse() { 44 | return new Response(_response); // protective copy 45 | } 46 | 47 | public String getOrigin() { 48 | return _origin; 49 | } 50 | 51 | public void setCancelled(boolean cancelled) { 52 | _cancelled = cancelled; 53 | } 54 | 55 | public boolean isCancelled() { 56 | return _cancelled; 57 | } 58 | 59 | public void setAnalyse(boolean analyse) { 60 | _analyse = analyse; 61 | } 62 | 63 | public boolean shouldAnalyse() { 64 | return _analyse; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/spider/SpiderUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * SpiderUI.java 36 | * 37 | * Created on July 21, 2004, 3:31 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.spider; 41 | 42 | import org.owasp.webscarab.plugin.PluginUI; 43 | 44 | /** 45 | * 46 | * @author knoppix 47 | */ 48 | public interface SpiderUI extends PluginUI { 49 | 50 | void linkQueued(Link link, int queueSize); 51 | 52 | void linkDequeued(Link link, int queueSize); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/httpclient/HTTPClient.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * HTTPClient.java 36 | * 37 | * Created on August 4, 2003, 9:08 AM 38 | */ 39 | 40 | package org.owasp.webscarab.httpclient; 41 | 42 | import org.owasp.webscarab.model.Request; 43 | import org.owasp.webscarab.model.Response; 44 | import java.io.IOException; 45 | 46 | /** 47 | * 48 | * @author rdawes 49 | */ 50 | public interface HTTPClient { 51 | 52 | Response fetchResponse(Request request) throws IOException; 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/UrlFilteredConversationModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UrlFilteredConversationModel.java 3 | * 4 | * Created on 06 October 2005, 04:03 5 | * 6 | * To change this template, choose Tools | Options and locate the template under 7 | * the Source Creation and Management node. Right-click the template and choose 8 | * Open. You can then make changes to the template in the Source Editor. 9 | */ 10 | 11 | package org.owasp.webscarab.ui.swing; 12 | 13 | import org.owasp.webscarab.model.ConversationID; 14 | import org.owasp.webscarab.model.ConversationModel; 15 | import org.owasp.webscarab.model.FilteredConversationModel; 16 | import org.owasp.webscarab.model.FrameworkModel; 17 | import org.owasp.webscarab.model.HttpUrl; 18 | 19 | /** 20 | * 21 | * @author rdawes 22 | */ 23 | public class UrlFilteredConversationModel extends FilteredConversationModel { 24 | 25 | private ConversationModel _model; 26 | private HttpUrl _url = null; 27 | 28 | /** Creates a new instance of UrlFilteredConversationModel */ 29 | public UrlFilteredConversationModel(FrameworkModel model, ConversationModel cmodel) { 30 | super(model, cmodel); 31 | _model = cmodel; 32 | } 33 | 34 | public void setUrl(HttpUrl url) { 35 | if (url == _url) { 36 | return; 37 | } else if (_url == null && url != null || _url != null && url == null || !_url.equals(url)) { 38 | _url = url; 39 | updateConversations(); 40 | } 41 | } 42 | 43 | public boolean shouldFilter(ConversationID id) { 44 | if (_url == null) { 45 | return false; 46 | } else { 47 | String cmp1 = _url.toString(); 48 | String cmp2 = _model.getRequestUrl(id).toString(); 49 | return !cmp2.startsWith(cmp1); 50 | } 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/saml/SamlSignatureException.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2010 FedICT 9 | * Copyright (c) 2010 Frank Cornelis 10 | * 11 | * This program is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU General Public License 13 | * as published by the Free Software Foundation; either version 2 14 | * of the License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | * 25 | * Getting Source 26 | * ============== 27 | * 28 | * Source for this application is maintained at Sourceforge.net, a 29 | * repository for free software projects. 30 | * 31 | * For details, please see http://www.sourceforge.net/projects/owasp 32 | * 33 | */ 34 | 35 | package org.owasp.webscarab.plugin.saml; 36 | 37 | /** 38 | * 39 | * @author Frank Cornelis 40 | */ 41 | public class SamlSignatureException extends Exception { 42 | 43 | public SamlSignatureException(String message, Throwable cause) { 44 | super(message, cause); 45 | } 46 | 47 | public SamlSignatureException(String message) { 48 | super(message); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/ImagePanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/proxy/ManualEditUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ManualEditUI.java 36 | * 37 | * Created on August 9, 2004, 3:03 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.proxy; 41 | 42 | import org.owasp.webscarab.model.Request; 43 | import org.owasp.webscarab.model.Response; 44 | 45 | /** 46 | * 47 | * @author knoppix 48 | */ 49 | public interface ManualEditUI { 50 | 51 | Request editRequest(Request request); 52 | 53 | Response editResponse(Request request, Response response); 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/sessionid/Calculator.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * Calculator.java 36 | * 37 | * Created on August 9, 2004, 8:10 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.sessionid; 41 | 42 | import java.math.BigInteger; 43 | 44 | /** 45 | * 46 | * @author knoppix 47 | */ 48 | public interface Calculator { 49 | 50 | void reset(); 51 | 52 | boolean add(SessionID id); 53 | 54 | BigInteger calculate(SessionID id); 55 | 56 | BigInteger min(); 57 | 58 | BigInteger max(); 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/ByteArrayEditor.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ByteViewer.java 36 | * 37 | * Created on November 4, 2003, 6:09 PM 38 | */ 39 | 40 | package org.owasp.webscarab.ui.swing.editors; 41 | 42 | /** 43 | * 44 | * @author rdawes 45 | */ 46 | public interface ByteArrayEditor { 47 | 48 | String getName(); 49 | 50 | void setEditable(boolean editable); 51 | 52 | void setBytes(String contentType, byte[] bytes); 53 | 54 | boolean isModified(); 55 | 56 | byte[] getBytes(); 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/manualrequest/ManualRequestUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ManualRequestUI.java 36 | * 37 | * Created on August 8, 2004, 9:51 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.manualrequest; 41 | 42 | import org.owasp.webscarab.model.Request; 43 | import org.owasp.webscarab.model.Response; 44 | 45 | import org.owasp.webscarab.plugin.PluginUI; 46 | 47 | /** 48 | * 49 | * @author knoppix 50 | */ 51 | public interface ManualRequestUI extends PluginUI { 52 | 53 | void requestChanged(Request request); 54 | 55 | void responseChanged(Response response); 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/sessionid/SessionIDAnalysisUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * SessionIDListener.java 36 | * 37 | * Created on August 9, 2004, 8:13 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.sessionid; 41 | 42 | import org.owasp.webscarab.plugin.PluginUI; 43 | 44 | /** 45 | * 46 | * @author knoppix 47 | */ 48 | public interface SessionIDAnalysisUI extends PluginUI { 49 | 50 | void setEnabled(boolean enabled); 51 | 52 | void sessionIDAdded(String key, int index); 53 | 54 | void sessionIDsChanged(); 55 | 56 | void calculatorChanged(String key); 57 | 58 | } 59 | -------------------------------------------------------------------------------- /doc/certificates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WebScarab certificates 6 | 7 | 8 |

Creating your own certificates

9 |

WebScarab reads certificates stored in the PKCS12 format, which can be created 10 | or converted to by tools such as OpenSSL. PKCS12 is also one of the formats that 11 | Internet Explorer and Mozilla/Navigator, etc can import and export.

12 |

Since the PKCS12 format requires a password, WebScarab uses a password of 13 | "password" (without the quotes). This password is hard-coded into the source of WebScarab.

14 |

Note that this is not an important password, so there is no point in changing it!

15 |

If you decide you want to create your own certificates, for whatever reason, 16 | here are some instructions for doing so using OpenSSL:

17 |

First create the private key:

18 |
19 |   openssl genrsa 1024 > server.key
20 |   
21 |

Then create the corresponding self-signed certificate:

22 |
23 |   openssl req -new -x509 -nodes -sha1 -days 3650 -key server.key > server.crt
24 |   
25 |

Finally, wrap both the key and the certificate into a PKCS12 formatted file:

26 |
27 |   openssl pkcs12 -export -out server.p12 -in server.crt -inkey server.key -name "WebScarab"
28 |   
29 |

Place the resulting "server.p12" file in the root of the webscarab 30 | installation directory, in place of the existing server.p12 file

31 |

Initial support for client certificates exists now, so you should be 32 | able to do similar operations for the client certificate and keys, 33 | calling the file "client.p12"

34 |

35 | NOTE that WebScarab looks for the certificate and key files IN the 36 | webscarab.jar, so you will have to rebuild the jar file with your 37 | updated certificate files, otherwise they will not be used!

38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/httpclient/ClientTrustManager.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.httpclient; 2 | 3 | import java.net.Socket; 4 | import java.security.cert.CertificateException; 5 | import java.security.cert.X509Certificate; 6 | import javax.net.ssl.SSLEngine; 7 | import javax.net.ssl.X509ExtendedTrustManager; 8 | import javax.net.ssl.X509TrustManager; 9 | 10 | /** 11 | * A trust manager implementation that assumes that the world is not evil, that 12 | * no government is spying on you: it simply accepts all certificates regardless 13 | * of the contents of the certificate (algorithm, CN, ...). 14 | */ 15 | public class ClientTrustManager extends X509ExtendedTrustManager 16 | implements X509TrustManager { 17 | 18 | @Override 19 | public void checkClientTrusted(X509Certificate[] xcs, String string) 20 | throws CertificateException { 21 | // trust all certificates 22 | } 23 | 24 | @Override 25 | public void checkServerTrusted(X509Certificate[] xcs, String string) 26 | throws CertificateException { 27 | // trust all certificates 28 | } 29 | 30 | @Override 31 | public X509Certificate[] getAcceptedIssuers() { 32 | return null; 33 | } 34 | 35 | @Override 36 | public void checkClientTrusted(X509Certificate[] xcs, String string, 37 | Socket socket) throws CertificateException { 38 | // trust any client-supplied certificate 39 | } 40 | 41 | @Override 42 | public void checkServerTrusted(X509Certificate[] xcs, String string, 43 | Socket socket) throws CertificateException { 44 | // trust all 45 | } 46 | 47 | @Override 48 | public void checkClientTrusted(X509Certificate[] xcs, String string, 49 | SSLEngine ssle) throws CertificateException { 50 | // trust all 51 | } 52 | 53 | @Override 54 | public void checkServerTrusted(X509Certificate[] xcs, String string, 55 | SSLEngine ssle) throws CertificateException { 56 | // trust all 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/openid/AXFetchRequestAttribute.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * This file is part of WebScarab, an Open Web Application Security 4 | * Project utility. For details, please see http://www.owasp.org/ 5 | * 6 | * Copyright (c) 2011 FedICT 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | * 22 | */ 23 | package org.owasp.webscarab.plugin.openid; 24 | 25 | /** 26 | * 27 | * @author Frank Cornelis 28 | */ 29 | public class AXFetchRequestAttribute { 30 | 31 | private final String attributeType; 32 | private final String alias; 33 | private final boolean required; 34 | private final boolean optional; 35 | 36 | public AXFetchRequestAttribute(String attributeType, String alias, boolean required, boolean optional) { 37 | this.attributeType = attributeType; 38 | this.alias = alias; 39 | this.required = required; 40 | this.optional = optional; 41 | } 42 | 43 | public String getAttributeType() { 44 | return this.attributeType; 45 | } 46 | 47 | public String getAlias() { 48 | return this.alias; 49 | } 50 | 51 | public boolean isRequired() { 52 | return this.required; 53 | } 54 | 55 | public boolean isOptional() { 56 | return this.optional; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/proxy/ProxyPlugin.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ProxyPlugin.java 36 | * 37 | * Created on July 10, 2003, 12:41 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.proxy; 41 | 42 | import org.owasp.webscarab.httpclient.HTTPClient; 43 | 44 | /** 45 | * 46 | * @author rdawes 47 | */ 48 | public abstract class ProxyPlugin { 49 | 50 | public void setSession(String type, Object store, String session) { 51 | } 52 | 53 | public void flush() { 54 | } 55 | 56 | /** The plugin name 57 | * @return The name of the plugin 58 | */ 59 | public abstract String getPluginName(); 60 | 61 | public abstract HTTPClient getProxyPlugin(HTTPClient in); 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/parser/ContentParser.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ContentParser.java 36 | * 37 | * Created on June 24, 2004, 11:42 PM 38 | */ 39 | 40 | package org.owasp.webscarab.parser; 41 | 42 | import org.owasp.webscarab.model.Message; 43 | import org.owasp.webscarab.model.HttpUrl; 44 | 45 | /** 46 | * The methods required by a class that can parse the content of a message 47 | * @author knoppix 48 | */ 49 | public interface ContentParser { 50 | 51 | 52 | /** 53 | * parses the body of the message, and returns a parsed representation 54 | * @param message the Message to parse 55 | * @return the parsed representation of the message body 56 | */ 57 | Object parseMessage(HttpUrl url, Message message); 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/sessionid/SessionIDStore.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * SpiderStore.java 36 | * 37 | * Created on August 23, 2003, 2:55 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.sessionid; 41 | 42 | import org.owasp.webscarab.model.StoreException; 43 | 44 | /** 45 | * 46 | * @author rdawes 47 | */ 48 | public interface SessionIDStore { 49 | 50 | int addSessionID(String key, SessionID id); 51 | 52 | void clearSessionIDs(String key); 53 | 54 | int getSessionIDNameCount(); 55 | 56 | String getSessionIDName(int index); 57 | 58 | int getSessionIDCount(String key); 59 | 60 | SessionID getSessionIDAt(String key, int index); 61 | 62 | void flush() throws StoreException; 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/ColumnDataEvent.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ColumnDataEvent.java 36 | * 37 | * Created on 06 December 2004, 05:23 38 | */ 39 | 40 | package org.owasp.webscarab.util.swing; 41 | 42 | import java.util.EventObject; 43 | 44 | /** 45 | * 46 | * @author rogan 47 | */ 48 | public class ColumnDataEvent extends EventObject { 49 | 50 | /** 51 | * 52 | */ 53 | private static final long serialVersionUID = 6956119410115383747L; 54 | private T _key; 55 | 56 | /** Creates a new instance of ColumnDataEvent */ 57 | public ColumnDataEvent(Object source, T key) { 58 | super(source); 59 | _key = key; 60 | } 61 | 62 | public T getKey() { 63 | return _key; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/identity/CookieTokenParser.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.plugin.identity; 2 | 3 | import java.util.Date; 4 | import java.util.LinkedList; 5 | import java.util.List; 6 | 7 | import org.owasp.webscarab.model.Cookie; 8 | import org.owasp.webscarab.model.NamedValue; 9 | import org.owasp.webscarab.model.Request; 10 | import org.owasp.webscarab.model.Response; 11 | 12 | public class CookieTokenParser implements TokenParser { 13 | 14 | private String[] requestHeaders = new String[] { "Cookie", "Cookie2" }, 15 | responseHeaders = new String[] { "Set-Cookie", "Set-Cookie2" }; 16 | 17 | @Override 18 | public List getTokens(Request request) { 19 | List tokens = new LinkedList(); 20 | for (String headerName : requestHeaders) { 21 | String[] headers = request.getHeaders(headerName); 22 | if (headers == null) 23 | continue; 24 | for (String header : headers) { 25 | NamedValue[] cookies = NamedValue.splitNamedValues(header, 26 | ";\\s*", "="); 27 | if (cookies != null) 28 | for (NamedValue cookie : cookies) 29 | tokens.add(cookie); 30 | } 31 | } 32 | return tokens.size() == 0 ? null : tokens; 33 | } 34 | 35 | @Override 36 | public List getTokens(Response response) { 37 | Date date = null; 38 | 39 | // date is not strictly required if all we are doing is getting the 40 | // cookie value 41 | 42 | // String dateHeader = response.getHeader("Date"); 43 | // if (dateHeader != null) 44 | // try { 45 | // date = RFC2822.parseDate(response.getHeader("Date")); 46 | // } catch (ParseException e) { 47 | // } 48 | 49 | List tokens = new LinkedList(); 50 | for (String headerName : responseHeaders) { 51 | String[] headers = response.getHeaders(headerName); 52 | if (headers == null) 53 | continue; 54 | for (String header : headers) { 55 | Cookie cookie = new Cookie(date, header); 56 | tokens.add(new NamedValue(cookie.getName(), cookie.getValue())); 57 | } 58 | } 59 | return tokens.size() == 0 ? null : tokens; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | /* 2 | * $Source: /cvsroot/owasp/webscarab/INSTALL,v $ 3 | * Copyright (c) 2002 owasp.org. 4 | * This file is part of WebScarab. 5 | * WebScarab is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * WebScarab is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * The valid license text for this file can be retrieved with 16 | * the call: java -cp owasp.jar org.owasp.webscarab.LICENSE 17 | * 18 | * If you are not able to view the LICENSE that way, which should 19 | * always be possible within a valid and working WebScarab release, 20 | * please write to the Free Software Foundation, Inc., 21 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | */ 23 | 24 | This is the WebScarab OpenSource project, hosted at 25 | http://www.owasp.org/webscarab. 26 | All source code and development stuff is done under 27 | http://sourceforge.net/projects/owasp 28 | 29 | Prior to building WebScarab, you should download the various 30 | libraries that it depends on. You can see the list in the ant build.xml 31 | file, in this directory. If you got this file by checking out the source 32 | from the WebScarab CVS repository, you should have the required libraries 33 | already. 34 | 35 | WebScarab uses the Apache Ant build tool. In order to build WebScarab, you 36 | should use a reasonably recent version of Ant. 37 | 38 | There are two Ant build tasks that depend on external tools, IzPack and 39 | ProGuard. You are only likely to need these tools if you plan to build 40 | redistributable images of WebScarab. i.e. an installer, or the self-contained 41 | jar. There should be no problem running the common build tasks if you do not 42 | have these external tools. 43 | 44 | // end of $Source: /cvsroot/owasp/webscarab/INSTALL,v $ 45 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/HTMLPanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/fragments/FragmentsStore.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * FragmentsStore.java 36 | * 37 | * Created on August 25, 2004, 11:21 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.fragments; 41 | 42 | import org.owasp.webscarab.model.StoreException; 43 | 44 | /** 45 | * 46 | * @author knoppix 47 | */ 48 | public interface FragmentsStore { 49 | 50 | int getFragmentTypeCount(); 51 | 52 | String getFragmentType(int index); 53 | 54 | int getFragmentCount(String type); 55 | 56 | String getFragmentKeyAt(String type, int position); 57 | 58 | int indexOfFragment(String type, String key); 59 | 60 | int putFragment(String type, String key, String fragment); 61 | 62 | String getFragment(String key); 63 | 64 | void flush() throws StoreException; 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/spider/Link.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * Link.java 36 | * 37 | * Created on August 7, 2003, 10:28 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.spider; 41 | 42 | import org.owasp.webscarab.model.HttpUrl; 43 | 44 | /** 45 | * 46 | * @author rdawes 47 | */ 48 | public class Link { 49 | 50 | private HttpUrl _url; 51 | private String _referer; 52 | 53 | /** Creates a new instance of Link */ 54 | public Link(HttpUrl url, String referer) { 55 | _url = url; 56 | _referer = referer; 57 | } 58 | 59 | public HttpUrl getURL() { 60 | return _url; 61 | } 62 | 63 | public String getReferer() { 64 | return _referer; 65 | } 66 | 67 | public String toString() { 68 | return _url.toString() + " via " + _referer; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/NamedValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * NamedValue.java 3 | * 4 | * Created on 19 December 2004, 08:58 5 | */ 6 | 7 | package org.owasp.webscarab.model; 8 | 9 | import java.util.logging.Logger; 10 | import java.util.logging.Level; 11 | 12 | /** 13 | * 14 | * @author rogan 15 | */ 16 | public class NamedValue { 17 | 18 | private String _name; 19 | private String _value; 20 | 21 | private static Logger _logger = Logger.getLogger("org.owasp.webscarab.model.NamedValue"); 22 | 23 | { 24 | _logger.setLevel(Level.INFO); 25 | } 26 | 27 | /** Creates a new instance of NamedValue */ 28 | public NamedValue(String name, String value) { 29 | _name = name; 30 | _value = value; 31 | } 32 | 33 | public String getName() { 34 | return _name; 35 | } 36 | 37 | public String getValue() { 38 | return _value; 39 | } 40 | 41 | public String toString() { 42 | return _name + "='" + _value + "'"; 43 | } 44 | 45 | public static NamedValue[] splitNamedValues(String source, String pairSeparator, String nvSeparator) { 46 | try { 47 | if (source == null || "".equals(source)) return new NamedValue[0]; 48 | String[] pairs = source.split(pairSeparator); 49 | _logger.fine("Split \""+ source + "\" into " + pairs.length); 50 | NamedValue[] values = new NamedValue[pairs.length]; 51 | for (int i=0; i[] getUrlColumns(); 61 | 62 | Action[] getConversationActions(); 63 | 64 | ColumnDataModel[] getConversationColumns(); 65 | 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/treetable/AbstractCellEditor.java: -------------------------------------------------------------------------------- 1 | package org.owasp.webscarab.util.swing.treetable; 2 | 3 | import javax.swing.*; 4 | import javax.swing.event.*; 5 | import java.util.EventObject; 6 | 7 | public class AbstractCellEditor implements CellEditor { 8 | 9 | protected EventListenerList listenerList = new EventListenerList(); 10 | 11 | public Object getCellEditorValue() { return null; } 12 | public boolean isCellEditable(EventObject e) { return true; } 13 | public boolean shouldSelectCell(EventObject anEvent) { return false; } 14 | public boolean stopCellEditing() { return true; } 15 | public void cancelCellEditing() {} 16 | 17 | public void addCellEditorListener(CellEditorListener l) { 18 | listenerList.add(CellEditorListener.class, l); 19 | } 20 | 21 | public void removeCellEditorListener(CellEditorListener l) { 22 | listenerList.remove(CellEditorListener.class, l); 23 | } 24 | 25 | /* 26 | * Notify all listeners that have registered interest for 27 | * notification on this event type. 28 | * @see EventListenerList 29 | */ 30 | protected void fireEditingStopped() { 31 | // Guaranteed to return a non-null array 32 | Object[] listeners = listenerList.getListenerList(); 33 | // Process the listeners last to first, notifying 34 | // those that are interested in this event 35 | for (int i = listeners.length-2; i>=0; i-=2) { 36 | if (listeners[i]==CellEditorListener.class) { 37 | ((CellEditorListener)listeners[i+1]).editingStopped(new ChangeEvent(this)); 38 | } 39 | } 40 | } 41 | 42 | /* 43 | * Notify all listeners that have registered interest for 44 | * notification on this event type. 45 | * @see EventListenerList 46 | */ 47 | protected void fireEditingCanceled() { 48 | // Guaranteed to return a non-null array 49 | Object[] listeners = listenerList.getListenerList(); 50 | // Process the listeners last to first, notifying 51 | // those that are interested in this event 52 | for (int i = listeners.length-2; i>=0; i-=2) { 53 | if (listeners[i]==CellEditorListener.class) { 54 | ((CellEditorListener)listeners[i+1]).editingCanceled(new ChangeEvent(this)); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/MultiPartPanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/openid/swing/AssociationOPUrlAction.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * This file is part of WebScarab, an Open Web Application Security 4 | * Project utility. For details, please see http://www.owasp.org/ 5 | * 6 | * Copyright (c) 2011 FedICT 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | * 22 | */ 23 | 24 | package org.owasp.webscarab.plugin.openid.swing; 25 | 26 | import java.awt.event.ActionEvent; 27 | import javax.swing.AbstractAction; 28 | import javax.swing.JTextField; 29 | 30 | /** 31 | * 32 | * @author Frank Cornelis 33 | */ 34 | public class AssociationOPUrlAction extends AbstractAction { 35 | 36 | private final JTextField opUrlTextField; 37 | 38 | public AssociationOPUrlAction(JTextField opUrlTextField) { 39 | this.opUrlTextField = opUrlTextField; 40 | putValue(NAME, "Use as OP URL for association establishment"); 41 | } 42 | 43 | @Override 44 | public void actionPerformed(ActionEvent e) { 45 | String opUrl = (String) getValue("OP-URL"); 46 | this.opUrlTextField.setText(opUrl); 47 | } 48 | 49 | @Override 50 | public void putValue(String key, Object value) { 51 | super.putValue(key, value); 52 | if (null == key) { 53 | return; 54 | } 55 | if (false == "OP-URL".equals(key)) { 56 | return; 57 | } 58 | if (null == value) { 59 | setEnabled(false); 60 | } else { 61 | setEnabled(true); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/model/StoreException.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * StoreException.java 36 | * 37 | * Created on August 23, 2003, 2:43 PM 38 | */ 39 | 40 | package org.owasp.webscarab.model; 41 | 42 | /** 43 | * 44 | * @author rdawes 45 | */ 46 | public class StoreException extends java.lang.Exception { 47 | 48 | /** 49 | * 50 | */ 51 | private static final long serialVersionUID = -3216060604426546272L; 52 | 53 | /** 54 | * Creates a new instance of StoreException without detail message. 55 | */ 56 | public StoreException() { 57 | } 58 | 59 | 60 | /** 61 | * Constructs an instance of StoreException with the specified detail message. 62 | * @param msg the detail message. 63 | */ 64 | public StoreException(String msg) { 65 | super(msg); 66 | } 67 | 68 | public StoreException(String msg, Throwable cause) { 69 | super(msg, cause); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/LogOutputStream.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * CopyInputStream.java 36 | * 37 | * Created on May 25, 2003, 10:59 AM 38 | */ 39 | 40 | package org.owasp.webscarab.util; 41 | 42 | import java.io.OutputStream; 43 | import java.io.FilterOutputStream; 44 | import java.io.IOException; 45 | import java.io.PrintStream; 46 | 47 | /** 48 | * 49 | * @author rdawes 50 | */ 51 | 52 | public class LogOutputStream extends FilterOutputStream { 53 | OutputStream _os; 54 | PrintStream _ps; 55 | 56 | public LogOutputStream(OutputStream os, PrintStream ps) { 57 | super(os); 58 | _os = os; 59 | _ps = ps; 60 | } 61 | 62 | public void write(int b) throws IOException { 63 | _os.write(b); 64 | _ps.write(b); 65 | } 66 | 67 | public void write(byte b[], int off, int len) throws IOException { 68 | _os.write(b, off, len); 69 | _ps.write(b, off, len); 70 | } 71 | 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/proxy/ProxyUI.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * ProxyUI.java 36 | * 37 | * Created on July 20, 2004, 4:40 PM 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.proxy; 41 | 42 | import java.io.IOException; 43 | 44 | import org.owasp.webscarab.model.ConversationID; 45 | import org.owasp.webscarab.model.HttpUrl; 46 | 47 | import org.owasp.webscarab.plugin.PluginUI; 48 | 49 | /** 50 | * 51 | * @author knoppix 52 | */ 53 | public interface ProxyUI extends PluginUI { 54 | 55 | void proxyAdded(ListenerSpec spec); 56 | 57 | void proxyStarted(ListenerSpec spec); 58 | 59 | void proxyStartError(ListenerSpec spec, IOException ioe); 60 | 61 | void proxyStopped(ListenerSpec spec); 62 | 63 | void proxyRemoved(ListenerSpec spec); 64 | 65 | void requested(ConversationID id, String method, HttpUrl url); 66 | 67 | void received(ConversationID id, String status); 68 | 69 | void aborted(ConversationID id, String reason); 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/ui/swing/editors/HexPanel.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/NoWrapEditorKit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.owasp.webscarab.util.swing; 5 | 6 | /** 7 | * @author rdawes 8 | * 9 | */ 10 | 11 | import javax.swing.text.*; 12 | 13 | public class NoWrapEditorKit extends StyledEditorKit { 14 | 15 | private static final long serialVersionUID = 2867130121374027370L; 16 | 17 | public ViewFactory getViewFactory() { 18 | return new StyledViewFactory(); 19 | } 20 | 21 | static class StyledViewFactory implements ViewFactory { 22 | public View create(Element elem) { 23 | String kind = elem.getName(); 24 | 25 | if (kind != null) { 26 | if (kind.equals(AbstractDocument.ContentElementName)) { 27 | return new MyLabelView(elem); 28 | } else if (kind.equals(AbstractDocument.ParagraphElementName)) { 29 | return new ParagraphView(elem); 30 | } else if (kind.equals(AbstractDocument.SectionElementName)) { 31 | return new NoWrapBoxView(elem, View.Y_AXIS); 32 | } else if (kind.equals(StyleConstants.ComponentElementName)) { 33 | return new ComponentView(elem); 34 | } else if (kind.equals(StyleConstants.IconElementName)) { 35 | return new IconView(elem); 36 | } 37 | } 38 | 39 | return new LabelView(elem); 40 | } 41 | } 42 | 43 | static class NoWrapBoxView extends BoxView { 44 | public NoWrapBoxView(Element elem, int axis) { 45 | super(elem, axis); 46 | } 47 | 48 | public void layout(int width, int height) { 49 | super.layout(32768, height); 50 | } 51 | 52 | public float getMinimumSpan(int axis) { 53 | return super.getPreferredSpan(axis); 54 | } 55 | } 56 | 57 | static class MyLabelView extends LabelView { 58 | public MyLabelView(Element elem) { 59 | super(elem); 60 | } 61 | 62 | public float getPreferredSpan(int axis) { 63 | float span = 0; 64 | if (axis == View.X_AXIS) { 65 | int p0 = getStartOffset(); 66 | int p1 = getEndOffset(); 67 | checkPainter(); 68 | TabExpander ex = getTabExpander(); 69 | if (ex == null) { 70 | // paragraph implements TabExpander 71 | ex = (TabExpander) this.getParent().getParent(); 72 | } 73 | span = getGlyphPainter().getSpan(this, p0, p1, ex, 0); 74 | return Math.max(span, 1); 75 | } else { 76 | span = super.getPreferredSpan(axis); 77 | } 78 | return span; 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /scripts/forcebrowse.bsh: -------------------------------------------------------------------------------- 1 | import org.owasp.webscarab.model.ConversationID; 2 | import org.owasp.webscarab.model.HttpUrl; 3 | import org.owasp.webscarab.model.Request; 4 | import org.owasp.webscarab.model.Response; 5 | import java.io.BufferedReader; 6 | import java.io.FileReader; 7 | import javax.swing.JOptionPane; 8 | 9 | // We ask for a template that already has the appropriate method, version, 10 | // headers, etc defined 11 | // All we'll do is replace the URL, and send it off 12 | String templ = JOptionPane.showInputDialog("Which request shall I use for the template?"); 13 | String urlfile = JOptionPane.showInputDialog("Where is the list of URLs to try?"); 14 | 15 | Request template = scripted.getRequest(Integer.parseInt(templ)); 16 | 17 | BufferedReader urls = new BufferedReader(new FileReader(urlfile)); 18 | 19 | // This will hold the name of the next file to try 20 | // getNextRequest() will update this when we construct the request 21 | String url = urls.readLine(); 22 | 23 | // modify this routine to determine when we are finished 24 | // NB: This can be called multiple times between requests, so it 25 | // should not have any side effects 26 | boolean hasMoreRequests() { 27 | return url != null; 28 | } 29 | 30 | // modify this routine to construct the next request, and update the 31 | // position in the list 32 | Request getNextRequest() { 33 | // create a copy of the template 34 | Request request = new Request(template); 35 | request.setURL(new HttpUrl(url)); 36 | out.println("Trying " + url); 37 | url = urls.readLine(); // get the next one to try 38 | return request; 39 | } 40 | 41 | void gotResponse(Response response) { 42 | scripted.addConversation(response); 43 | } 44 | 45 | // call this to fetch them in parallel 46 | // the number of simultaneous connections is controlled by the Scripted plugin 47 | // It is currently hardcoded in the source at 4 simultaneous requests 48 | 49 | void fetchParallel() { 50 | while (scripted.isAsyncBusy() || hasMoreRequests()) { 51 | while (scripted.hasAsyncCapacity() && hasMoreRequests()) { 52 | scripted.submitAsyncRequest(getNextRequest()); 53 | } 54 | Thread.sleep(100); 55 | while (scripted.hasAsyncResponse()) { 56 | gotResponse(scripted.getAsyncResponse()); 57 | } 58 | } 59 | } 60 | 61 | fetchParallel(); 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/openid/AXFetchResponseAttribute.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * This file is part of WebScarab, an Open Web Application Security 4 | * Project utility. For details, please see http://www.owasp.org/ 5 | * 6 | * Copyright (c) 2011 FedICT 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | * 22 | */ 23 | package org.owasp.webscarab.plugin.openid; 24 | 25 | /** 26 | * 27 | * @author Frank Cornelis 28 | */ 29 | public class AXFetchResponseAttribute { 30 | 31 | private String attributeType; 32 | private final String alias; 33 | private String value; 34 | private boolean signed; 35 | 36 | public AXFetchResponseAttribute(String alias) { 37 | this(null, alias, null, false); 38 | } 39 | 40 | public AXFetchResponseAttribute(String attributeType, String alias, String value, boolean signed) { 41 | this.attributeType = attributeType; 42 | this.alias = alias; 43 | this.value = value; 44 | this.signed = signed; 45 | } 46 | 47 | public String getAlias() { 48 | return this.alias; 49 | } 50 | 51 | public String getAttributeType() { 52 | return this.attributeType; 53 | } 54 | 55 | public boolean isSigned() { 56 | return this.signed; 57 | } 58 | 59 | public String getValue() { 60 | return this.value; 61 | } 62 | 63 | public void setAttributeType(String attributeType) { 64 | this.attributeType = attributeType; 65 | } 66 | 67 | public void setSigned(boolean signed) { 68 | this.signed = signed; 69 | } 70 | 71 | public void setValue(String value) { 72 | this.value = value; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /doc/userguide/tools.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

The Tools menu

7 | The Tools menu contains the following options: 8 |
  • Proxies
  • 9 |

    This menu allows you to specify any upstream proxies that may be 10 | required to access the target websites. You can specify different 11 | proxies for HTTP and HTTPS. The proxy exclusion list DOES NOT WORK YET, 12 | due to the developers not needing this functionality. If you need it, 13 | please have a go at implementing it yourself, and send patches to the 14 | developers.

    15 |
  • Shared Cookies
  • 16 |

    This displays a "Shared Cookie jar". This cookie jar is shared 17 | between 18 | the Proxy, Spider and Manual Request plugins. The various cookies are 19 | available in a drop-down list, and the main table shows what values 20 | that cookie has had in the past.

    21 |

    The Proxy plugin can be configured to record all cookies that it 22 | sees 23 | from the servers, and insert those cookies into requests that "should" 24 | have them. This may be useful if you are using multiple browsers, and 25 | want to share a session between them. Be careful, since flushing 26 | cookies from the browser may not have the effect that you expect, since 27 | WebScarab will insert the most recent cookie it knows about into the 28 | requests that it sees. (This can be disabled.)

    29 |

    The Spider plugin can also use these cookies when automatically 30 | traversing a site.

    31 |

    The Manual Request plugin has buttons allowing the user to 32 | automatically insert the appropriate cookies into the request, as well 33 | as extracting cookies from any responses.

    34 |
  • Transcoder
  • 35 |

    The Transcoder is a utility window that allows the user to perform 36 | certain manipulations of text. Examples include URL-encoding and 37 | decoding, Base64-encoding and decoding, and MD5 and SHA1 hashes. Data 38 | can be copied to and from the clipboard, and there is also undo/redo 39 | functionality available on the Edit menu.

    40 |
  • Save Configuration
  • 41 |

    WebScarab can store certain configuration options in a properties 42 | file. 43 | This is called WebScarab.properties, and is located in your home 44 | directory (~/ on Unix, and usually Documents and Setting\username\ on 45 | Win32). Examples of data that is saved include upstream Proxy settings, 46 | and settings for various plugins. This properties file is read on 47 | startup if it exists, but is only saved when this option is explicitly 48 | selected.

    49 | 50 | 51 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/DOMTreeModel.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | package org.owasp.webscarab.util.swing; 35 | 36 | import org.owasp.webscarab.util.swing.AbstractTreeModel; 37 | 38 | import org.w3c.dom.Node; 39 | import org.w3c.dom.NodeList; 40 | import javax.swing.tree.TreePath; 41 | 42 | public class DOMTreeModel extends AbstractTreeModel { 43 | 44 | private Node _root; 45 | 46 | public DOMTreeModel(Node root) { 47 | _root = root; 48 | } 49 | 50 | public Object getRoot() { 51 | return _root; 52 | } 53 | 54 | public int getChildCount(Object parent) { 55 | NodeList nodes = ((Node) parent).getChildNodes(); 56 | return nodes.getLength(); 57 | } 58 | 59 | public Object getChild(Object parent, int index) { 60 | NodeList nodes = ((Node) parent).getChildNodes(); 61 | return nodes.item(index); 62 | } 63 | 64 | public boolean isLeaf(Object node) { 65 | return ((Node)node).getNodeType() != Node.ELEMENT_NODE; 66 | } 67 | 68 | public void valueForPathChanged(TreePath path, Object newValue) { 69 | // we do not support editing 70 | } 71 | 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/sessionid/SessionID.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | /* 35 | * SessionID.java 36 | * 37 | * Created on 16 November 2003, 07:29 38 | */ 39 | 40 | package org.owasp.webscarab.plugin.sessionid; 41 | 42 | import java.util.Date; 43 | 44 | /** 45 | * 46 | * @author rdawes 47 | */ 48 | public class SessionID implements Comparable { 49 | 50 | private Date _date; 51 | private String _value; 52 | 53 | /** Creates a new instance of SessionID */ 54 | public SessionID(Date date, String value) { 55 | _date = date; 56 | _value = value; 57 | } 58 | 59 | public SessionID(String line) { 60 | int sep = line.indexOf(":"); 61 | String time = line.substring(0, sep); 62 | _date = new Date(Long.parseLong(time)); 63 | _value = line.substring(sep+2); 64 | } 65 | 66 | public Date getDate() { 67 | return _date; 68 | } 69 | 70 | public String getValue() { 71 | return _value; 72 | } 73 | 74 | public int compareTo(SessionID o) { 75 | if (o == null) return -1; 76 | return _date.compareTo(o.getDate()); 77 | } 78 | 79 | public String toString() { 80 | return _date.getTime() + ": " + _value; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/treetable/AbstractTreeTableModel.java: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * 3 | * $CVSHeader$ 4 | * 5 | * This file is part of WebScarab, an Open Web Application Security 6 | * Project utility. For details, please see http://www.owasp.org/ 7 | * 8 | * Copyright (c) 2002 - 2004 Rogan Dawes 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | * 24 | * Getting Source 25 | * ============== 26 | * 27 | * Source for this application is maintained at Sourceforge.net, a 28 | * repository for free software projects. 29 | * 30 | * For details, please see http://www.sourceforge.net/projects/owasp 31 | * 32 | */ 33 | 34 | package org.owasp.webscarab.util.swing.treetable; 35 | 36 | import org.owasp.webscarab.util.swing.AbstractTreeModel; 37 | 38 | public abstract class AbstractTreeTableModel extends AbstractTreeModel implements TreeTableModel { 39 | 40 | // 41 | // Default implementations for methods in the TreeTableModel interface. 42 | // 43 | 44 | public Class getColumnClass(int column) { 45 | return column == 0 ? TreeTableModel.class : Object.class; 46 | } 47 | 48 | /** By default, make the column with the Tree in it the only editable one. 49 | * Making this column editable causes the JTable to forward mouse 50 | * and keyboard events in the Tree column to the underlying JTree. 51 | */ 52 | public boolean isCellEditable(Object node, int column) { 53 | return getColumnClass(column) == TreeTableModel.class; 54 | } 55 | 56 | public void setValueAt(Object aValue, Object node, int column) {} 57 | 58 | // Left to be implemented in the subclass: 59 | 60 | /* 61 | * public int getColumnCount() 62 | * public String getColumnName(Object node, int column) 63 | * public Object getValueAt(Object node, int column) 64 | */ 65 | } 66 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/util/swing/treetable/TreeTableModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TreeTableModel.java 3 | * 4 | * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. 5 | * 6 | * This software is the confidential and proprietary information of Sun 7 | * Microsystems, Inc. ("Confidential Information"). You shall not 8 | * disclose such Confidential Information and shall use it only in 9 | * accordance with the terms of the license agreement you entered into 10 | * with Sun. 11 | * 12 | * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE 13 | * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 14 | * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 15 | * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES 16 | * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING 17 | * THIS SOFTWARE OR ITS DERIVATIVES. 18 | * 19 | */ 20 | 21 | package org.owasp.webscarab.util.swing.treetable; 22 | 23 | import javax.swing.tree.TreeModel; 24 | 25 | /** 26 | * TreeTableModel is the model used by a JTreeTable. It extends TreeModel 27 | * to add methods for getting inforamtion about the set of columns each 28 | * node in the TreeTableModel may have. Each column, like a column in 29 | * a TableModel, has a name and a type associated with it. Each node in 30 | * the TreeTableModel can return a value for each of the columns and 31 | * set that value if isCellEditable() returns true. 32 | * 33 | * @author Philip Milne 34 | * @author Scott Violet 35 | */ 36 | public interface TreeTableModel extends TreeModel 37 | { 38 | /** 39 | * Returns the number of available columns. 40 | */ 41 | int getColumnCount(); 42 | 43 | /** 44 | * Returns the name for column number column. 45 | */ 46 | String getColumnName(int column); 47 | 48 | /** 49 | * Returns the type for column number column. 50 | */ 51 | Class getColumnClass(int column); 52 | 53 | /** 54 | * Returns the value to be displayed for node node, 55 | * at column number column. 56 | */ 57 | Object getValueAt(Object node, int column); 58 | 59 | /** 60 | * Indicates whether the the value for node node, 61 | * at column number column is editable. 62 | */ 63 | boolean isCellEditable(Object node, int column); 64 | 65 | /** 66 | * Sets the value for node node, 67 | * at column number column. 68 | */ 69 | void setValueAt(Object aValue, Object node, int column); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/org/owasp/webscarab/plugin/Hook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Hook.java 3 | * 4 | * Created on 07 January 2005, 05:19 5 | */ 6 | 7 | package org.owasp.webscarab.plugin; 8 | 9 | import java.util.List; 10 | import java.util.ArrayList; 11 | import java.util.logging.Logger; 12 | 13 | import org.apache.bsf.BSFManager; 14 | import org.apache.bsf.BSFException; 15 | 16 | /** 17 | * 18 | * @author rogan 19 | */ 20 | public class Hook { 21 | 22 | private String _name; 23 | private String _description; 24 | private List 9 | &{[code]}; 10 | 11 | 12 |